Re: how to debug this problem?
It might help to know what you've tested so far. If it were me, I'd
breakpoint at the call that makes your application okay when you comment it
out. Are all your parameters as expected? Is the object the method called on
and the current this pointer as valid? Then step through what you can, or
try and determine if your code is getting called from that method. Look for
anything that might be wrong.
Also, when you get the error and you break, what line does it take you to?
What does that code look like?
--
Jonathan Wood
SoftCircuits
http://www.softcircuits.com
"Ian" <Ian00Bell@yahXX.com> wrote in message
news:dzq3g.16953$Vi5.207949@wagner.videotron.net...
My application is generating an exception and, in this case, I don't
really
know how to begin debugging it. Please note I have a reasonable amount of
experience using the debugger.
My application records and displays data in real time. There are several
events that the application responds to which switches it to a non-real
time
display of the data (data continues to be recorded in the background).
One
of these events is clicking on the horizontal scroll bar. Everything
works
well until the horizontal scroll bar is clicked. This part of the
application use to run without problem any apparent problems. One of 2
problems now occurs:
Problem 1
----------
An exception is generated with the following information: "First-chance
exception at 0x00379b11 in MyApplication.exe: 0xC000001D: Illegal
Instruction". The stack trace at this point resembles the following:
00379b11()
uxtheme.dll! ...
uxtheme.dll! ...
uxtheme.dll! ...
uxtheme.dll! ...
uxtheme.dll! ...
user32.dll! ...
user32.dll! ...
user32.dll! ...
user32.dll! ...
user32.dll! ...
user32.dll! ...
mfc70ud.dll!CWnd::DefWindowProc( unsigned int nMsg=0x00000112, ... )
mfc70ud.dll!CWnd::WindowProc( ... )
mfc70ud.dll!AfxCallWndProc( ... )
mfc70ud.dll!AfxlWndProc( ... )
mfc70ud.dll!AfxlWndProcBase( ... )
user32.dll! ...
user32.dll! ...
user32.dll! ...
user32.dll! ...
ntdll.dll! ...
user32.dll! ...
uxtheme.dll! ...
uxtheme.dll! ...
uxtheme.dll! ...
uxtheme.dll! ...
user32.dll! ...
user32.dll! ...
user32.dll! ...
user32.dll! ...
user32.dll! ...
mfc70ud.dll!CWnd::DefWindowProc( unsigned int nMsg=0x000000a1, ... )
mfc70ud.dll!CWnd::WindowProc( ... )
mfc70ud.dll!AfxCallWndProc( ... )
mfc70ud.dll!AfxlWndProc( ... )
mfc70ud.dll!AfxlWndProcBase( ... )
user32.dll! ...
user32.dll! ...
user32.dll! ...
user32.dll! ...
mfc70ud.dll!AfxInternalPumpMessage() ...
mfc70ud.dll!CWinThread::PumpMessage() ...
mfc70ud.dll!CWinThread::Run() ...
mfc70ud.dll!CWinApp::Run() ...
mfc70ud.dll!AfxWinMain( ... )
MyApplication.exe::wWinMain( ... )
MyApplication.exe::wMainCRTStartup()
kernel32.dll! ...
My application responds to the horzontal scroll bar click by calling the
function 'pMyView->SetScrollInfo( SB_HORZ, ... ) - if this function call
is
commented out/deleted, the error exception does not occur.
The first argument to 'AfxCallWndProc' is a pointer to CWnd which
corresponds to my CView derived class. Other than this, there is no
reference to any of my own code. The exception always appears to occur in
UXTHEME.DLL.
Problem 2
----------
After the horizontal scroll bar is clicked on, my application looses focus
(i.e. it does not respond to mouse clicks over any of the window area).
The
work around solution is to click on another application and then click on
my
application - this returns focus to my application. This may occur
several
times in a row (i.e. click on horizontal scroll bar, loose focus, click on
another application, click on my application), at which point, problem #1
occurs.
I really don't have a good idea of how to begin debugging this problem
other
than removing 1 section of code at a time from my application and then
testing to see if the problem disappears. I would appreciate any
suggestions on approaches to debugging this problem. The application is
being run in debugging mode using MS VS 2002 C++, WinXP Pro. For what
its
worth, I am waiting for delivery of VS Net 2005 - although I do not see
how
this would make a difference from the point of debugging.
A big thanks to all who respond.
Ian