Re: strnage VS behavior
- From: "Tom Serface" <tom.nospam@xxxxxxxxxxxxx>
- Date: Thu, 3 Apr 2008 10:07:10 -0700
I don't think this is your fault. I get the same message in an application I have that doesn't even try to trap the keys. I think Windows or the debugger is using F12 to cause an interrupt into the debugger. Maybe you should try running in release mode and see if it works there? Or use a Shift+key.
This could be a bug in MFC somewhere too since the message I get says there is a corruption in the heap and it indicates a bug in my program, but this simple program never tried to catch any keystrokes on it's own. That's not much help, but at least you're not alone. If I run the same program in release mode it ignores the F12. I don't know if yours will catch it or not, but you could quickly test with a message box popup.
Tom
"asellon" <patriot92@xxxxxxx> wrote in message news:yf6Jj.80344$497.72495@xxxxxxxxxxxxxxx
Well.. after screwing around with this stupid thing for the better part of the morning, I am stumped.
Here is the problem. I have a project that catches the OnKeyDown in the CView. As I am adding functionality, more items will go in the switch statement to respond to the keys, but I had 3 in there. I added VK_F12 and set it to open a modaless dialog box. I used Joe's modaless essay to design the barebones functionality and get it working.
build and debug run.... push F12 and it a dialog comes up that says "suchandsuch.exe has triggered a breakpoint"
I click ok.
then I get the dialog box about break or continue.
if I break... it dies there.
if I continue... the modaless dialog comes up.
So I thought... try to catch the exception. try, catch does not work. GetLastError after every single call doesn't work.
then I placed breakpoints at every line inside the portion of the switch statment that handles VK_F12. come to find out, the program is throwing this error at random places in there. it behaves like the F12 key is doing something outside of my program as well in the debugger that is breaking the code flow or some such thing.
I think fine, I will pick a different key. I put VK_F10 in place of VK_F12(meaning I REMOVED VK_F12 completely)
recompile. Run in debug. F10 does nothing. hmmm..... Press F12. BAM. the code acts like I naever changed it. I look at the code... there is NO F12 in it. yet it still catches F12 and goes into the error sequence I described above
I also thought I might have done the modaless dialog incorrectly, so I switched it to modal. no dice... STILL same problem.
Yet I run the thing in release mode and it is all fine.
another thing I noticed... my VS2005 will in fact debug a release version. I remember it used to throw some message about "You can't load debug symbols" or something when you pressed F5 to run iin release... but now it just acts like it is in debug mode and runs.
I tried to remove precompiled headers, but that was too much hassle so I switched it to create precompiled headers instead of the use precompiled headers option.
still nothing.
when I press F12, it throws this "....breakpoint" message at different places inside if the OnKeyDown handler(meaning the instruction pointer is randomly placed in there)... yet all other keys I have set up work just fine regardless. no problems
I cleaned the project. I tried to exorcise the project. nothing.
any ideas?
the application is an SDI application written in VS2005 on XP. I have a single DLL linked in that I created which is a rendition of Joe's multithreaded sockets code. this application creates 2 sockets connected to two different servers and then passes info back and forth to both of them. All of that has been working fine for much longer than today. I am using the standard CView because the entore window area is custom drawn and there are no windows controls on the client area.
Joe... if you read this, I can send you the entire project and you can rip it to shreds if you wish.
so, I just need some help here. rather frustrated. thanks.
.
- References:
- strnage VS behavior
- From: asellon
- strnage VS behavior
- Prev by Date: Re: Loading a .dll in ActiveX
- Next by Date: Re: How to display png file in toolbar
- Previous by thread: Re: strnage VS behavior
- Next by thread: Re: strnage VS behavior
- Index(es):
Relevant Pages
|