Hi Andy,

I've made the changes you suggested and the crashes are gone.
I guess this is only a workaround for a bug in the DOM, but I don't have the time or knowledge to fix the DOM, so I will submit my changes to the dae plugin to osg-submissions.
Thanks for pointing me in the right direction.

Regards
/Per

[EMAIL PROTECTED] wrote:

Hello,
I have a good idea of what is causing this crash. I believe this to be
the same as if you were to "osgconv something.dae somethingelse.dae"
which I ran into while developing before SIGGRAPH.

The problem lies in the COLLADA DOM and how the plugin is structured.
There are three "classes" in the plugin, the plugin class, the
daeReader, and daeWriter (maybe the names aren't the same, I haven't
looked at the code since I wrote it before SIGGRAPH, also I don't really
like the software design but it was the quickest to get going and I
didn't have much time. Please feel free to change it ;) ). The reader
has it's own DAE object that it instanciates and cleans up when it is
done. There is a problem with the DOM that after you do the static
cleanup you cannot reinitialize correctly.

I believe the problem then is that the loading of multiple documents is
doing this.
1) initialize DOM
2) load first document - this is all good
3) clean-up DOM
4) initialize DOM
5) load second document
CRASH somewhere in 4 or 5

A solution to this problem would be to move the DAE object out of the
daeReader and daeWriter classes into the main "plugin" class and pass it
to the reader and writer. This way you can initialize and clean-up the
DAE object only once (I assume the plugin only gets initialized and
cleaned up only once, otherwise you would still get this problem).

I am sorry I didn't have time to make these changes before handing off
the project to the OSG community. Maybe Sony will have me contribute
more to the project in the future but I do not foresee this happening
very soon.

-Andy

Robert Osfield wrote:
Hi Per,

On 9/5/06, *Robert Osfield* <[EMAIL PROTECTED]
<mailto:[EMAIL PROTECTED]>> wrote:

   I have recreated the problem on my system and am no looking into
   it.  The COLLADA plugin was written be one of the developers of
   COLLADA so expect its usage of COLLADA is appropriate, as to what
   the crash is...


I have tried to use gdb to get to the bottom of this crash, and it
appears to be somewhere in the COLLADA library, but get a corrupted
stack so get very little actual usage information.

I have played around with the construction of the objects that are used
to read/write via the COLLADA library but alas always got the crash.

I am now a bit stumped to where to look or what to try next.  I think we
probably need Mike Weiblen to reproduce the problem and see if he or his
colleagues have any suggestion.

Robert.


------------------------------------------------------------------------

_______________________________________________
osg-users mailing list
[email protected]
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/

_______________________________________________
osg-users mailing list
[email protected]
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/


_______________________________________________
osg-users mailing list
[email protected]
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/

Reply via email to