Antwort: Re: [xsd-users] CodeSythesis XSD - CXX Tree Multithreading issue

tomislav.reichenbach at valida.at tomislav.reichenbach at valida.at
Wed Mar 7 05:06:42 EST 2012


Hi Boris,

boris at codesynthesis.com schrieb am 06.03.2012 15:05:15:

> Von: boris at codesynthesis.com
> An: tomislav.reichenbach at valida.at
> Kopie: xsd-users at codesynthesis.com
> Datum: 06.03.2012 14:59
> Betreff: Re: [xsd-users] CodeSythesis XSD - CXX Tree Multithreading 
issue
> 
> Hi Tom,
> 
> In the future please keep your replies CC'ed to the xsd-users mailing
> list as discussed in the posting guidelines:
> 
> http://www.codesynthesis.com/support/posting-guidelines.xhtml
> 
> 

sorry pressed reply, instead of reply-all

> tomislav.reichenbach at valida.at <tomislav.reichenbach at valida.at> writes:
> 
> > > 3. How do you see that the XML is incomplete? Do you write it to a 
file?
> > >    Is it possible that not all the data has been flushed yet? Can 
you
> > >    confirm that the object model is complete (i.e., that it is 
parsed
> > >    correctly and the problem is in serialization)?
> > 
> > The thread is finished and returns with incomplete result. The model 
is
> > parsed correctly, afterwards the calculation with the parsed model are
> > done, and only then in the serialization phase the error occurs. I 
have
> > spent some time analyzing the code and trying to see where it happens
> > and have narrow it the the serialization call.
> 
> By "the error occurs" do you mean that an exception is thrown? Or does
> the thread complete without any errors but the written XML is 
incomplete?

I get both, roughly ..

... 30% of return happens with an exception thrown, unfortunatelly the one 
I cannot 
catch with all FAQ catch variants, only with catch(...).

... 60% of return have incomplete XML (no exception is thrown)

... 10% have correct return XML

> 
> What happens if you disable your calculation code (i.e., just parse XML
> into the object model and then write this object model back to XML 
without
> any modifications)?

Input and output have different structure. Calculation function 
instantiates new output objects.
(Input size is 5KB vs Output size of 1585KB)

> 
> If none of this makes any difference, then the next step would be to
> determine whether this is an XSD problems or a Xerces-C++ problem by
> removing XSD from the equation. Right now, when you call an 
XSD-generated
> parsing function, it first parses XML to DOM and then parses DOM to the
> object model. Similarly, when you call the serialization function, it
> first creates DOM from the object model and then serializes DOM to XML.
> The idea is to just do: XML->DOM->XML. Will you be able to modify your
> code to do this? You can find ready-to-use functions for DOM parsing and
> serialization in the 'messaging' example (see the 
dom-{parse,serialize}.?xx
> files).

I can make the modifications, and I will try to implement them and report 
the outcome.

> 
> Boris


regards
Tom


More information about the xsd-users mailing list