Coming out of StandBy application crashes
-
My MSVC 6.0 MFC application crashes for a few people when they come out of StandBy mode when its running. I've never been able to reproduce this myself but I'm wondering what areas to look at that could cause a crash at this time. Here's the Dr. Watson log from the thread that crashes below. It looks at though the code just didn't get loaded again. Any ideas or suggestions on how to debug something like this?
*----> State Dump for Thread Id 0xec4 <----* eax=00000001 ebx=00ca2d00 ecx=0000000a edx=7c90eb94 esi=0669daa0 edi=00000000 eip=0124b3c7 esp=0189ff60 ebp=0189ff80 iopl=0 nv up ei pl zr na po nc cs=001b ss=0023 ds=0023 es=0023 fs=003b gs=0000 efl=00000246 function: No prior disassembly possible 0124b3c7 ?? ??? 0124b3c9 ?? ??? 0124b3cb ?? ??? 0124b3cd ?? ??? 0124b3cf ?? ??? 0124b3d1 ?? ??? 0124b3d3 ?? ??? 0124b3d5 ?? ??? 0124b3d7 ?? ??? FAULT ->0124b3c7 ?? ??? Error 0x00000001 0124b3c9 ?? ??? 0124b3cb ?? ??? 0124b3cd ?? ??? 0124b3cf ?? ??? 0124b3d1 ?? ??? 0124b3d3 ?? ??? 0124b3d5 ?? ??? 0124b3d7 ?? ??? 0124b3d9 ?? ??? 0124b3db ?? ??? *----> Stack Back Trace <----* WARNING: Stack unwind information not available. Following frames may be wrong. ChildEBP RetAddr Args to Child 0189ff5c 000d0670 00000218 0000000a 00000000 0x124b3c7 0189ff80 77c3a3b0 00bda558 00000000 7c9105c8 0xd0670 0189ffb4 7c80b50b 00ca2d00 00000000 7c9105c8 msvcrt!endthreadex+0xa9 0189ffec 00000000 77c3a341 00ca2d00 00000000 kernel32!GetModuleFileNameA+0x1b4 *----> Raw Stack Dump <----* 000000000189ff60 70 06 0d 00 18 02 00 00 - 0a 00 00 00 00 00 00 00 p............... 000000000189ff70 69 79 6d 0d 79 04 00 00 - 8b 01 00 00 58 a5 bd 00 iym.y.......X... 000000000189ff80 b4 ff 89 01 b0 a3 c3 77 - 58 a5 bd 00 00 00 00 00 .......wX....... 000000000189ff90 c8 05 91 7c 00 2d ca 00 - 05 00 00 c0 8c ff 89 01 ...|.-.......... 000000000189ffa0 84 fb 89 01 dc ff 89 01 - 94 5c c3 77 d8 40 c1 77 .........\.w.@.w 000000000189ffb0 00 00 00 00 ec ff 89 01 - 0b b5 80 7c 00 2d ca 00 ...........|.-.. 000000000189ffc0 0
-
My MSVC 6.0 MFC application crashes for a few people when they come out of StandBy mode when its running. I've never been able to reproduce this myself but I'm wondering what areas to look at that could cause a crash at this time. Here's the Dr. Watson log from the thread that crashes below. It looks at though the code just didn't get loaded again. Any ideas or suggestions on how to debug something like this?
*----> State Dump for Thread Id 0xec4 <----* eax=00000001 ebx=00ca2d00 ecx=0000000a edx=7c90eb94 esi=0669daa0 edi=00000000 eip=0124b3c7 esp=0189ff60 ebp=0189ff80 iopl=0 nv up ei pl zr na po nc cs=001b ss=0023 ds=0023 es=0023 fs=003b gs=0000 efl=00000246 function: No prior disassembly possible 0124b3c7 ?? ??? 0124b3c9 ?? ??? 0124b3cb ?? ??? 0124b3cd ?? ??? 0124b3cf ?? ??? 0124b3d1 ?? ??? 0124b3d3 ?? ??? 0124b3d5 ?? ??? 0124b3d7 ?? ??? FAULT ->0124b3c7 ?? ??? Error 0x00000001 0124b3c9 ?? ??? 0124b3cb ?? ??? 0124b3cd ?? ??? 0124b3cf ?? ??? 0124b3d1 ?? ??? 0124b3d3 ?? ??? 0124b3d5 ?? ??? 0124b3d7 ?? ??? 0124b3d9 ?? ??? 0124b3db ?? ??? *----> Stack Back Trace <----* WARNING: Stack unwind information not available. Following frames may be wrong. ChildEBP RetAddr Args to Child 0189ff5c 000d0670 00000218 0000000a 00000000 0x124b3c7 0189ff80 77c3a3b0 00bda558 00000000 7c9105c8 0xd0670 0189ffb4 7c80b50b 00ca2d00 00000000 7c9105c8 msvcrt!endthreadex+0xa9 0189ffec 00000000 77c3a341 00ca2d00 00000000 kernel32!GetModuleFileNameA+0x1b4 *----> Raw Stack Dump <----* 000000000189ff60 70 06 0d 00 18 02 00 00 - 0a 00 00 00 00 00 00 00 p............... 000000000189ff70 69 79 6d 0d 79 04 00 00 - 8b 01 00 00 58 a5 bd 00 iym.y.......X... 000000000189ff80 b4 ff 89 01 b0 a3 c3 77 - 58 a5 bd 00 00 00 00 00 .......wX....... 000000000189ff90 c8 05 91 7c 00 2d ca 00 - 05 00 00 c0 8c ff 89 01 ...|.-.......... 000000000189ffa0 84 fb 89 01 dc ff 89 01 - 94 5c c3 77 d8 40 c1 77 .........\.w.@.w 000000000189ffb0 00 00 00 00 ec ff 89 01 - 0b b5 80 7c 00 2d ca 00 ...........|.-.. 000000000189ffc0 0
Wow :~ Two ideas come to mind. I see msvcrt!endthreadex in the call stack. If that is at all reasonably correct, then maybe you would want to catch the entrance to the standby mode within your application and prevent your own application from terminating or leaving any threads once standby is about to be 'entered' and then you can leave once you have resumed. Also, device states might not be identical coming out of standby. Perhaps your worker thread is ineracting with a device which has different state coming out of standy? Just some ideas, hope they help.