U
Urs Eichmann
Hello
Situation: WinForms 1.1 application has three Non-Modal Forms being
shown at the same time:
- formA is the main form (started with Application.Run)
- formB has an ActiveX control on it and is minimized
- formC is an ordinary form, which is activated
formC now wants to close formB using formB.Dispose. somewhere in the
Dispose method of formB, the ActiveX control gets disposed too.
The system now hangs with 100 % cpu time on the call to Dispose of the
ActiveX control. The system seems to perform and endless loop in
SelectNextControl. It repeadly calls GetNextControl and CanSelect, but
never gets out of this loop.
This is reproducable behaviour within my application - but can't be
reproduced in a simpler sample app. Also, it only hangs if formC is of a
certain type (one which implements a wizard) - if it's of a simpler
type, there is no hang.
If anybody has experienced this already and knows a workaround or a
patch, please help.
I noticed that another guy had this problem (see
http://groups.google.ch/[email protected]&rnum=1)
But he never got an answer.
Thanks for any help
Urs Eichmann
The call stack of the hang is as follows:
system.windows.forms.dll!System.Windows.Forms.Control.SelectNextControl(System.Windows.Forms.Control
ctl = {PRISMA.BOBJ.Client.ConnectedPanels.TitleSaveAndCancelButton},
bool forward = true, bool tabStopOnly = true, bool nested = true, bool
wrap = true) + 0x49 bytes
system.windows.forms.dll!System.Windows.Forms.ContainerControl.AfterControlRemoved(System.Windows.Forms.Control
control = {AxPrismaDSOFramer.AxFramerControl}) + 0xf6 bytes
system.windows.forms.dll!System.Windows.Forms.Control.ControlCollection.Remove(System.Windows.Forms.Control
value = {AxPrismaDSOFramer.AxFramerControl}) + 0x13b bytes
system.windows.forms.dll!System.Windows.Forms.Control.Dispose(bool
disposing = true) + 0x287 bytes
system.windows.forms.dll!System.Windows.Forms.AxHost.Dispose(bool
disposing = true) + 0x2b bytes
system.dll!System.ComponentModel.Component.Dispose() + 0xf bytesprisma.tools.officedocument.dll!PRISMA.Tools.OfficeDocument.WordDocument.Dispose(Boolean
disposing = True) Line 988 + 0x17 bytes Basic
system.dll!System.ComponentModel.Component.Dispose() + 0xf bytes
prisma.bobj.client.dll!PRISMA.BOBJ.Client.ConnectedControls.ConnectedWordDocument.Dispose(Boolean
disposing = True) Line 204 + 0x17 bytes Basic
system.dll!System.ComponentModel.Component.Dispose() + 0xf bytes
prisma.bobj.client.dll!PRISMA.BOBJ.Client.Bases.BaseInputPanel.Dispose(Boolean
disposing = True) Line 808 + 0xb bytes Basic
prisma.bobj.client.dll!PRISMA.BOBJ.Client.Office.Panels.Panel_BaseDok.Dispose(Boolean
disposing = True) Line 65 + 0xb bytes Basic
system.dll!System.ComponentModel.Component.Dispose() + 0xf bytes
prisma.bobj.client.dll!PRISMA.BOBJ.Client.Bases.BaseConnectedInputPanel.RemoveInputPanel(Boolean
vRaiseEvents = True) Line 601 + 0x18 bytes Basic
prisma.bobj.client.dll!PRISMA.BOBJ.Client.Bases.BaseConnectedInputPanel.Dispose(Boolean
disposing = True) Line 202 + 0xf bytes Basic
prisma.bobj.client.dll!PRISMA.BOBJ.Client.ConnectedPanels.TitleAndSaveButton.Dispose(Boolean
disposing = True) Line 80 + 0xb bytes Basic
prisma.bobj.client.dll!PRISMA.BOBJ.Client.ConnectedPanels.TitleSaveAndCancelButton.Dispose(Boolean
disposing = True) Line 44 + 0xb bytes Basic
system.dll!System.ComponentModel.Component.Dispose() + 0xf bytes
prisma.bobj.client.dll!PRISMA.BOBJ.Client.Forms.fDialogBObjectDetail.Dispose(Boolean
disposing = True) Line 280 + 0x17 bytes Basic
system.dll!System.ComponentModel.Component.Dispose() + 0xf bytes
prisma.bobj.client.dll!PRISMA.BOBJ.Client.Office.Panels.Panel_BaseDok.CheckForActiveInstance()
Line 215 + 0xa bytes Basic
prisma.alim2000.dll!PRISMA.Alim2000.Dokumente.Tools.DokumentDisplayer.CreateInstance(PRISMA.BOBJ.Shared.DataStructures.TransferBObjectTypeAndKey
vParent = {PRISMA.BOBJ.Shared.DataStructures.TransferBObjectTypeAndKey},
String vVorlageID = "VKTOAUSZ", Boolean vUnique = False) Line 47 + 0x6
bytes Basic
prisma.alim2000.registerabfrage.dll!PRISMA.Alim2000.Register.Registerabfrage.RegisterAbfrageInputPanel.ShowPrintedDocument(DevComponents.DotNetBar.ButtonItem
vPrintButton = {DevComponents.DotNetBar.ButtonItem}) Line 489 + 0x45
bytes Basic
prisma.alim2000.registerabfrage.dll!PRISMA.Alim2000.Register.Registerabfrage.RegisterAbfrageInputPanel.Toolbar_ButtonItemClick(DevComponents.DotNetBar.ButtonItem
vButtonItem = {DevComponents.DotNetBar.ButtonItem}) Line 680 + 0xc
bytes Basic
prisma.alim2000.registerabfrage.dll!PRISMA.Alim2000.Register.Registerabfrage.Internal.RegisterabfrageToolbar.cDotNetBarManager_ItemClick(Object
sender = {DevComponents.DotNetBar.ButtonItem}, System.EventArgs e =
{System.EventArgs}) Line 442 + 0x2b bytes Basic
devcomponents.dotnetbar.dll!DevComponents.DotNetBar.DotNetBarManager.C0(DevComponents.DotNetBar.BaseItem
1F5 = {DevComponents.DotNetBar.ButtonItem}) + 0x38 bytes
devcomponents.dotnetbar.dll!DevComponents.DotNetBar.BaseItem.RaiseClick()
+ 0x20b bytes
devcomponents.dotnetbar.dll!DevComponents.DotNetBar.BaseItem.InternalMouseUp(System.Windows.Forms.MouseEventArgs
objArg = {X=32 Y=11 Button=Left}) + 0x13d bytes
devcomponents.dotnetbar.dll!DevComponents.DotNetBar.PopupItem.InternalMouseUp(System.Windows.Forms.MouseEventArgs
objArg = {X=32 Y=11 Button=Left}) + 0x2e bytes
devcomponents.dotnetbar.dll!DevComponents.DotNetBar.ButtonItem.InternalMouseUp(System.Windows.Forms.MouseEventArgs
objArg = {X=32 Y=11 Button=Left}) + 0x4f3 bytes
devcomponents.dotnetbar.dll!DevComponents.DotNetBar.MenuPanel.OnMouseUp(System.Windows.Forms.MouseEventArgs
e = {X=32 Y=11 Button=Left}) + 0x26 bytes
system.windows.forms.dll!System.Windows.Forms.Control.WmMouseUp(System.Windows.Forms.Message
m = {System.Windows.Forms.Message}, System.Windows.Forms.MouseButtons
button = Left, int clicks = 1) + 0x261 bytes
system.windows.forms.dll!System.Windows.Forms.Control.WndProc(System.Windows.Forms.Message
m = {System.Windows.Forms.Message}) + 0x49b bytes
devcomponents.dotnetbar.dll!DevComponents.DotNetBar.MenuPanel.WndProc(System.Windows.Forms.Message
m = {System.Windows.Forms.Message}) + 0x50 bytes
system.windows.forms.dll!ControlNativeWindow.OnMessage(System.Windows.Forms.Message
m = {System.Windows.Forms.Message}) + 0x13 bytes
system.windows.forms.dll!ControlNativeWindow.WndProc(System.Windows.Forms.Message
m = {System.Windows.Forms.Message}) + 0xda bytes
system.windows.forms.dll!System.Windows.Forms.NativeWindow.DebuggableCallback(int
hWnd = 3804468, int msg = 514, int wparam = 0, int lparam = 720928) +
0x3d bytes
system.windows.forms.dll!System.Windows.Forms.Application.ComponentManager.System.Windows.Forms.UnsafeNativeMethods+IMsoComponentManager.FPushMessageLoop(int
dwComponentID = 2, int reason = -1, int pvLoopData = 0) + 0x349 bytes
system.windows.forms.dll!ThreadContext.RunMessageLoopInner(int reason
= -1, System.Windows.Forms.ApplicationContext context =
{System.Windows.Forms.ApplicationContext}) + 0x1f3 bytes
system.windows.forms.dll!ThreadContext.RunMessageLoop(int reason =
-1, System.Windows.Forms.ApplicationContext context =
{System.Windows.Forms.ApplicationContext}) + 0x50 bytes
system.windows.forms.dll!System.Windows.Forms.Application.Run(System.Windows.Forms.Form
mainForm = {PRISMA.Alim2000.WinApp.fMain}) + 0x34 bytes
Alim2000.exe!PRISMA.Alim2000.WinApp.Main.Main() Line 105 + 0x9 bytes
Basic
Situation: WinForms 1.1 application has three Non-Modal Forms being
shown at the same time:
- formA is the main form (started with Application.Run)
- formB has an ActiveX control on it and is minimized
- formC is an ordinary form, which is activated
formC now wants to close formB using formB.Dispose. somewhere in the
Dispose method of formB, the ActiveX control gets disposed too.
The system now hangs with 100 % cpu time on the call to Dispose of the
ActiveX control. The system seems to perform and endless loop in
SelectNextControl. It repeadly calls GetNextControl and CanSelect, but
never gets out of this loop.
This is reproducable behaviour within my application - but can't be
reproduced in a simpler sample app. Also, it only hangs if formC is of a
certain type (one which implements a wizard) - if it's of a simpler
type, there is no hang.
If anybody has experienced this already and knows a workaround or a
patch, please help.
I noticed that another guy had this problem (see
http://groups.google.ch/[email protected]&rnum=1)
But he never got an answer.
Thanks for any help
Urs Eichmann
The call stack of the hang is as follows:
system.windows.forms.dll!System.Windows.Forms.Control.SelectNextControl(System.Windows.Forms.Control
ctl = {PRISMA.BOBJ.Client.ConnectedPanels.TitleSaveAndCancelButton},
bool forward = true, bool tabStopOnly = true, bool nested = true, bool
wrap = true) + 0x49 bytes
system.windows.forms.dll!System.Windows.Forms.ContainerControl.AfterControlRemoved(System.Windows.Forms.Control
control = {AxPrismaDSOFramer.AxFramerControl}) + 0xf6 bytes
system.windows.forms.dll!System.Windows.Forms.Control.ControlCollection.Remove(System.Windows.Forms.Control
value = {AxPrismaDSOFramer.AxFramerControl}) + 0x13b bytes
system.windows.forms.dll!System.Windows.Forms.Control.Dispose(bool
disposing = true) + 0x287 bytes
system.windows.forms.dll!System.Windows.Forms.AxHost.Dispose(bool
disposing = true) + 0x2b bytes
system.dll!System.ComponentModel.Component.Dispose() + 0xf bytesprisma.tools.officedocument.dll!PRISMA.Tools.OfficeDocument.WordDocument.Dispose(Boolean
disposing = True) Line 988 + 0x17 bytes Basic
system.dll!System.ComponentModel.Component.Dispose() + 0xf bytes
prisma.bobj.client.dll!PRISMA.BOBJ.Client.ConnectedControls.ConnectedWordDocument.Dispose(Boolean
disposing = True) Line 204 + 0x17 bytes Basic
system.dll!System.ComponentModel.Component.Dispose() + 0xf bytes
prisma.bobj.client.dll!PRISMA.BOBJ.Client.Bases.BaseInputPanel.Dispose(Boolean
disposing = True) Line 808 + 0xb bytes Basic
prisma.bobj.client.dll!PRISMA.BOBJ.Client.Office.Panels.Panel_BaseDok.Dispose(Boolean
disposing = True) Line 65 + 0xb bytes Basic
system.dll!System.ComponentModel.Component.Dispose() + 0xf bytes
prisma.bobj.client.dll!PRISMA.BOBJ.Client.Bases.BaseConnectedInputPanel.RemoveInputPanel(Boolean
vRaiseEvents = True) Line 601 + 0x18 bytes Basic
prisma.bobj.client.dll!PRISMA.BOBJ.Client.Bases.BaseConnectedInputPanel.Dispose(Boolean
disposing = True) Line 202 + 0xf bytes Basic
prisma.bobj.client.dll!PRISMA.BOBJ.Client.ConnectedPanels.TitleAndSaveButton.Dispose(Boolean
disposing = True) Line 80 + 0xb bytes Basic
prisma.bobj.client.dll!PRISMA.BOBJ.Client.ConnectedPanels.TitleSaveAndCancelButton.Dispose(Boolean
disposing = True) Line 44 + 0xb bytes Basic
system.dll!System.ComponentModel.Component.Dispose() + 0xf bytes
prisma.bobj.client.dll!PRISMA.BOBJ.Client.Forms.fDialogBObjectDetail.Dispose(Boolean
disposing = True) Line 280 + 0x17 bytes Basic
system.dll!System.ComponentModel.Component.Dispose() + 0xf bytes
prisma.bobj.client.dll!PRISMA.BOBJ.Client.Office.Panels.Panel_BaseDok.CheckForActiveInstance()
Line 215 + 0xa bytes Basic
prisma.alim2000.dll!PRISMA.Alim2000.Dokumente.Tools.DokumentDisplayer.CreateInstance(PRISMA.BOBJ.Shared.DataStructures.TransferBObjectTypeAndKey
vParent = {PRISMA.BOBJ.Shared.DataStructures.TransferBObjectTypeAndKey},
String vVorlageID = "VKTOAUSZ", Boolean vUnique = False) Line 47 + 0x6
bytes Basic
prisma.alim2000.registerabfrage.dll!PRISMA.Alim2000.Register.Registerabfrage.RegisterAbfrageInputPanel.ShowPrintedDocument(DevComponents.DotNetBar.ButtonItem
vPrintButton = {DevComponents.DotNetBar.ButtonItem}) Line 489 + 0x45
bytes Basic
prisma.alim2000.registerabfrage.dll!PRISMA.Alim2000.Register.Registerabfrage.RegisterAbfrageInputPanel.Toolbar_ButtonItemClick(DevComponents.DotNetBar.ButtonItem
vButtonItem = {DevComponents.DotNetBar.ButtonItem}) Line 680 + 0xc
bytes Basic
prisma.alim2000.registerabfrage.dll!PRISMA.Alim2000.Register.Registerabfrage.Internal.RegisterabfrageToolbar.cDotNetBarManager_ItemClick(Object
sender = {DevComponents.DotNetBar.ButtonItem}, System.EventArgs e =
{System.EventArgs}) Line 442 + 0x2b bytes Basic
devcomponents.dotnetbar.dll!DevComponents.DotNetBar.DotNetBarManager.C0(DevComponents.DotNetBar.BaseItem
1F5 = {DevComponents.DotNetBar.ButtonItem}) + 0x38 bytes
devcomponents.dotnetbar.dll!DevComponents.DotNetBar.BaseItem.RaiseClick()
+ 0x20b bytes
devcomponents.dotnetbar.dll!DevComponents.DotNetBar.BaseItem.InternalMouseUp(System.Windows.Forms.MouseEventArgs
objArg = {X=32 Y=11 Button=Left}) + 0x13d bytes
devcomponents.dotnetbar.dll!DevComponents.DotNetBar.PopupItem.InternalMouseUp(System.Windows.Forms.MouseEventArgs
objArg = {X=32 Y=11 Button=Left}) + 0x2e bytes
devcomponents.dotnetbar.dll!DevComponents.DotNetBar.ButtonItem.InternalMouseUp(System.Windows.Forms.MouseEventArgs
objArg = {X=32 Y=11 Button=Left}) + 0x4f3 bytes
devcomponents.dotnetbar.dll!DevComponents.DotNetBar.MenuPanel.OnMouseUp(System.Windows.Forms.MouseEventArgs
e = {X=32 Y=11 Button=Left}) + 0x26 bytes
system.windows.forms.dll!System.Windows.Forms.Control.WmMouseUp(System.Windows.Forms.Message
m = {System.Windows.Forms.Message}, System.Windows.Forms.MouseButtons
button = Left, int clicks = 1) + 0x261 bytes
system.windows.forms.dll!System.Windows.Forms.Control.WndProc(System.Windows.Forms.Message
m = {System.Windows.Forms.Message}) + 0x49b bytes
devcomponents.dotnetbar.dll!DevComponents.DotNetBar.MenuPanel.WndProc(System.Windows.Forms.Message
m = {System.Windows.Forms.Message}) + 0x50 bytes
system.windows.forms.dll!ControlNativeWindow.OnMessage(System.Windows.Forms.Message
m = {System.Windows.Forms.Message}) + 0x13 bytes
system.windows.forms.dll!ControlNativeWindow.WndProc(System.Windows.Forms.Message
m = {System.Windows.Forms.Message}) + 0xda bytes
system.windows.forms.dll!System.Windows.Forms.NativeWindow.DebuggableCallback(int
hWnd = 3804468, int msg = 514, int wparam = 0, int lparam = 720928) +
0x3d bytes
system.windows.forms.dll!System.Windows.Forms.Application.ComponentManager.System.Windows.Forms.UnsafeNativeMethods+IMsoComponentManager.FPushMessageLoop(int
dwComponentID = 2, int reason = -1, int pvLoopData = 0) + 0x349 bytes
system.windows.forms.dll!ThreadContext.RunMessageLoopInner(int reason
= -1, System.Windows.Forms.ApplicationContext context =
{System.Windows.Forms.ApplicationContext}) + 0x1f3 bytes
system.windows.forms.dll!ThreadContext.RunMessageLoop(int reason =
-1, System.Windows.Forms.ApplicationContext context =
{System.Windows.Forms.ApplicationContext}) + 0x50 bytes
system.windows.forms.dll!System.Windows.Forms.Application.Run(System.Windows.Forms.Form
mainForm = {PRISMA.Alim2000.WinApp.fMain}) + 0x34 bytes
Alim2000.exe!PRISMA.Alim2000.WinApp.Main.Main() Line 105 + 0x9 bytes
Basic