I have an issue with a few Windows CE 5.0 devices which are crashing virtually as soon as they resume from standby (suspend). I have condensed the issue down to about 15 lines of C++ to simply get wxWidgets to display a message box, and the problem will hit if I:
- Start the app
- Suspend the device (by this I mean pressing the red power button briefly)
- Resume the device
- Pressing the OK button in the message box title.
- BOOM
This problem manifested itself in many other ways before I condensed it down - on loading a bitmap, on scanning a barcode, all once it has been suspended, then resumed.
I am using the following:
- Windows CE 5.0 Professional (Motorola MC3090 device) (also WM 6.5 (MC55), CE 6.0 (MC3190))
- Visual Studio 2005 SP2
- wxWidgets 2.8.10
- Microsoft Windows CE 5.0 Standard SDK
The actual error that is displayed is sporadic and wide ranging, but mostly an access violation, typically near the start address of a function call (discovered this by suspending the device, resuming then attaching VS debugger on the device). Having done extensive homework on this, I've read some suggestions it may be some kind of heap corruption occurring. As long as the app doesn't suspend, it always works correctly across all correct combinations of SDKs and devices.
I have also tried the following SDKs:
- MS Pocket PC 2003 SDK
- Symbol Platform SDK for MC3000c50a
- Symbol Platform SDK for MC3000c50b
- Windows Mobile 5.0 SDK
- Windows Mobile 6.0 SDK
I have tested the following devices:
- MC3090 (Windows CE 5.0) - Same Problem
- MC55 (Windows Mobile 6.5) - Same Problem
- MC3190 (Windows CE 6.0) - Problem does not occur on this device with StandardSDK build
I have played excessively with the setup of wxWidgets, always making sure that I link the app with the correct corresponding SDK.
Here is the code that causes this problem:
#include "wx/wxprec.h"
class Application : public wxApp {
public:
virtual bool OnInit();
};
bool Application::OnInit() {
wxMessageBox(L"Test");
return true;
}
IMPLEMENT_APP(Application)
Anyone with some advice out there, I would be eternally grateful! Please also let me know if I have left out any important details.