Hi,
My app is running and continually polling the sate of the serial port to determine whether the attached device is turned on or not, and when the attached device is turned on then data is retrieved from the device quite happily.
The problem I am having is that, when turning on the device, I occasionally will get an unhandled exception that points to the
IsIdleMessage
part of
CWinThread::Run
, and no call stack.
Running a port monitor I am getting between 30 and 70 '0x00' bytes when switching on the device and the app crashes, but otherwise I'm getting no '0x00' bytes when running happily.
I have added a
TRY
,
CATCH_ALL
around each of my comport functions. I have critical sections around all the calls to comport functions and usage.
I have overridden the
CWinThread::Run
fn in my App, and still when it crashes there is no call stack.
Does anyone have any tips, or pointers to possible solutions that might cause the app to crash with no call stack?
I know there is not much to go on, but this is the call stack I am receiving
MyProg.exe!MyProgApp::Run() Line 373 + 0x11 C++
MyProg.exe!AfxWinMain(HINSTANCE__ * hInstance=0x00400000, HINSTANCE__ * hPrevInstance=0x00000000, char * lpCmdLine=0x00141f18, int nCmdShow=0x00000001) Line 49 + 0xb C++
MyProg.exe!WinMain(HINSTANCE__ * hInstance=0x00400000, HINSTANCE__ * hPrevInstance=0x00000000, char * lpCmdLine=0x00141f18, int nCmdShow=0x00000001) Line 25 C++
MyProg.exe!WinMainCRTStartup() Line 251 + 0x30 C
kernel32.dll!7c817077()
ntdll.dll!7c915ca7()
Hopefully someone can spot something meaningful in there.
TIA
Tony