Ok, I should explain that. The debug thing is a different problem and I think it's because of my dev environment: Eclipse-CDT/gcc on Ubuntu 12.04 64 Bit. I can start the app in debug mode, but in the moment when there's a bug and the focus is going from the app to the ide - I can't control mouse and keyboard anymore. All open programs are working fine (for example the chat message popups in the right corner are still working), but I can't do anything. Alt-Tab, Alt+F4, Str+Alt+Del. Nothing works. So I have to reboot.
But I think this is a different problem, not related to the problem of this thread.
The only thing I can see in the debug window after the "crash" is, that there's an error in OgreDistanceLodStrategy.cpp Line 61
Also, I tried some log messages before and after the codeblock I posted. And all of them were printed! So it seems that the delete is not the problematic code line. But if I do it without the delete, it works. That's crazy....
Maybe another hint: When the app crashes, these lines are missing in the ogre log:
Code: Select all
DefaultWorkQueue('Root') shutting down on thread 0x1e91b50.
DefaultWorkQueue('Root')::WorkerFunc - thread 0x21c07b0 stopped.
DefaultWorkQueue('Root')::WorkerFunc - thread 0x21c6450 stopped.
DefaultWorkQueue('Root')::WorkerFunc - thread 0x1f0ac50 stopped.
DefaultWorkQueue('Root')::WorkerFunc - thread 0x21c79b0 stopped.
*-*-* OGRE Shutdown
Unregistering ResourceManager for type Compositor
Unregistering ResourceManager for type Font
Unregistering ResourceManager for type Skeleton
Unregistering ResourceManager for type Mesh
Unregistering ResourceManager for type HighLevelGpuProgram
Uninstalling plugin: Octree Scene Manager
Plugin successfully uninstalled
Unloading library /usr/local/lib/OGRE/Plugin_OctreeSceneManager
Uninstalling plugin: Cg Program Manager
Plugin successfully uninstalled
Unloading library /usr/local/lib/OGRE/Plugin_CgProgramManager
Uninstalling plugin: GL RenderSystem
Unregistering ResourceManager for type GpuProgram
******************************
*** Stopping GLX Subsystem ***
******************************
Unregistering ResourceManager for type Texture
Plugin successfully uninstalled
Unloading library /usr/local/lib/OGRE/RenderSystem_GL
Unregistering ResourceManager for type Material
Btw: I user the NULL definition from stddef.h