RE: Intermittent Form_Unload hangs

From: simmonda (simmonda_at_discussions.microsoft.com)
Date: 01/18/05


Date: Tue, 18 Jan 2005 02:11:04 -0800

Has this issue been resolved as I have been trying to track down a problem
that appears very similar. At the moment it appears that having nested
usercontrols which bubble an event to the form which then unloads may be
leading to this behaviour. See my post from 2005-01-13.

Do you have a similar structure?

Andrew

"Brad Smith" wrote:

> I have a VB 6 SP5 app deployed in a couple hundred locations as well as
> running on a terminal services server at our facility. I have one single
> form which does the following:
>
> Public Sub ShowFormView(o As clsSearch)
> Set oSearch = o
> Me.Show vbModal
> DebugLog "Unloaded Form"
> End Sub
>
> Private Sub Form_Unload(Cancel As Integer)
> Set oSearch = Nothing
> DebugLog "Unloading Form"
> End Sub
>
> I don't have any code in the Terminate or Query_Unload events.
> Intermittently the app will hang in a processor loop unloading just this one
> form and the last thing logged is the "Unloading Form" (DebugLog is a log to
> file function).
>
> I had a hang on our terminal server and was able to see that it was in a
> very tight loop (84 instructions) in MSVBVM60.DLL doing the following calls
> (obtained by single stepping instructions on WinDbg):
>
> General Call Sequence:
>
> MSVBVM60!EbResetProject+0x217:
> MSVBVM60!Zombie_QueryInterface+0x6741:
> MSVBVM60!BASIC_CLASS_Invoke+0x123e:
> MSVBVM60!Zombie_QueryInterface+0x672c:
> MSVBVM60!EbResetProject+0x217:
>
> It NEVER makes a single call outside of MSVBVM60.DLL.
>
> Any clues as to what's going on inside MSVBVM60.DLL when this is going on?
>
> I haven't seen anything in the SP6 read me that would lead me to believe
> this is going to have an effect on the problem.
>
> Anybody got anything to say about SP6 experiences?
>
>
>
>



Relevant Pages

  • Re: Ever had to judge a new to-be-hired in interview?
    ... >> "Control contents will be lost when the form unloads, ... >>> End Sub ... >>> But the form never terminate. ... In an ActiveX that is also a data entry and manipulation interface, ...
    (microsoft.public.vb.general.discussion)
  • Re: Userform Terminate
    ... In the Terminate event, even if you exit the sub, the form still terminates. ... It has a Cancel argument, ... CloseMode refers to how the form is closed. ...
    (microsoft.public.excel.programming)
  • Re: Ever had to judge a new to-be-hired in interview?
    ... Control contents will be lost when the form ... >>>form will not terminate, therefore form level variables are not reset. ... >>> Unload Form2 ... >>>End Sub ...
    (microsoft.public.vb.general.discussion)
  • Re: Userform Terminate
    ... In the Terminate event, even if you exit the sub, the form still terminates. ... It has a Cancel argument, ... CloseMode refers to how the form is closed. ...
    (microsoft.public.excel.programming)
  • Re: connect to WMI object directly
    ... like Terminate for example. ... > Sub Main ... > Dim sc As ManagementScope ... > Dim co As ConnectionOptions ...
    (microsoft.public.win32.programmer.wmi)