[osg-users] Bug in ReaderWriterPFB

Anthousis Andreadis anthousis at gmail.com
Wed Jan 23 04:28:33 PST 2008


Hello,

i have found the follwing bug in the current stable release.

If you try to load the same .pfb file twice (or even 2 pfb files that 
have the same geometry but differ on materials) you get a segmentation 
fault.

The fix for this bug that i have tried and worked is the following:

---------------------------------------------------------------------------------------------------
//                root->ref();                                   -- 
Original Code causing the bug
                osg::Node* node = converter.convert(root);
                pfDelete(root);                                -- the 
addition
//                root->unrefDelete();                     -- Original 
Code causing the bug
                return node;
---------------------------------------------------------------------------------------------------

You can try it and check that this works.
(In that case pls remember to transfer the change to the upcoming stable 
releases)

Thanks in advance
Anthousis Andreadis



More information about the osg-users mailing list