Ogre and Qt crash on exit

martinglish

24-02-2009 13:43:41

Hi,

I have created an application that embeds Ogre in a Qt Gui using PyQt4 and Python-Ogre and it all works well until the main window of the application is closed by the user at which point I get a crash. I have narrowed it down to the shutdown call in ogre.Root. I am guessing it is something to do with the fact that the target render window has gone away. The app is running on Windows, but it doesn't seem to make any difference which renderer I use.

Any ideas?

Thanks

dermont

24-02-2009 14:27:23

Maybe you could post a simple example that demonstrates the problem. I seem to recall having a similar problem with multiple Qt/Ogre render windows in a splitter. If I recall correctly I added an ugly hack in the QtOgre class to keep a reference to root to allow correct order of deletion, e.g:

self.root = ogre.Root.getSingletonPtr()