16-10-2007 14:06:11

I am getting a crash after destroying a window. Not sure yet, if I made a mistake when porting to the new version of QuickGUI or if it is a bug in QuickGUI. Guess I will have to investigate more ...

This is the code, which creates the window:

QuickGUI::Sheet& Sheet = *GUI.getDefaultSheet();

QuickGUI::Size Size = Sheet.getSize();

d_Main = Sheet.createWindow();
d_Main->setDimensions (
QuickGUI::Rect (Size.width*0.05, Size.height*0.05, Size.width*0.9, Size.height*0.7));
d_Main->setUseBorders (false);
d_Main->setBringToFrontOnFocus (false);

Size = d_Main->getSize();

d_View = new tcg::container_view (Root,
static_cast<int> (Size.width), static_cast<int> (Size.height),
tco::container_registry::GetThis().GetContainer ("sys::inv"));

QuickGUI::Image *Image = d_Main->createImage();
Image->setDimensions (d_Main->getDimensions());
Image->setTexture (d_View->GetTexture()->getName());

And this is the call stack:

#0 005DBBE7 ZN8QuickGUI12VertexBuffer6updateEv() (C:\code\TinEngine\Core\Test\QuickGUI.dll:??)

#1 005C9191 ZN8QuickGUI13QuadContainer6renderEv() (C:\code\TinEngine\Core\Test\QuickGUI.dll:??)

#2 005C9282 ZN8QuickGUI13QuadContainer6renderEv() (C:\code\TinEngine\Core\Test\QuickGUI.dll:??)

#3 005B70BE ZN8QuickGUI10GUIManager18renderQueueStartedEhRKSsRb() (C:\code\TinEngine\Core\Test\QuickGUI.dll:??)

#4 65127B9A ZN4Ogre12SceneManager22fireRenderQueueStartedEhRKSs() (C:\code\TinEngine\Core\Test\OgreMain.dll:??)

#5 65127C87 ZN4Ogre12SceneManager35renderVisibleObjectsDefaultSequenceEv() (C:\code\TinEngine\Core\Test\OgreMain.dll:??)

#6 65134FD9 ZN4Ogre12SceneManager12_renderSceneEPNS_6CameraEPNS_8ViewportEb() (C:\code\TinEngine\Core\Test\OgreMain.dll:??)

#7 6A2D4A65 ZN4Ogre19TerrainSceneManager12_renderSceneEPNS_6CameraEPNS_8ViewportEb() (C:\code\TinEngine\Core\Test\Plugin_OctreeSceneManager.dll:??)

#8 64F30253 ZN4Ogre6Camera12_renderSceneEPNS_8ViewportEb() (C:\code\TinEngine\Core\Test\OgreMain.dll:??)

#9 651B2A96 ZN4Ogre8Viewport6updateEv() (C:\code\TinEngine\Core\Test\OgreMain.dll:??)

#10 650FA9B3 ZN4Ogre12RenderTarget6updateEv() (C:\code\TinEngine\Core\Test\OgreMain.dll:??)

#11 650FEEAB ZN4Ogre12RenderWindow6updateEb() (C:\code\TinEngine\Core\Test\OgreMain.dll:??)

#12 66F829C0 dllStopPlugin() (C:\code\TinEngine\Core\Test\RenderSystem_Direct3D9.dll:??)

#13 650FEE8D ZN4Ogre12RenderWindow6updateEv() (C:\code\TinEngine\Core\Test\OgreMain.dll:??)

#14 650F5DB2 ZN4Ogre12RenderSystem23_updateAllRenderTargetsEv() (C:\code\TinEngine\Core\Test\OgreMain.dll:??)

#15 65124E41 ZN4Ogre4Root14startRenderingEv() (C:\code\TinEngine\Core\Test\OgreMain.dll:??)

#16 0042240B tcf::engine::Invoke() (??:??)

#17 00406581 main() (??:??)


16-10-2007 17:35:42

QuickGUI::Size Size = Sheet.getSize();

I'm not used to using a type name as a variable name, is this allowed?

Are you destroying the window using:


Other than that, I don't see anything obvious.. from the call stack it looks like the window (which is a QuadContainer) may not have been removed from it's parent (which is a QuadContainer) and when trying to update the vertex buffer for rendering, tries to access the window container that isn't there.

I will step through window destructor to see if the container is being removed from its parent.


16-10-2007 18:00:43

QuickGUI::Size Size = Sheet.getSize();

I'm not used to using a type name as a variable name, is this allowed?

Yes, it is. As long as the type is in a different namespace.
I don't like it much either, but since I am using a convention, where a capital letter indicates a variable or a function, it just happens.

Are you destroying the window using: