Darwinbots Forum
Code center => Darwinbots Program Source Code => Topic started by: Botsareus on August 15, 2011, 02:47:35 PM
-
Numsgil, I know that when a program hangs running from the vb debugger, after it stops hanging vb is on top of the active window that hanged.
My qustion is: If I compile the program and it hangs on windows7, will it switch to the desktop? or will it just resume after it stoped?
-
If by "hang" you mean that it no longer responds to user input (because it's busy doing CPU work), you'll get a "this program has stopped responding" windows message.
If by "hang" you mean it crashed, you'll get a "this program has performed an illegal operation" windows message.
-
err... no, I mean it is doing like heavy cpu work for about 3 seconds and then it is fine. I would of got "this program has stopped responding" if I was running it from the debugger as well...
Oh well, when the time is right I will test it and know...
-
err... no, I mean it is doing like heavy cpu work for about 3 seconds and then it is fine. I would of got "this program has stopped responding" if I was running it from the debugger as well...
Right, this is the first one I mentioned. If you don't call DoEvents periodically in VB6 (a variety of other languages have other mechanisms), you're not responding to messages Windows is sending you, and windows will assume you've hung. You need to process the messages so windows still says you're responsive. If windows thinks you're stuck you'll get the "this program is unresponsive" windows error.
-
:wacko: no, this was a vb bug. The program was unresponsive for too short of a time to cause a crash. Like you say, If windows thinks you're stuck you'll get the "this program is unresponsive" windows error. I am NOT getting an error. Basically vb freaks out and the window focus literally switches from darwinbots to the vb dev screen. I hope the program will behave more normally when compiled...
BTW, I hope you are not trying to say that a program is more likely to crash from unresponsiveness if I compile it into an exe.
-
BTW, I hope you are not trying to say that a program is more likely to crash from unresponsiveness if I compile it into an exe.
It's not more or less likely. If you don't handle windows messages you'll get the hang message.
-
I was able to effectively emulate the bug. When I compiled it, it was fine...
Thanks anyway.