Environment:
Mono 2.6.7
CentOS 5.4, 32-bit
I have a Gtk Window with various docking panels (MonoDevelop.Components.Docking). In a tabbed group of panels, one panel crashes the application with a SIGSEGV in a very specific situation:
- click on another tab to view a panel other than this one in the tabbed group
- click back to the problem panel
- move mouse around over the first row of the TreeView displayed in the panel
- this only occurs if there is at least one row with data, and only when moving the mouse around over the first row of data
Here is the stack trace when the app crashes:
Stacktrace:
at (wrapper managed-to-native) Gtk.Application.gtk_main () <0x00004>
at (wrapper managed-to-native) Gtk.Application.gtk_main () <0x00004>
at Gtk.Application.Run () <0x0000a>
at MyApp.MainClass.Main (string[]) <0x002ad>
at (wrapper runtime-invoke) <Module>.runtime_invoke_void_object (object,intptr,intptr,intptr) <0x00043>
Native stacktrace:
mono [0x80d93bb]
mono [0x8114180]
[0xdb6440]
/mydir/deps/lib/libcairo.so.2 [0x1f47178]
/mydir/deps/lib/libcairo.so.2 [0x1f432e0]
/mydir/deps/lib/libcairo.so.2 [0x1f4354d]
/mydir/deps/lib/libcairo.so.2 [0x1f17396]
/mydir/deps/lib/libcairo.so.2 [0x1f1989d]
/mydir/deps/lib/libcairo.so.2 [0x1f19cc1]
/mydir/deps/lib/libcairo.so.2 [0x1f164e6]
/mydir/deps/lib/libcairo.so.2 [0x1f06cb3]
/mydir/deps/lib/libcairo.so.2(cairo_fill_preserve+0x2c) [0x1eff00c]
/mydir/deps/lib/libcairo.so.2(cairo_fill+0x12) [0x1eff032]
/mydir/deps/lib/libgtk-x11-2.0.so.0 [0x345cc16]
/mydir/deps/lib/libgtk-x11-2.0.so.0(gtk_cell_renderer_render+0x92) [0x34596b2]
/mydir/deps/lib/libgtk-x11-2.0.so.0 [0x363594d]
/mydir/deps/lib/libgtk-x11-2.0.so.0 [0x3636689]
/mydir/deps/lib/libgtk-x11-2.0.so.0 [0x3632e88]
/mydir/deps/lib/libgtk-x11-2.0.so.0 [0x352804e]
/mydir/deps/lib/libgobject-2.0.so.0 [0x1ec5729]
/mydir/deps/lib/libgobject-2.0.so.0(g_closure_invoke+0x123) [0x1ec6f33]
/mydir/deps/lib/libgobject-2.0.so.0 [0x1ed80c1]
/mydir/deps/lib/libgobject-2.0.so.0(g_signal_emit_valist+0x68f) [0x1ed8d7f]
/mydir/deps/lib/libgobject-2.0.so.0(g_signal_emit+0x29) [0x1ed9179]
/mydir/deps/lib/libgtk-x11-2.0.so.0 [0x3645f78]
/mydir/deps/lib/libgtk-x11-2.0.so.0(gtk_main_do_event+0x507) [0x35225e7]
/mydir/deps/lib/libgdk-x11-2.0.so.0 [0xcfb38b]
/mydir/deps/lib/libgdk-x11-2.0.so.0(gdk_window_process_all_updates+0xf8) [0xcfba38]
/mydir/deps/lib/libgdk-x11-2.0.so.0 [0xcfba5b]
/mydir/deps/lib/libgdk-x11-2.0.so.0 [0xce1a18]
/mydir/deps/lib/libglib-2.0.so.0 [0x26ba01]
/mydir/deps/lib/libglib-2.0.so.0(g_main_context_dispatch+0x17c) [0x26d5bc]
/mydir/deps/lib/libglib-2.0.so.0 [0x270a26]
/mydir/deps/lib/libglib-2.0.so.0(g_main_loop_run+0x1a9) [0x270dd9]
/mydir/deps/lib/libgtk-x11-2.0.so.0(gtk_main+0xb4) [0x3522844]
[0x609524e]
[0x6095213]
[0xcc0766]
[0xd5e88c]
mono [0x8062076]
mono(mono_runtime_invoke+0x40) [0x8158b20]
mono(mono_runtime_exec_main+0xea) [0x815ed0a]
mono(mono_runtime_run_main+0x1ba) [0x81602fa]
mono(mono_main+0x1670) [0x80b5f80]
mono [0x80594a1]
/lib/libc.so.6(__libc_start_main+0xdc) [0x49ee9c]
mono(g_ascii_strcasecmp+0x95) [0x80593b1]
Debug info from gdb:
=================================================================
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.
=================================================================
It’s difficult to give any code since it’s proprietary to my employer, and it’s pretty messy code. I was just wondering if anyone had some tips on some general cases that might cause this that I could look for.
Also, please do not just reply with “use a later version of Mono”, etc. This is the environment I’m given to work with. If there is some Mono bug related to this though, that would be helpful info.
Note that I did find a question here: MonoTouch NullReference for every event/Action (SIGSEGV),
that mentions local UI components with attached events getting disposed. I did a search in my code and the only local UI components with events are 2 popup menu items. However, the code is not being hit in this situation because I’m not triggering the menu (right-click).
Thank you.
The problem happened to be a bug in the cairo package we were using. We upgraded to a newer version – problem solved. The bug had to do with rendering pixbufs in the cells.
To the other 2 posts, yes using a newer version of Mono would be great. However, we are working under time/money constraints while supporting legacy projects. Hopefully we’ll have an effort to upgrade Mono and test everything next year.