Bug 20830 - Application crash when move mouse randomly on the form
Summary: Application crash when move mouse randomly on the form
Status: NEW
Alias: None
Product: Class Libraries
Classification: Mono
Component: System.Drawing ()
Version: 3.4.0
Hardware: PC Linux
: --- normal
Target Milestone: Untriaged
Assignee: Bugzilla
URL:
Depends on:
Blocks:
 
Reported: 2014-06-23 23:36 UTC by yanne
Modified: 2014-06-23 23:39 UTC (History)
1 user (show)

Tags:
Is this bug a regression?: ---
Last known good build:


Attachments
This is a simple C# application that is able to reproduce the bug #20830 (193.55 KB, application/octet-stream)
2014-06-23 23:39 UTC, yanne
Details


Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.


Please create a new report for Bug 20830 on GitHub or Developer Community if you have new information to add and do not yet see a matching new report.

If the latest results still closely match this report, you can use the original description:

  • Export the original title and description: GitHub Markdown or Developer Community HTML
  • Copy the title and description into the new report. Adjust them to be up-to-date if needed.
  • Add your new information.

In special cases on GitHub you might also want the comments: GitHub Markdown with public comments

Related Links:
Status:
NEW

Description yanne 2014-06-23 23:36:14 UTC
Hello, recently i wanna run my c# program on Linux system, firstly i use VM for testing,that's OK, but when I run the program on the real Linux system, i got some errors.  

The environment is as follow:
Linux: Red Hat Enterprise Linux Server
Verion: 6.4(santiago)
Linux 2.6.32-358.el6.x86_64
Gnome  2.28.2
Mono 3.4.0 (with libgdiplus of 2.10.9)

The attachment is a test case, when perform "RibbonMenuControlTest.exe", it runs normally, but when i move my mouse here and there on the form, it will exit suddenly. 

Here's the stacktrace:

Stacktrace:

段错误 (core dumped)


Stacktrace:

Native stacktrace:

System.NullReferenceException: Object reference not set to an instance of an object
  at (wrapper managed-to-native) System.Drawing.GDIPlus:GdipSaveGraphics (intptr,uint&)
  at System.Drawing.Graphics.Save () [0x00000] in <filename unknown>:0 
  at (wrapper remoting-invoke-with-check) System.Drawing.Graphics:Save ()
  at System.Windows.Forms.Control.PaintControlBackground (System.Windows.Forms.PaintEventArgs pevent) [0x00000] in <filename unknown>:0 
  at System.Windows.Forms.Control.OnPaintBackground (System.Windows.Forms.PaintEventArgs pevent) [0x00000] in <filename unknown>:0 
  at System.Windows.Forms.ButtonBase.OnPaintBackgroundInternal (System.Windows.Forms.PaintEventArgs e) [0x00000] in <filename unknown>:0 
  at System.Windows.Forms.Control.WmPaint (System.Windows.Forms.Message& m) [0x00000] in <filename unknown>:0 
  at System.Windows.Forms.Control.WndProc (System.Windows.Forms.Message& m) [0x00000] in <filename unknown>:0 
  at System.Windows.Forms.ButtonBase.WndProc (System.Windows.Forms.Message& m) [0x00000] in <filename unknown>:0 
  at System.Windows.Forms.Button.WndProc (System.Windows.Forms.Message& m) [0x00000] in <filename unknown>:0 
  at System.Windows.Forms.Control+ControlWindowTarget.OnMessage (System.Windows.Forms.Message& m) [0x00000] in <filename unknown>:0 
  at System.Windows.Forms.Control+ControlNativeWindow.WndProc (System.Windows.Forms.Message& m) [0x00000] in <filename unknown>:0 
  at System.Windows.Forms.NativeWindow.WndProc (IntPtr hWnd, Msg msg, IntPtr wParam, IntPtr lParam) [0x00000] in <filename unknown>:0 
	mono() [0x4a3645]
	mono() [0x4ff46b]
	mono() [0x4156b9]
	/lib64/libpthread.so.0() [0x3d5820f500]
	/lib64/libglib-2.0.so.0() [0x3d59656a3a]
	/lib64/libglib-2.0.so.0(g_slice_free1+0x1f8) [0x3d596574e8]
	/lib64/libglib-2.0.so.0(g_array_free+0x6d) [0x3d59613dcd]
	/usr/local/lib/libgdiplus.so(GdipDeletePath+0x21) [0x7ffadc2c4a61]
	/usr/local/lib/libgdiplus.so(+0x38307) [0x7ffadc2df307]
	/usr/local/lib/libgdiplus.so(+0x38321) [0x7ffadc2df321]
	/usr/local/lib/libgdiplus.so(+0x3559e) [0x7ffadc2dc59e]
	/usr/local/lib/libgdiplus.so(GdipDeleteRegion+0x13) [0x7ffadc2dc843]
	[0x4148171b]

Debug info from gdb:

warning: File "/usr/local/bin/mono-sgen-gdb.py" auto-loading has been declined by your `auto-load safe-path' set to "/usr/share/gdb/auto-load:/usr/lib/debug:/usr/bin/mono-gdb.py".
To enable execution of this file add
	add-auto-load-safe-path /usr/local/bin/mono-sgen-gdb.py
line to your configuration file "/root/.gdbinit".
To completely disable this security protection add
	set auto-load safe-path /
line to your configuration file "/root/.gdbinit".
For more information about this security protection see the
"Auto-loading safe path" section in the GDB manual.  E.g., run from the shell:
	info "(gdb)Auto-loading safe path"
[New LWP 3478]
[Thread debugging using libthread_db enabled]
0x0000003d5820d720 in sem_wait () from /lib64/libpthread.so.0
  2 Thread 0x7ffadcc23700 (LWP 3478)  0x0000003d5820f09d in waitpid () from /lib64/libpthread.so.0
* 1 Thread 0x7ffae498d780 (LWP 3477)  0x0000003d5820d720 in sem_wait () from /lib64/libpthread.so.0

Thread 2 (Thread 0x7ffadcc23700 (LWP 3478)):
#0  0x0000003d5820f09d in waitpid () from /lib64/libpthread.so.0
#1  0x00000000004a36d8 in mono_handle_native_sigsegv (signal=<value optimized out>, ctx=<value optimized out>) at mini-exceptions.c:2305
#2  0x00000000004ff46b in mono_arch_handle_altstack_exception (sigctx=0x7ffae49a3ac0, fault_addr=<value optimized out>, stack_ovf=0) at exceptions-amd64.c:905
#3  0x00000000004156b9 in mono_sigsegv_signal_handler (_dummy=11, info=0x7ffae49a3bf0, context=0x7ffae49a3ac0) at mini.c:6842
#4  <signal handler called>
#5  0x0000003d59656a3a in ?? () from /lib64/libglib-2.0.so.0
#6  0x0000003d596574e8 in g_slice_free1 () from /lib64/libglib-2.0.so.0
#7  0x0000003d59613dcd in g_array_free () from /lib64/libglib-2.0.so.0
#8  0x00007ffadc2c4a61 in GdipDeletePath (path=0x14fcf10) at graphics-path.c:316
#9  0x00007ffadc2df307 in gdip_region_clear_tree (tree=0x14fe880) at region-path-tree.c:39
#10 0x00007ffadc2df321 in gdip_region_clear_tree (tree=0x14fed60) at region-path-tree.c:42
#11 0x00007ffadc2dc59e in gdip_clear_region (region=0x14fed30) at region.c:289
#12 0x00007ffadc2dc843 in GdipDeleteRegion (region=0x14fed30) at region.c:520
#13 0x000000004148171b in ?? ()
#14 0x00007ffad80025d0 in ?? ()
#15 0x00007ffadcc22c80 in ?? ()
#16 0x00007ffad52a17a8 in ?? ()
#17 0x00007ffadcc22c80 in ?? ()
#18 0x00007ffadcc22bf0 in ?? ()
#19 0x0000000000b2e780 in ?? ()
#20 0x0000000041490dc0 in ?? ()
#21 0x0000000000000000 in ?? ()

Thread 1 (Thread 0x7ffae498d780 (LWP 3477)):
#0  0x0000003d5820d720 in sem_wait () from /lib64/libpthread.so.0
#1  0x0000000000624208 in mono_sem_wait (sem=0x96c800, alertable=0) at mono-semaphore.c:119
#2  0x00000000005c8f72 in sgen_wait_for_suspend_ack (count=1) at sgen-os-posix.c:165
#3  0x00000000005c9088 in sgen_thread_handshake (suspend=<value optimized out>) at sgen-os-posix.c:199
#4  0x00000000005f6e63 in sgen_stop_world (generation=1) at sgen-stw.c:215
#5  0x00000000005d3488 in sgen_perform_collection (requested_size=0, generation_to_collect=<value optimized out>, reason=0x6fdf70 "user request", wait_to_finish=1) at sgen-gc.c:3470
#6  0x00000000005d39d8 in mono_gc_collect (generation=<value optimized out>) at sgen-gc.c:4609
#7  0x000000004149b73d in ?? ()
#8  0x0000000000b6b260 in ?? ()
#9  0x00007fff0aff44f0 in ?? ()
#10 0x00000000011dc3b0 in ?? ()
#11 0x00007fff0aff4310 in ?? ()
#12 0x00007fff0aff4230 in ?? ()
#13 0x0000000000b2e780 in ?? ()
#14 0x00007ffad562ce20 in ?? ()
#15 0x00007fff0aff44f0 in ?? ()
#16 0x000000004143c8b8 in ?? ()
#17 0x00007ffadcd41391 in System.GC:Collect () at /root/文档/mono/mono-3.4.0/mcs/class/corlib/System/GC.cs:101
#18 0x000000004149b631 in ?? ()
#19 0x000000004143c8b8 in ?? ()
#20 0x00000000408d0c20 in ?? ()
#21 0x00007fff0aff4310 in ?? ()
#22 0x00000000413aa68d in ?? ()
#23 0x000000000062a690 in ?? ()
#24 0x0000000000000018 in ?? ()
#25 0x00007fff0aff4508 in ?? ()
#26 0x0000000000000000 in ?? ()

=================================================================
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.
=================================================================

已放弃 (core dumped)


Thank you.
Yanne.
Comment 1 yanne 2014-06-23 23:39:22 UTC
Created attachment 7161 [details]
This is a simple C# application that is able to reproduce the bug #20830