[xsd-users] Re: Loading URLs

Patrick Shinpaugh shpatric at vt.edu
Thu Nov 2 11:20:41 EST 2006


Hi Boris,
See below.


On Thu, 2006-11-02 at 17:27 +0200, Boris Kolpackov wrote:
> Hi Patrick,
> 
> Patrick Shinpaugh <shpatric at vt.edu> writes:
> 
> > Unfortunately I have run into another problem which I cannot be sure is
> > XSD specific. Basically I am traversing the DOMNodes using a recursive
> > function and as a test if the node is a x3d::Transform then grab it and
> > print out the info accessed directly from the Transform xsd-generated
> > class and compare it to the data printed directly from the DOMNodes. So
> > as I traverse the nodes, everything works great - I am able to grab the
> > data from the first Transform - until I reach the second Transform and
> > attempt to print its info.
> >
> > [...]
> >
> > Unfortunately, it segfaults with gdb backtrace:
> >
> > (gdb) bt
> > #0  0x054fdc70 in __dynamic_cast ()
> > at /usr/local/xsd/libxsd/xsd/cxx/tree/types.hxx:1214
> >
> > [...]
> >
> > Because the error is within /usr/local/xsd/libxsd/xsd/cxx/tree/types.hxx
> > I figured I'd contact you about it first
> 
> I check the code around line 1214 in types.hxx and there is nothing that
> calls dynamic_cast. This could mean one of the two things:
> 
> 1. You are compiling with optimization and the debug info does not
>    correspond to the code.
> 
I compile my code with -O2 -g as follows:

        gcc -O2 -g -I /usr/local/xsd/libxsd driver.cxx -c
        gcc -O2 -g -I /usr/local/xsd/libxsd x3d-3.0.cxx -c
        gcc -O2 -g -I /usr/local/xsd/libxsd
x3d-3.0-Web3dExtensionsPrivate.cxx -c
        gcc -O2 -g -I /usr/local/xsd/libxsd
x3d-3.0-Web3dExtensionsPublic.cxx -c
        gcc -O2 -g -lstdc++ -lxerces-c driver.o x3d-3.0.o
x3d-3.0-Web3dExtensionsPrivate.o x3d-3.0-Web3dExtensionsPublic.o -o x3d

> 2. We are looking at different versions of XSD. I checked 2.3.1.a1 and
>    2.3.1.b1.
> 
I am using the prebuilt binaries 2.3.1.a1

> 
> > though at the same time I am wondering if it might be an issue with gcc
> > or perhaps with my code.
> 
> I could not spot anything in your code. Would it possible for you to send
> a complete but minimal test case that reproduces this problem? I might
> then be able to debug it further.
> 
I'll see what I can do and send a tarball sometime later today.

> 
> thanks,
> -boris


Thanks
-- 
Patrick Shinpaugh
Virginia Tech
UVAG System Administrator/Programmer
540-231-2054




More information about the xsd-users mailing list