C#、Mono 2.6.7 - 将鼠标悬停在 TreeView 上时出现 SIGSEGV
环境:
单声道2.6.7
CentOS 5.4,32 位
我有一个带有各种对接面板的 Gtk 窗口 (MonoDevelop.Components.Docking)。在选项卡式面板组中,一个面板在非常特定的情况下会导致应用程序因 SIGSEGV 崩溃:
- 单击另一个选项卡以查看选项卡式组中除该面板之外的面板
- 单击返回到问题面板
- 将鼠标移至第一行上方面板中显示的 TreeView
- 仅当至少有一行数据时才会发生这种情况,并且仅当将鼠标移动到第一行数据上时才会发生
以下是应用程序崩溃时的堆栈跟踪:
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.
=================================================================
很难给出任何代码,因为它是我专有的雇主,这是相当混乱的代码。我只是想知道是否有人对一些可能导致我可以寻找的一般情况有一些提示。
另外,请不要只是回复“使用更高版本的 Mono”等。这是我工作的环境。如果存在一些与此相关的 Mono 错误,那将是有用的信息。
请注意,我确实在这里发现了一个问题: MonoTouch NullReference for every event/Action (SIGSEGV ),
其中提到了带有附加事件的本地 UI 组件被处理。我在代码中进行了搜索,唯一具有事件的本地 UI 组件是 2 个弹出菜单项。但是,在这种情况下代码没有被命中,因为我没有触发菜单(右键单击)。
谢谢。
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.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
Mono 2.6.7 有点老了,你能用稳定的 Mono 2.10.6 进行测试吗?
Mono 2.6.7 is kind of old, can you test with stable Mono 2.10.6?
你说“请不要只是回复“使用更高版本的 Mono”,但我只是不明白你怎么不走这条路。也许崩溃是因为 GtkSharp 过时且有错误,也许是鉴于所发布的错误,我们只是不知道是什么原因造成的。话
虽如此,我会在单个窗口上编写一个带有 UI 的测试用例,然后尝试将问题隔离在专有应用程序之外。如果问题仍然存在的话可以在这里发布代码,这将更容易让人们查明问题,甚至协助针对 Mono 或 GtkSharp 等进行错误归档。
You said "please do not just reply with "use a later version of Mono" but I just don't see how you don't go down that route. Perhaps the crashes are coming from GtkSharp being out of date and buggy, perhaps it's Mono. We just don't know what is causing it given the error posted.
With that said, I'd write up a test case with the UI on a single window and then try to isolate the problem outside of the proprietary app. This way if the problem is still occurring you can post code here that will be easier for people to pinpoint a problem or even assist in bug filing against Mono or GtkSharp, etc..
问题恰好是我们使用的 cairo 包中的一个错误。我们升级到新版本 - 问题已解决。该错误与在单元格中渲染像素缓冲区有关。
对于其他 2 篇文章,是的,使用较新版本的 Mono 会很棒。然而,我们在支持遗留项目的同时,却在时间/金钱的限制下开展工作。希望明年我们会努力升级 Mono 并测试所有内容。
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.