[Solved]Debug Configuration Error with Tutorial

IngeniousMask

13-05-2007 21:18:03

I complied OgreNewt under the debug configuration and used its library, along with Ogre's debug .dll files, to compile the OgreNewt Tutorial. The .exe is placed in the bin\debug folder of the OgreSDK and correctly links to all the .dll files. The .exe runs fine, but when I exit the demo, I receive the error:

Unhandled exception at 0x00411e66 in OgreNewtTutorial.exe: 0xC0000005: Access violation reading location 0xdddddf25.

The debbuger points to the line M_debugNode->detachAllObjects() in ogrenewt_debugger.cpp.

if (m_debugnode)
{
m_debugnode->detachAllObjects();
if (m_debuglines) { delete m_debuglines; m_debuglines = NULL; }
m_debugnode->getParentSceneNode()->removeAndDestroyChild( m_debugnode->getName() );
m_debugnode = NULL;
}

I want to fix this error now, so when I start programming bigger applications I'm ensured that everything cleans up right.

IngeniousMask

13-05-2007 21:48:39

Whoops, I missed the answer at the end of the tutorial. All I had to do was add

OgreNewt::Debugger::getSingleton().deInit();

to my application deconstructor.