Thanks Anders, the model allowed me to reproduce the problem and apply the fix ( I also cleaned up surrounding code). These changes are now in SVN.
On 2/28/07, Anders Backman <[EMAIL PROTECTED]> wrote:
Sure, I have attached the files. /Anders On 2/28/07, Robert Osfield <[EMAIL PROTECTED] > wrote: > HI Anders, > > Could you send the .x files that were causing problem, I'm currently > reviewing your fix and am not sure its the right way to tackle the > crash. > > Cheers, > Robert. > > On 2/19/07, Anders Backman <[EMAIL PROTECTED]> wrote: > > At line 247 there is what seems to be a bugin the DirectX loader > > > > First there is a check that a string is not empty: > > > > if (token.size() == 0) > > continue; > > > > Then the second character is accessed, but in the previous check there is > > nothing that claims this to be true. > > > > 247: Material * material = _obj->findMaterial(token[1]); > > > > > > If this line (247) is changed to Material * material = > > _obj->findMaterial(token[0]); > > > > instead it works just fine with the .x models I have (not that many though, > > so its not a complete test). > > Although, the code should slightly more robust. > > > > /Anders > > > > -- > > > > > > ________________________________________________________________ > > Anders Backman Email: [EMAIL PROTECTED] > > HPC2N/VRlab Phone: +46 (0)90-786 9936 > > Umea university Cellular: +46 (0)70-392 64 67 > > S-901 87 UMEA SWEDEN Fax: +46 90-786 6126 > > http://www.cs.umu.se/~andersb > > _______________________________________________ > > 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/ > -- ________________________________________________________________ Anders Backman Email: [EMAIL PROTECTED] HPC2N/VRlab Phone: +46 (0)90-786 9936 Umea university Cellular: +46 (0)70-392 64 67 S-901 87 UMEA SWEDEN Fax: +46 90-786 6126 http://www.cs.umu.se/~andersb _______________________________________________ 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/
