Re: [osg-users] Infinite loop at osgt loading

2011-06-30 Thread Wang Rui
Hi J-S and all, I've put some marks in the matchString() method and now I've collected some information. While unget() command is executed in the loop, the rdbuf()-sungetc() returns 'eof' somehow, and the istream is thus set to badbit. The reading process will then halt because the entire stream

Re: [osg-users] Infinite loop at osgt loading

2011-06-30 Thread Wang Rui
Some additional information: in_avail() just returns 4096 when unget() fails. Is it possible that the stream buffer is full? 2011/6/30 Wang Rui wangra...@gmail.com: Hi J-S and all, I've put some marks in the matchString() method and now I've collected some information. While unget() command

Re: [osg-users] Infinite loop at osgt loading

2011-06-29 Thread Jean-Sébastien Guay
Hi Andreas, With OpenSceneGraph-3.0.0, loading OpenSceneGraph-Data-3.0.0/spaceship.osgt in osgviewer hangs in an infinite loop in AsciiInputIterator::advanceToCurrentEndBracket. I haven't been able to find the cause for this, maybe someone more knowledgeable in these new formats understands

Re: [osg-users] Infinite loop at osgt loading

2011-06-29 Thread Andreas Ekstrand
Hi J-S, Thanks for the confirmation. I'm also on Windows 7 64 bit, VC++ 2008 Express. It hangs in both x86 and x64 builds. It seems readString( passString ) always returns the empty string for the osg::Geometry with UniqueID 8 and that the readObjectFields for this geometry didn't manage to

Re: [osg-users] Infinite loop at osgt loading

2011-06-29 Thread Wang Rui
Hi Andreas, The bug seems to be caused because of the modification in rev 12669, which uses unget() instead of seekg() to solve the problem of unix file endings. Roll back and convert the .osg file to .osgt under Windows and you may view it smoothly. But the trunk version could neither view these

Re: [osg-users] Infinite loop at osgt loading

2011-06-29 Thread Jean-Sébastien Guay
Hello Wang Rui, The bug seems to be caused because of the modification in rev 12669, which uses unget() instead of seekg() to solve the problem of unix file endings. Roll back and convert the .osg file to .osgt under Windows and you may view it smoothly. But the trunk version could neither view

Re: [osg-users] Infinite loop at osgt loading

2011-06-29 Thread Wang Rui
Hi J-S 2011/6/29 Jean-Sébastien Guay jean-sebastien.g...@cm-labs.com: But you never say what exactly the problem is that unget() causes... Since cow.osgt seems to work, what is different in these files? Don't mind. I'm a little curious about the problem, too, as cow, cessna and glider all