-
May 12th, 2013, 10:37 PM
#1
VB6 IDE freezes on breakpoint
I am in real trouble!
I put a breakpoint on a line of code. When the execution reaches that breakpoint it stops executing and IDE enters "break" mode. IDE freezes and I need TaskMgr to kill VB6. All toolbar icons and menu line functions are dead.
It happens in a window called by the main window. I can not step through the following statements after the breakpoint. Strangely, F8 will still allow me to step through them.
I am running on Windows 7 Home 64 bit. So, I went back to my trustworthy XP 32 bit and everything worked OK for a short while. Then the same behavior occurred on the Windows XP. I reloaded Visual Studio w/Service Pack 6 on both. Same problem. I even wiped out the XP machine completely and reloaded XP with Service Pack 3 plus all the drivers and Visual Studio. Not an easy task. Same result.
Since the problem exists on both computers I deduce it is not Windows nor any of the updates.
I am really stuck on this one. Can anyone please offer some suggestions??
Thanks!
Peter
-
May 13th, 2013, 10:19 AM
#2
Re: VB6 IDE freezes on breakpoint
I can not step through the following statements after the breakpoint. Strangely, F8 will still allow me to step through them.
That statement doesn't make much sense. F8 is the method you would use to step through the code but here you say that you can not step through the code but then that you can step through the code using F8.
What do you mean when you say the IDE freezes? Clearly if F8 still works it is not frozen.
You have not shown any code and your description is at best confusing so not much can be offered in terms of help given the current info.
Always use [code][/code] tags when posting code.
-
May 15th, 2013, 09:39 AM
#3
Re: VB6 IDE freezes on breakpoint
Originally Posted by DataMiser
What do you mean when you say the IDE freezes? Clearly if F8 still works it is not frozen.
.
Thank you for the response.
When I say "freeze" I mean that all the IDE menu items will not open, all the icons on the toolbars do not respond, the upper right X button to exit does not respond.
I had to use TaskMgr to kill visual basic until I discovered that F5 and F8 still do respond. They are the only keys that do respond. I still can not see the values in any variables because the menu line Debug/Add Watch does not respond.
This makes testing a real pain.
My habit in testing is to click on the Step Into icon on the Debug toolbar to step through the statements. I can't do this when IDE freezes.
This program has 37 forms and 8 modules. No class modules. The first form executed is a Welcome window which calls a Main form. The Main form calls many other forms. Putting a breakpoint on these two forms work as they should. It is when a breakpoint is put on a statement in the forms the Main one calls is when IDE freezes when exeution hits that spot.
It makes no sense.
So far, I have reloaded Visual Studio on both my Win 7 and Win XP computers several times. Same result. I even wiped out the C drive on the XP and rebuilt Windows, drivers, VB6, etc. Same result.
I even have smaller programs and the same result occurs on any form the first form calls. Breakpoints on the first form works but on a window the first calls, hitting a breakpoint on a called window freezes IDE (except for the F5 and F8 keys). It does not matter if the called window is done with VBModal or VBModeless.
So far, I have spend the last three weeks on this and I am a loss to know what to try next.
Any help, suggestions are greatly appreciated!!
Peter
-
May 15th, 2013, 09:51 AM
#4
Re: VB6 IDE freezes on breakpoint
Are you using any sub classing?
Always use [code][/code] tags when posting code.
-
May 15th, 2013, 11:45 AM
#5
Re: VB6 IDE freezes on breakpoint
Sounds like a bad version on your VB6 CD. I'd try a different version.
-
May 15th, 2013, 02:58 PM
#6
Re: VB6 IDE freezes on breakpoint
Originally Posted by DataMiser
Are you using any sub classing?
None.
Peter
-
May 16th, 2013, 04:20 AM
#7
Re: VB6 IDE freezes on breakpoint
Originally Posted by dglienna
Sounds like a bad version on your VB6 CD. I'd try a different version.
or ...
you're in a loop that has no exit conditions and there are no lines of code "DoEvents".
an example would be this (querying a database)
Do While Not rs.EOF = True
do something
Loop
here is missing rs.MoveNext so is a loop without the possibility of reaching condition.
put the piece of code here, a few lines before and after some.
Last edited by nexusm; May 16th, 2013 at 04:24 AM.
-
May 19th, 2013, 01:48 PM
#8
Re: VB6 IDE freezes on breakpoint
I think I found the problem!
In my program, I have a Preferences form. It consists of 2 command buttons and 27 check boxes. It was one of the forms where a breakpoint was put on the first statement and IDE froze when execution hit that breakpoint.
I removed the form and created a new form and put the 2 command buttons and checkboxes on it. I then copied all my statements from the old form and inserted it in the new form. Behold! It worked.
It worked for a couple of days then IDE froze again.
By a fluke, the execution froze in a module that allows the mouse wheel to work when the cursor is positioned over a MSFlexGrid control. Fortunately, I had built into the program the ability to defeat this feature when a particular command line parameter is used.
So, I added the parameter to the command line to defeat the mouse wheel scrolling. All breakpoints work as they should.
I got the mouse wheel scrolling module from http://www.vbforums.com/showthread.php?t=388222
Just now, I went to this site and saw a note which reads:
"These codes use sub classing which can cause your IDE to crash if your code is incorrectly ended (e.g. via the stop button)."
I fail to understand what is meant by "incorrectly ended". It does not appear to apply to my program. Must be in the mouse wheel module.
DataMiser ask me if I used sub classing in a previous reply. I said no. But this mouse wheel module apparent does.
Most strange behaviour!
This is the second time in the 15 years I have been burned on third party software routines.
So, it was the mouse wheel module even though it was not used in the Preferences window.
After a month of aggravation, IDE is no longer freezing!
-
May 19th, 2013, 11:19 PM
#9
Re: VB6 IDE freezes on breakpoint
I fail to understand what is meant by " incorrectly ended". It does not appear to apply to my program. Must be in the mouse wheel module.
That means if your program is ended in any way other than the proper execution of the code closing forms and classes and especially sub classes.
Pressing the stop button in the IDE causes the code to exit without cleaning up properly and can cause a real mess in such a case as can the End statement. In short if you do not understand sub classing and the problems it can cause then you really should not use it.
Always use [code][/code] tags when posting code.
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|