Dear all,
I've been dealing with a problem (probably due to a bug) with
osgWidget. If I tried to remove Window(s) from WindowManager not in
the reverse order as I insert them, I'll get a segmentation fault. My
debugger says the problem is in file WindowManager.cpp line 431.
for(Iterator w = begin(); w != end(); w++) {
Window* win = w->get();
win->_zRange = zRange;
win->update();
}
The value of win is NULL there. So the next _zRange assignment will
cause an error.
After I investigated further, seems WindowManager tries to assign an
_index to Window. This index should corresponds with the index in the
Group's _children. The problem arises when I delete any Window but the
last one, because the Window's _index is disrupted since I found no
_index rearrangement (cmiiw).
I found at least two functions in WindowManager that use this _index:
childRemoved() and resizeAllWindows(). The first one gets an index
(that should be the index in Group's _children) but uses it for
comparison with the incorrect Window's _index. The second function
uses the Window's _index to call Switch's getValue() which then use it
to get a value from its _values. There are also some other functions
in Window class that use this _index value.
FYI, I'm using OpenSceneGraph 2.8.0. I've checked the latest code in
the svn repo, but no changes there since 2.8.0.
any comments?
regards,
--
Iang-
http://fajran.web.id y!m: fajran
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org