crash when exiting the application

spillsome

04-09-2006 19:49:39

I am using the ogrenewt frame listener

and my application crash on the line m_debugnode->detachAllObjects() in the function hideLines


void Debugger::hideLines()
{
// erase any existing lines!
m_debugnode->detachAllObjects();
m_debuglines->clear();
}


The error message is :

Unhandled exception at 0x0042d34a in test6.exe: 0xC0000005: Access violation reading location 0xbf80221d.

Hansel

04-09-2006 19:55:55

Yo have to detach first all the bodies ;)

spillsome

05-09-2006 07:32:55

Yo have to detach first all the bodies ;)


It is actually the line m_debugnode->detachAllObjects(); that gives me an error, any ideas ?

walaber

05-09-2006 08:05:51

call Debugger::deInit() before exiting. that should fix it.

TrackGuy

07-09-2006 07:51:48

Hi Walaber,

I get the same error when exiting my program. Debugger::deInit() is called inside the destructor. Why do say it has to be called manually?
And at what position inside the application?

Would be nice if you could help here again ....

walaber

07-09-2006 16:46:43

you need to call it before your destroy your SceneManager, because it needs the SceneManager to destroy the Entity it uses to draw the lines onscreen, and also the SceneNode for that entity.

TrackGuy

12-09-2006 10:20:06

That helped! Thanx!