PocketMatrix forums

A read-only archive of the PocketMatrix forums (2001–2014). Posting and accounts are closed.

PF 0.7 AV on exit in debug mode

Hi!
While debuging my app on pocketpc with evc4 debugger i encountered a strange behavor of PF. While debugger running it crashes on exit on Access Violation

void Game::Shutdown()
{
GameEnd();

m_input.reset();
m_display.reset();

DestroyWindow(); // AV here
}

is there somthing wrong?
I had many errors of this kind on access violation.
Some of them emerged in VC 6.0 debug mode, some of them only running app on device.
But all of them was on wrong memory allocation/deallocation (example: allocating memory for pointer without deleting previously allocated for that pointer, or some similiar stuff with TCHAR* strings).

Maybe problem isn't in Shutdown()? :wink:
A long time ago, I was having a crash at exit because I was calling shutdown() with the display 'open'.

i.e. if you have done a getDisplay, also do an ->update before shutting down. Or move the shutdown call to the bottom of the gameloop.
I think, if it was a mem leak it sould crash in PC version as well, but it don't. I'll check display device update.