[xsd-users] segfault on auto_ptr release

Boris Kolpackov boris at codesynthesis.com
Thu Nov 29 10:20:40 EST 2007


Hi Alberto,

Alberto Colombo <a.colombo at kingston.ac.uk> writes:

> The problem is that, when I run the very simple program (Assess.cpp), it
> crashes when the auto_ptr destructor is invoked. This happens both on
> windows and linux (either with segmentation fault or illegal
> instruction, randomly), using xsd 3.0.0.

I tried your test case but got the following validation errors instead
of a segfault:

sample-lamp.xgtf:24:50 error: Unknown element 'data:polygon-type'
sample-lamp.xgtf:24:50 error: Attribute 'open' is not declared for element 'data:polygon-type'
sample-lamp.xgtf:49:66 error: Duplicate unique value declared for identity constraint of element 'sourcefile'.
sample-lamp.xgtf:232:51 error: Unknown element 'data:polygon'
sample-lamp.xgtf:232:51 error: Attribute 'framespan' is not declared for element 'data:polygon'
sample-lamp.xgtf:240:29 error: Element 'data:polygon' is not valid for content model: '(null,)'
sample-lamp.xgtf:476:57 error: Duplicate unique value declared for identity constraint of element 'sourcefile'.
sample-lamp.xgtf:485:57 error: Duplicate unique value declared for identity constraint of element 'sourcefile'.

I could find neither data:polygon-type nor data:polygon elements in the
schemas you provided so clearly your sample XML is not valid per your
schemas.

Can you send a valid XML document that I can use to reproduce this
problem? But before you do, can you confirm that you've compiled
all your schemas with the --generate-polymorphic as suggested by
the warning? If that's not the case, then please try to add this
option and see if problem goes away.

Thanks,
Boris




More information about the xsd-users mailing list