PocketMatrix forums

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

EasyCE 2.0 Assertion failed when HP 568 power off

Has anyone using EasyCE 2.0 (or overloaded) run into this problem...

Using HP Jornada 568... if my app is running and the display turns off (either OS shuts off or I press power button) I get an assertion failure when it comes back on

I'm assuming it's trying to write to memory that it doesn't have access to when the screen is off but am not sure how to prevent it from doing it

Dan posted some good info on checking if we lost focus and going in a pause state but it didn't seem to work when I tried that...
draklava · 21 Jun 2002, 16:37 UTC — many getsecondary calls
I am calling getsecondary() in a lot of functions (to draw various UI elements and stuff)

Is it possible that if this gets called when power is off it will cause an exception? Is it better to call it once and pass the pointer around?
Getsecondary() is already passing a pointer around, so it makes no sense to do that yourself. One thing that I modified in the Overloaded libraries: If your window is not the foreground window (this may be the case when you power your device up), don't draw to the physical display. Basically, all you have to do is add a 'return' to the 'update' function when your app looses focus.