[xsd-users] terminate called after throwing an instance of 'xsd::cxx::xml::invalid_utf8_string'

Boris Kolpackov boris at codesynthesis.com
Wed Jan 23 04:35:25 EST 2008


Hi Mark,

Mark Capogreco <mcapogreco at hotmail.com> writes:

> I received the above error running an C++ openMPI parallel application,
> which is an extension to my previously normal C++ app. Which worked well
> with XSD. The following is a description of what has occurred.
>
> -          I run my C++ app. Fine utilising XSD with no error.
>
> -          I added openMPI code and still run well under normal C++
> environement.
>
> -          I tried then running the C++ app on the Parallel Tools Platform
> in eclipse 3.2 using only one node and received the above error.  The same
> error occurs for several nodes.
>
> I was hoping someone could give me some detail on the error so I can see why
> I can't input my parameters using XSD in the parallel environment.

The invalid_utf8_string exception is thrown by the text conversion
function when an invalid UTF8 character or character sequence is
encountered. One thing to note is that this should only happen when
you try to serialize the object model to XML (that's when UTF-8 to
UTF-16 conversion is happening). So if all you are doing is parsing
XML to object model then the fact that you are getting this exception
is very strange.

If you do serialize to XML then the most likely reason for this
exception is that a string in the object model contains invalid
UTF-8 text. Seeing that you are running in a parallel environment,
perhaps there is a race condition which gobbles up the data.

One way to try and track down the problem would be to get a stack
trace (e.g., by getting a core and examining it with gdb). This
way you can actually examine the string being converted which
should give you a better idea about what's going on.

Boris




More information about the xsd-users mailing list