Summary: | Eclipse crashes in debug mode and using oxygen-gtk | ||
---|---|---|---|
Product: | [Plasma] Oxygen | Reporter: | javicid |
Component: | gtk2-engine | Assignee: | Hugo Pereira Da Costa <hugo.pereira.da.costa> |
Status: | RESOLVED FIXED | ||
Severity: | crash | CC: | ansgar.radermacher, asraniel, b7.10110111, claudiolanconelli, daniel.armbrust.list, darose, hugo.pereira.da.costa, javicid, kde, loskutov, manuel.steurer, mparker, renszarv07, sskyman, web |
Priority: | NOR | ||
Version: | 1.4.5 | ||
Target Milestone: | --- | ||
Platform: | Kubuntu | ||
OS: | Linux | ||
Latest Commit: | https://commits.kde.org/oxygen-gtk/ef3c0cdfa18a6f612e5ba84e42bcd288374669fb | Version Fixed In: | |
Sentry Crash Report: | |||
Attachments: |
error report
gdb core backtrace java crash log patch that fixes the bug |
Description
javicid
2014-08-04 00:28:31 UTC
I've had the same problem, the error happens quite often (every 2nd debug session). See also https://bugs.eclipse.org/bugs/show_bug.cgi?id=421073. Switching to the cleanlooks theme solved this problem - and apparently also frequent crashes of the vmware player (should that be posted as a separate bug?) Created attachment 89244 [details]
gdb core backtrace
A similar crash occurred with my Eclipse based rcp application On OpenSuse 13.1 with oxygen-gtk theme, I attached the backtrace that gdb gave for the core dump. Frame #8 is the crash site, frames 7 to 1 are just the usual java crash signal handling. Frames 9-14 are inside liboxygen-gtk.so.
Created attachment 89245 [details]
java crash log
This is the java crash log from the same crash.
*** This bug has been confirmed by popular vote. *** I have the same issue on Kubuntu 14.04 64bit, Oracle jdk 1.7.0_72, Android adt-bundle-linux-x86_64-20140702 (based on Eclipse Juno), oxygen-gtk theme I have been experiencing this crash for years and am still seeing it in Oxygen-Gtk2 1.4.6. Here is some more information. #6 <signal handler called> #7 0x00007f724774a012 in IA__gtk_tree_view_get_background_area (tree_view=tree_view@entry=0x7f72b9630b50, path=0x7f72b8a2cdb0, column=0x7f72b92b5840, rect=rect@entry=0x7f72be2345b0) at ../../gtk+-2.24.31/gtk/gtktreeview.c:13035 #8 0x00007f7247434af5 in Oxygen::Gtk::CellInfo::backgroundRect (this=this@entry=0x7f72b9771320, treeView=treeView@entry=0x7f72b9630b50) at ../../oxygen-gtk2-1.4.6/src/oxygengtkcellinfo.cpp:206 #9 0x00007f7247425fbd in Oxygen::TreeViewStateData::dirtyRect (this=this@entry=0x7f72b9771278) at ../../oxygen-gtk2-1.4.6/src/animations/oxygentreeviewstatedata.cpp:129 #10 0x00007f7247426130 in Oxygen::TreeViewStateData::delayedUpdate (pointer=0x7f72b9771278) at ../../oxygen-gtk2-1.4.6/src/animations/oxygentreeviewstatedata.cpp:176 #11 0x00007f7247425c89 in Oxygen::TreeViewStateData::updateState (this=this@entry=0x7f72b9771278, info=..., state=<optimized out>) at ../../oxygen-gtk2-1.4.6/src/animations/oxygentreeviewstatedata.cpp:91 #12 0x00007f7247403f0e in Oxygen::TreeViewStateEngine::get (this=0x7f72b83329d0, widget=<optimized out>, info=..., options=...) at ../../oxygen-gtk2-1.4.6/src/animations/oxygentreeviewstateengine.h:92 #13 0x00007f72474ad850 in Oxygen::draw_expander (style=<optimized out>, window=0x7f72b9d9ba20, state=<optimized out>, clipRect=0x7f72be234840, widget=0x7f72b9630b50, detail=0x7f72477e0ba6 "treeview", x=6, y=10, expanderStyle=GTK_EXPANDER_COLLAPSED) at ../../oxygen-gtk2-1.4.6/src/oxygenstylewrapper.cpp:2738 #14 0x00007f724773d6fa in gtk_tree_view_draw_arrow (tree_view=tree_view@entry=0x7f72b9630b50, tree=tree@entry=0x7f72b904d7d0, node=node@entry=0x7f72b9335120, x=x@entry=0, y=y@entry=7) at ../../gtk+-2.24.31/gtk/gtktreeview.c:9576 #15 0x00007f7247743ba0 in do_prelight (tree_view=tree_view@entry=0x7f72b9630b50, tree=0x7f72b904d7d0, node=0x7f72b9335120, x=0, y=7) at ../../gtk+-2.24.31/gtk/gtktreeview.c:3270 #16 0x00007f724774b134 in prelight_or_select (tree_view=tree_view@entry=0x7f72b9630b50, tree=<optimized out>, node=<optimized out>, x=<optimized out>, y=<optimized out>) at ../../gtk+-2.24.31/gtk/gtktreeview.c:3320 #17 0x00007f724774da25 in gtk_tree_view_enter_notify (widget=widget@entry=0x7f72b9630b50, event=0x7f72b8f0bca0) at ../../gtk+-2.24.31/gtk/gtktreeview.c:5620 (gdb) frame 9 #9 0x00007f7247425fbd in Oxygen::TreeViewStateData::dirtyRect (this=this@entry=0x7f72b9771278) at ../../oxygen-gtk2-1.4.6/src/animations/oxygentreeviewstatedata.cpp:129 129 const GdkRectangle previousRect( _previous._info.backgroundRect( treeView ) ); (gdb) frame 8 #8 0x00007f7247434af5 in Oxygen::Gtk::CellInfo::backgroundRect (this=this@entry=0x7f72b9771320, treeView=treeView@entry=0x7f72b9630b50) at ../../oxygen-gtk2-1.4.6/src/oxygengtkcellinfo.cpp:206 206 { gtk_tree_view_get_background_area( treeView, _path, _column, &out ); } (gdb) frame 7 #7 0x00007f724774a012 in IA__gtk_tree_view_get_background_area (tree_view=tree_view@entry=0x7f72b9630b50, path=0x7f72b8a2cdb0, column=0x7f72b92b5840, rect=rect@entry=0x7f72be2345b0) at ../../gtk+-2.24.31/gtk/gtktreeview.c:13035 13035 g_return_if_fail (column == NULL || GTK_IS_TREE_VIEW_COLUMN (column)); (gdb) print *column $1 = {parent = {parent_instance = {g_type_instance = {g_class = 0x3f0000003f000000}, ref_count = 0, qdata = 0xa}, flags = 0}, tree_view = 0x0, button = 0x0, child = 0x7f72b8ac0180, arrow = 0x1, alignment = 0x7f72b8f0da30, window = 0x310fe0, editable_widget = 0xe00, xalign = 0, property_changed_signal = 0, spacing = -1185748944, column_type = (GTK_TREE_VIEW_COLUMN_FIXED | unknown: 32624), requested_width = 28, button_request = 25, resized_width = 96, width = 0, fixed_width = 28, min_width = 25, max_width = -1184045376, drag_x = 32626, drag_y = -1180018624, title = 0x0, cell_list = 0x0, sort_clicked_signal = 3093474752, sort_column_changed_signal = 32626, sort_column_id = -1188131744, sort_order = (unknown: 32626), visible = 0, resizable = 0, clickable = 0, dirty = 0, show_sort_indicator = 0, maybe_reordered = 0, reorderable = 0, use_resized_width = 0, expand = 0} As you can see, Oxygen-Gtk is attempting to check that the Oxygen::Gtk::CellInfo::_column data member points to a valid GtkTreeViewColumn, but the referent of the pointer has already been freed, leaving a garbage address in g_class, which causes the G_TYPE_CHECK_INSTANCE_TYPE in GTK_IS_TREE_VIEW_COLUMN to segfault. Probably Oxygen::Gtk::CellInfo should not be holding onto a pointer to a GtkTreeViewColumn instance without incrementing its reference count. Created attachment 104832 [details]
patch that fixes the bug
I couldn't find a way to reference count the GtkTreeViewColumn without causing crashes in Gtk, but I did find a way to fix the bug by having Oxygen-Gtk remember the column index rather than a pointer to the column.
IIRC, oxygen-gtk is no longer being supported. (Since the upgrade to gtk3.) So probably best to just bite the bullet and switch to a GTK3 supported theme, like adwaita. (In reply to David Rosenstrauch from comment #8) > IIRC, oxygen-gtk is no longer being supported. (Since the upgrade to gtk3.) GTK3 support in SWT (the GUI toolkit that Eclipse uses) is half-baked (lots of widgets appear unfinished), so I run Eclipse in GTK2 mode, which works perfectly now that I've fixed this bug in Oxygen-GTK2. > So probably best to just bite the bullet and switch to a GTK3 supported > theme, like adwaita. Oxygen is not even an option for GTK3 theme on my system. I use Breeze as my GTK3 theme, but this is irrelevant to Eclipse running in GTK2 mode. Git commit ef3c0cdfa18a6f612e5ba84e42bcd288374669fb by Hugo Pereira Da Costa. Committed on 06/04/2017 at 15:32. Pushed by hpereiradacosta into branch 'master'. Patch from Matt Whitlock to fix crash in ecclipse about invalid columns. M +32 -46 src/oxygengtkcellinfo.cpp M +14 -8 src/oxygengtkcellinfo.h https://commits.kde.org/oxygen-gtk/ef3c0cdfa18a6f612e5ba84e42bcd288374669fb @Matt Thanks for the patch. Unfortunately, and as mentionned by David, oxygen-gtk (either 2 nor 3) are not supported any more (first because oxygen is not the default kde theme any more, second because of the gtk3 fiasco.) In particular this means that there will not be any new release of oxygen-gtk2. Still, your patch is much appreciated, and I have merged it to the code, and pushed it to the master branch. Regards, Hugo |