[Mono-bugs] [Bug 394332] Removing the next control in control.Leave causes crash

bugzilla_noreply at novell.com bugzilla_noreply at novell.com
Thu Jun 19 15:14:42 EDT 2008


https://bugzilla.novell.com/show_bug.cgi?id=394332

User equistango at gmail.com added comment
https://bugzilla.novell.com/show_bug.cgi?id=394332#c4





--- Comment #4 from Ernesto Carrea <equistango at gmail.com>  2008-06-19 13:14:41 MDT ---
Created an attachment (id=223177)
 --> (https://bugzilla.novell.com/attachment.cgi?id=223177)
Second patch

As the following dump shows, this is also necessary for the Leave event loop.

Unhandled Exception: System.NullReferenceException: Object reference not set to
an instance of an object
  at System.Windows.Forms.ContainerControl.set_ActiveControl
(System.Windows.Forms.Control value) [0x00093] in
/home/usuario/mono/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ContainerControl.cs:131 
  at System.Windows.Forms.ContainerControl.Select (Boolean directed, Boolean
forward) [0x0001d] in
/home/usuario/mono/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ContainerControl.cs:602 
  at System.Windows.Forms.Control.SelectNextControl
(System.Windows.Forms.Control ctl, Boolean forward, Boolean tabStopOnly,
Boolean nested, Boolean wrap) [0x00076] in
/home/usuario/mono/mcs/class/Managed.Windows.Forms/System.Windows.Forms/Control.cs:4340 
  at System.Windows.Forms.ContainerControl.ChildControlRemoved
(System.Windows.Forms.Control control) [0x0001d] in
/home/usuario/mono/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ContainerControl.cs:641 
  at (wrapper remoting-invoke-with-check)
System.Windows.Forms.ContainerControl:ChildControlRemoved
(System.Windows.Forms.Control)
  at System.Windows.Forms.Control+ControlCollection.Remove
(System.Windows.Forms.Control value) [0x0004e] in
/home/usuario/mono/mcs/class/Managed.Windows.Forms/System.Windows.Forms/Control.cs:794 
  at Lui.Forms.ProductArray.Quitar (Int32 iIndex) [0x00000] 
  at Lui.Forms.ProductArray.AutoAgregarOQuitar (Boolean QuitarDelMedio)
[0x00000] 
  at Lui.Forms.ProductArray.Product_Leave (System.Object sender,
System.EventArgs e) [0x00000] 
  at System.Windows.Forms.Control.OnLeave (System.EventArgs e) [0x0001c] in
/home/usuario/mono/mcs/class/Managed.Windows.Forms/System.Windows.Forms/Control.cs:6237 
  at System.Windows.Forms.Control.FireLeave () [0x00000] in
/home/usuario/mono/mcs/class/Managed.Windows.Forms/System.Windows.Forms/Control.cs:1657 
  at System.Windows.Forms.ContainerControl.set_ActiveControl
(System.Windows.Forms.Control value) [0x00093] in
/home/usuario/mono/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ContainerControl.cs:131 
  at System.Windows.Forms.Control.Select (System.Windows.Forms.Control control)
[0x00021] in
/home/usuario/mono/mcs/class/Managed.Windows.Forms/System.Windows.Forms/Control.cs:1449 
  at System.Windows.Forms.Control.FocusInternal (Boolean skip_check) [0x00039]
in
/home/usuario/mono/mcs/class/Managed.Windows.Forms/System.Windows.Forms/Control.cs:3824 
  at System.Windows.Forms.Control.Focus () [0x00000] in
/home/usuario/mono/mcs/class/Managed.Windows.Forms/System.Windows.Forms/Control.cs:3818 
  at (wrapper remoting-invoke-with-check) System.Windows.Forms.Control:Focus ()
  at Lui.Forms.DetailBox.Label1_Click (System.Object sender, System.EventArgs
e) [0x00000] 
  at System.Windows.Forms.Control.OnClick (System.EventArgs e) [0x0001c] in
/home/usuario/mono/mcs/class/Managed.Windows.Forms/System.Windows.Forms/Control.cs:5975 
  at System.Windows.Forms.Control.HandleClick (Int32 clicks,
System.Windows.Forms.MouseEventArgs me) [0x00056] in
/home/usuario/mono/mcs/class/Managed.Windows.Forms/System.Windows.Forms/Control.cs:1831 
  at System.Windows.Forms.Control.WmLButtonUp (System.Windows.Forms.Message& m)
[0x00074] in
/home/usuario/mono/mcs/class/Managed.Windows.Forms/System.Windows.Forms/Control.cs:5536 
  at System.Windows.Forms.Control.WndProc (System.Windows.Forms.Message& m)
[0x0017c] in
/home/usuario/mono/mcs/class/Managed.Windows.Forms/System.Windows.Forms/Control.cs:5284 
  at System.Windows.Forms.Label.WndProc (System.Windows.Forms.Message& m)
[0x00027] in
/home/usuario/mono/mcs/class/Managed.Windows.Forms/System.Windows.Forms/Label.cs:726 
  at System.Windows.Forms.Control+ControlWindowTarget.OnMessage
(System.Windows.Forms.Message& m) [0x00000] in
/home/usuario/mono/mcs/class/Managed.Windows.Forms/System.Windows.Forms/Control.cs:227 
  at System.Windows.Forms.Control+ControlNativeWindow.WndProc
(System.Windows.Forms.Message& m) [0x00000] in
/home/usuario/mono/mcs/class/Managed.Windows.Forms/System.Windows.Forms/Control.cs:208 
  at System.Windows.Forms.NativeWindow.WndProc (IntPtr hWnd, Msg msg, IntPtr
wParam, IntPtr lParam) [0x00084] in
/home/usuario/mono/mcs/class/Managed.Windows.Forms/System.Windows.Forms/NativeWindow.cs:240 
  at System.Windows.Forms.XplatUIX11.DispatchMessage (System.Windows.Forms.MSG&
msg) [0x00000] in
/home/usuario/mono/mcs/class/Managed.Windows.Forms/System.Windows.Forms/XplatUIX11.cs:3296 
  at System.Windows.Forms.XplatUI.DispatchMessage (System.Windows.Forms.MSG&
msg) [0x00000] in
/home/usuario/mono/mcs/class/Managed.Windows.Forms/System.Windows.Forms/XplatUI.cs:600 
  at System.Windows.Forms.Application.RunLoop (Boolean Modal,
System.Windows.Forms.ApplicationContext context) [0x00359] in
/home/usuario/mono/mcs/class/Managed.Windows.Forms/System.Windows.Forms/Application.cs:952 
  at System.Windows.Forms.Application.Run
(System.Windows.Forms.ApplicationContext context) [0x0002e] in
/home/usuario/mono/mcs/class/Managed.Windows.Forms/System.Windows.Forms/Application.cs:738 
  at System.Windows.Forms.Application.Run (System.Windows.Forms.Form mainForm)
[0x00000] in
/home/usuario/mono/mcs/class/Managed.Windows.Forms/System.Windows.Forms/Application.cs:721 
  at Lazaro.Aplicacion.IniciarNormal () [0x00000] 
  at Lazaro.Aplicacion.Main (System.String[] args) [0x00000] 

Please review the proposed patch.


-- 
Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
You are the assignee for the bug.


More information about the mono-bugs mailing list