[xsde-users] "Hello world" document_pimpl::parse() crash when built in VS 2008

Boris Kolpackov boris at codesynthesis.com
Tue Apr 13 05:38:51 EDT 2010


Hi Dmitry,

Dmitry Balakhonsky <dnomaid at gmail.com> writes:

> Now cl.exe command line looks like this:
> cl.exe /DARM /D_ARM /DUNDER_CE /DWINCE /D_WIN32_WCE=0x501 /DNDEBUG
> /DWIN32_PLATFORM_WFSP /D_WINDOWS /D_ARM_ /DARMV4I /D_UNICODE /DUNICODE
> /nologo /W3 /O1 /GR- /MT /GS- /FD /EHsc /fp:fast /I..  /EHs /EHs /EHs
> /c /TP cxx\serializer\validating\unsigned-long.cxx
> /Focxx\serializer\validating\unsigned-long.obj

Can you remove the /MT, and /EHsc options from the configuration 
file and replace /GR- with /GR? Then try to rebuild the library.

The /MT option selects the runtime library to use. Since your application
uses the default runtime (no /M? option), there might be a conflict.

The 'c' part in /EHsc specifies that extern C functions never throw an 
exception which is not the case for the XSD/e runtime when C++ exceptions
are enabled.


> Now the program crashes, but shows
> Unhandled exception at 0x00011c64 in XSDETest.exe: 0xC0000005: Access
> violation writing location 0x0003e628.
> 
> The xutility file opens and the yellow arrow points to the line
> (*_Pnext)->_Mycont = 0;
> of the _Container_base_secure::_Orphan_all() function

Ok, this is better. At least now we have a stack trace. It seems there 
is an issue with STL which could be the result of the /MT option. If 
removing it does not help, can you try the minimal configuration
(etc/vc-9.0/config-min.nmake) which doesn't use STL/iostream?

Boris



More information about the xsde-users mailing list