FIX: Setting Add Watch May Cause GP Fault or UAE
ID: Q94292
|
The information in this article applies to:
-
Microsoft Visual Basic programming system for Windows, version 2.0
SYMPTOMS
You may encounter the error message, "Module has changed; must reset"
after which the program ends and returns to design mode. Setting a
watch point contributes to the problem. In one case, you may receive
the error and then get a general protection (GP) fault or an unrecoverable
application error (UAE).
In general, this problem occurs under the following conditions:
- A global, form, or module-level watch point is set.
- The watch point refers to a Visual Basic object such as a form or
control.
- The watch point is evaluated from break mode when a modal form is
showing.
STATUS
Microsoft has confirmed this to be a problem in Microsoft Visual Basic
version 2.0 for Windows. This problem was corrected in Microsoft Visual
Basic version 3.0 for Windows.
MORE INFORMATION
The following steps reproduce the problem:
- Run Visual Basic, or from the File menu, choose New Project (ALT, F, N)
if Visual Basic is already running.
- From the File menu, choose New form (ALT, F, F). Form2 will be created.
- Add the following code to the Form_Click event procedure of Form1:
Sub Form_Click ()
Form2.Show 1 '** Show the form modal
End Sub
- From the Debug menu, choose Add watch (ALT, D, A).
- From the Add Watch dialog, add the expression Forms.Count, select
the Form/Module context option for Form1.Frm, and choose the OK
button.
- Add the following code to the Form_Click event procedure of
Form2, and press the F9 key to set a break point on the End Sub
statement.
Sub Form_Click()
Form2.Hide
End Sub '** Set the break point on this line, press F9
- From the Run menu, choose Start (ALT, R, S) or press the F5 key to run
the sample program.
- Click in the Form1 form. Form2 will be displayed.
- From the Debug menu, choose Break (ALT, D, K) or press CTRL+BREAK
to break execution. This causes the watch expression to be evaluated.
- From the Run menu, choose Continue (ALT, R, C) or press the F5 key
to continue.
- Click in the Form2 form. The click event of the Form2 form will cause
execution to break.
- From the Debug menu, choose Single step (ALT, D, S) or press the F8
key to single step.
- Repeat step 12 until you see the "Module has change; must reset" error
message.
- Choose the OK button.
This results in a GP fault or UAE. In the case of a GP fault, the GP fault
normally occurs at address 0001:7F8A in module VB.EXE.
This problem also occurs if you select a global-level watch context in
step 5. However, the problem doesn't occur if you select a procedure-level
watch context in step 5.
To avoid the problem, either don't set a watch point on an expression that
contains a Visual Basic object or don't break execution while a modal form
is being shown.
Additional query words:
buglist2.00 fixlist3.00 2.00 3.00 GPF
Keywords :
Version : WINDOWS:2.0
Platform : WINDOWS
Issue type :
|