[Mono-bugs] [Bug 78548][Wis] New - SIGSEGV calling System.Windows.Forms.Invalidate(Rectangle) from wrong thread

bugzilla-daemon at bugzilla.ximian.com bugzilla-daemon at bugzilla.ximian.com
Wed May 31 05:37:50 EDT 2006


Please do not reply to this email- if you want to comment on the bug, go to the
URL shown below and enter your comments there.

Changed by nikki at trumphurst.com.

http://bugzilla.ximian.com/show_bug.cgi?id=78548

--- shadow/78548	2006-05-31 05:37:50.000000000 -0400
+++ shadow/78548.tmp.27758	2006-05-31 05:37:50.000000000 -0400
@@ -0,0 +1,157 @@
+Bug#: 78548
+Product: Mono: Class Libraries
+Version: 1.0
+OS: other
+OS Details: CentOS 4
+Status: NEW   
+Resolution: 
+Severity: 
+Priority: Wishlist
+Component: Windows.Forms
+AssignedTo: peter at novonyx.com                            
+ReportedBy: nikki at trumphurst.com               
+QAContact: mono-bugs at ximian.com
+TargetMilestone: ---
+URL: 
+Cc: 
+Summary: SIGSEGV calling System.Windows.Forms.Invalidate(Rectangle) from wrong thread
+
+Description of Problem:
+SIGSEGV in mono runtime
+
+Steps to reproduce the problem:
+1. Repeatedly call System.Windows.Forms.Control.Invalidate(Rectangle) 
+from multiple threads, without using Invoke.
+
+Actual Results:
+================================================================= 
+Got a SIGSEGV while executing native code. This usually indicates 
+a fatal error in the mono runtime or one of the native libraries 
+used by your application. 
+================================================================= 
+ 
+Stacktrace: 
+ 
+in (wrapper managed-to-native) 
+System.Drawing.GDIPlus:GdipCreateFromXDrawable_linux 
+(intptr,intptr,intptr&) <0x4> 
+in (wrapper managed-to-native) 
+System.Drawing.GDIPlus:GdipCreateFromXDrawable_linux 
+(intptr,intptr,intptr&) <0xffffffbe> 
+in System.Drawing.Graphics:FromXDrawable (intptr,intptr) 
+(at /var/src/mono 
+-1.1.15/mcs/class/System.Drawing/System.Drawing/Graphics.cs:1746) 
+in System.Drawing.Graphics:FromHwnd (intptr) (at /var/src/mono- 
+1.1.15/mcs/class/System.Drawing/System.Drawing/Graphics.cs:1706) 
+in System.Windows.Forms.XplatUIX11:PaintEventStart (intptr,bool) (at 
+/var/src/mono- 
+1.1.15/mcs/class/Managed.Windows.Forms/System.Windows.Forms/XplatUIX11.cs:
+3 
+572) 
+in System.Windows.Forms.XplatUI:PaintEventStart (intptr,bool) (at 
+/var/src/mono- 
+1.1.15/mcs/class/Managed.Windows.Forms/System.Windows.Forms/XplatUI.cs:593
+) 
+in System.Windows.Forms.Control:WndProc (System.Windows.Forms.Message&) 
+(at 
+/var/src/mono- 
+1.1.15/mcs/class/Managed.Windows.Forms/System.Windows.Forms/Control.cs:374
+7 
+) 
+in System.Windows.Forms.ScrollableControl:WndProc 
+(System.Windows.Forms.Message&) (at /var/src/mono- 
+1.1.15/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ScrollableCont
+r 
+ol.cs:584) 
+in System.Windows.Forms.ContainerControl:WndProc 
+(System.Windows.Forms.Message&) (at /var/src/mono- 
+1.1.15/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ContainerContr
+o 
+l.cs:336) 
+in System.Windows.Forms.Form:WndProc (System.Windows.Forms.Message&) (at 
+/var/src/mono- 
+1.1.15/mcs/class/Managed.Windows.Forms/System.Windows.Forms/Form.cs:1821) 
+in ControlNativeWindow:WndProc (System.Windows.Forms.Message&) (at 
+/var/src/mono- 
+1.1.15/mcs/class/Managed.Windows.Forms/System.Windows.Forms/Control.cs:160
+) 
+in System.Windows.Forms.NativeWindow:WndProc 
+(intptr,System.Windows.Forms.Msg,intptr,intptr) (at /var/src/mono- 
+1.1.15/mcs/class/Managed.Windows.Forms/System.Windows.Forms/NativeWindow.c
+s 
+:146) 
+in System.Windows.Forms.XplatUIX11:DispatchMessage 
+(System.Windows.Forms.MSG&) (at /var/src/mono- 
+1.1.15/mcs/class/Managed.Windows.Forms/System.Windows.Forms/XplatUIX11.cs:
+2 
+562) 
+in System.Windows.Forms.XplatUI:DispatchMessage 
+(System.Windows.Forms.MSG&) 
+(at /var/src/mono- 
+1.1.15/mcs/class/Managed.Windows.Forms/System.Windows.Forms/XplatUI.cs:408
+) 
+in System.Windows.Forms.Application:RunLoop 
+(bool,System.Windows.Forms.ApplicationContext) (at /var/src/mono- 
+1.1.15/mcs/class/Managed.Windows.Forms/System.Windows.Forms/Application.cs
+: 
+395) 
+in System.Windows.Forms.Application:Run (System.Windows.Forms.Form) (at 
+/var/src/mono- 
+1.1.15/mcs/class/Managed.Windows.Forms/System.Windows.Forms/Application.cs
+: 
+292) 
+in SpecSoft.EPOS.TransactionClient.FormMain:Main (string[]) (at 
+/home/epos/src/ClientTestApp/FormMain.cs:173) 
+in (wrapper runtime-invoke) System.Object:runtime_invoke_void_string[] 
+(object,intptr,intptr,intptr) <0x72c2f1e> 
+ 
+Native stacktrace: 
+ 
+       mono(mono_handle_native_sigsegv+0x80) [0x812e9b4] 
+       mono [0x811b130] 
+       /lib/tls/libpthread.so.0 [0xde9880] 
+       /lib/tls/libc.so.6(malloc+0x81) [0xbe80b1] 
+       /usr/lib/libgdiplus.so(GdipAlloc+0x1e) [0x12ad1d] 
+       /usr/lib/libgdiplus.so(GdipCreateMatrix+0x5b) [0x14e360] 
+       /usr/lib/libgdiplus.so(gdip_graphics_init+0xa4) [0x12bc6c] 
+       /usr/lib/libgdiplus.so(gdip_graphics_new+0x37) [0x12bd7b] 
+       /usr/lib/libgdiplus.so(GdipCreateFromXDrawable_linux+0xd6) 
+[0x12cbb4] 
+       [0x3a4b9b] 
+       [0x3a4b27] 
+       [0x3a4a61] 
+       [0x3c9a5a] 
+       [0x3c99c3] 
+       [0x35d6a1] 
+       [0x35d2d6] 
+       [0x35d2be] 
+       [0x35c0a2] 
+       [0x35acbd] 
+       [0x35ab47] 
+       [0x3c990f] 
+       [0x3c98ee] 
+       [0x356a9f] 
+       [0x356465] 
+       [0xdfdd01] 
+       [0xdfc7c3] 
+       mono(mono_runtime_exec_main+0x4f) [0x80bf6b7] 
+       mono(mono_runtime_run_main+0x1c2) [0x80bf98a] 
+       mono(mono_main+0xeb7) [0x805cc97] 
+       mono [0x805b9c3] 
+       /lib/tls/libc.so.6(__libc_start_main+0xd3) [0xb98e23] 
+       mono(dl_iterate_phdr+0x171) [0x805b925] 
+ 
+** (Specsoft.EPOS.ClientTestApp.exe:6285): WARNING **: 
+ves_icall_System_Threading_Thread_Thread_internal: CreateThread error 0x0 
+
+
+Expected Results:
+Ordinary exception.
+
+How often does this happen? 
+After an hour or so running with 20 threads each calling Invalidate every 
+few seconds.
+
+Additional Information:
+I know you shouldn't call Windows.Forms UI features on other threads. But 
+I think the result should be something more friendly than a SIGSEGV.


More information about the mono-bugs mailing list