简体   繁体   中英

Motorola MC65 - Windows Mobile 6.5 kills my app after resuming

My MC65 Windows Mobile 6.5 device kills my .NET CF 3.5 app after resuming from sleep mode. The app is normally running, the device is going to sleep mode or I press the power button. Then I press the power button again, the device wakes up but me app is no longer visible on screen not in Task Manager. I can't find any logs in my application log, no execeptions etc. Is Windows Mobile somehow killing without any traces apps that uses lots of resources? I observer that if the device is plugged to charger, this situation does not happen.

What may be the reason? How to prevent it?

Although Windows Mobile may kill applications if the resources getting low and the application does not react on WM_HIBERNATE messages, this will not be the cause for your current setup.

An application will disappear from screen if it is minimized/hidden. This may also happen, if another app comes to foreground and is closed later. The window stack is then changed and your app is not in foreground any more.

An app may crash on a suspend/resume cycle if it accesses resources that will be suspended when the device enters suspend state. These resources may be network connections or volume (storage) resources. What is being suspended during a suspend depends on the Power Management settings. A network may be suspended to save power or a mounted volume (storage card) may be unloaded (although this should not be the case with actual devices).

So, either your app is using a network connection that is suspended and your app is not robust against network changes or, as stated in the notes, the device does unload the storage card driver during suspend/resume. For the later either move your app to the device storage or contact the vendor for a another power management profile, where external storage is maintained during suspend/resume.

This causes when your application and its supported files might be on Storage card. Move your application and all files to another storage eg: Application folder. Follow the link for more detail: https://social.msdn.microsoft.com/Forums/en-US/f0fc4eae-dcaa-402d-b76f-5d737d3a4267/wm-65-app-crashs-when-power-button-was-pressed-twice-to-turn-on-the-display?forum=windowsmobiledev

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM