-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Hello Falko,
Falko Kellner wrote: > Hello, > > in current svn rev 10455 the openvrml plugin loading a vrml file > containing group nodes segfaults, because a node.get() is used > instead of a node.release() in convertvrmlnode(). > > Also, using absolute paths on linux systems is broken: osgviewer > myfile.wrl works osgviewer /home/fkellner/myfile.wrl file not found. Falko, your patch seems to be right, because, indeed, we are loading files now, not URIs as before. However, then the Windows code path has to be changed to - the same problem will occur on Windows. The reason for the #ifdef is because on Windows the absolute path starts with colon, not slash (after removal of the drive letter). > > I compiled openvrml without javascript/spidermonkey/mozilla etc, > maybe this is the reason why any file path starting with file:// is > not working on my specific system. No, that has nothing to do with it. The current parser loads the file from an open fstream and the fstream constructor on line 194 does not understand URIs. That is the source of the issue, I believe. > > Anyways, following patch solved both problems for me. complete file > attached. I changed one occurence of node.get() to node release and > dropped the special handling of absolute file paths on linux. It is not clear to me why changing get() for release() solves your crash. Releasing the smart pointer copies the underlying pointer into a temporary and returns that, resetting the original pointer to 0, whereas get() returns the underlying pointer directly. One way or another, the same value is returned. So if the code was crashing, this change has likely only masked the crash for you. Could you post the file where the code crashes? Or at least a stack trace? Regards, Jan -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (GNU/Linux) Comment: Using GnuPG with Mandriva - http://enigmail.mozdev.org iD8DBQFKW5DIn11XseNj94gRApCtAJwMmghj9vQs50lupeG74ck1WUju1ACgs4cX NFl2Rb5PqD0s8c5ywrYwbsc= =SZdb -----END PGP SIGNATURE----- _______________________________________________ osg-submissions mailing list [email protected] http://lists.openscenegraph.org/listinfo.cgi/osg-submissions-openscenegraph.org
