Bug 339174 - Opening some dialogs in eclipse-4.4 freezes the application with oxygen-gtk2-1.4.5
Summary: Opening some dialogs in eclipse-4.4 freezes the application with oxygen-gtk2-...
Status: RESOLVED FIXED
Alias: None
Product: Oxygen
Classification: Plasma
Component: gtk2-engine (show other bugs)
Version: 1.4.5
Platform: Fedora RPMs Linux
: NOR crash
Target Milestone: ---
Assignee: Hugo Pereira Da Costa
URL:
Keywords:
: 339507 (view as bug list)
Depends on:
Blocks:
 
Reported: 2014-09-18 13:48 UTC by Jiri Popelka
Modified: 2014-12-13 21:14 UTC (History)
16 users (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments
tentative patch (1.23 KB, patch)
2014-10-01 10:18 UTC, Hugo Pereira Da Costa
Details
tentative patch (1.17 KB, patch)
2014-10-01 10:22 UTC, Hugo Pereira Da Costa
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jiri Popelka 2014-09-18 13:48:17 UTC
When I run 'eclipse -debug -console' and open one of the respective dialogs, Eclipse freezes and I can see the following in console:

java: /builddir/build/BUILD/oxygen-gtk2-1.4.5/src/animations/oxygencomboboxdata.cpp:87: void Oxygen::ComboBoxData::setButton(GtkWidget*): Assertion `!_button._widget' failed.

Reproducible: Always

Steps to Reproduce:
1. eclipse -debug -console
2. Project Explorer -> New -> C Project

Actual Results:  
Eclipse freezes

Expected Results:  
no problems

https://bugs.eclipse.org/bugs/show_bug.cgi?id=440660
Comment 1 Axel Müller 2014-09-29 11:26:18 UTC
Bug was introduced in the 4.4.1 update. I can confirm on Kubuntu 14.04 (KDE 4.13.3, gtk-egine 1.4.5). Eclipse will crash immediately if you open any dialog in Eclipse (see above asertion).

Workaround: do not use the oxygen-gtk theme for GTK applications (you can change it in the KDE system settings)
Comment 2 Ruslan Kabatsayev 2014-09-29 11:53:31 UTC
I can't reproduce this bug on Ubuntu 12.04 with oxygen-gtk v1.4.5-52-g39ca053 (current git) and Eclipse 4.4.1 downloaded from eclipse.org.
What GTK2 version are you using? Mine is 2.24.10.
Comment 3 Axel Müller 2014-09-29 12:22:52 UTC
(In reply to Ruslan Kabatsayev from comment #2)
> I can't reproduce this bug on Ubuntu 12.04 with oxygen-gtk
> v1.4.5-52-g39ca053 (current git) and Eclipse 4.4.1 downloaded from
> eclipse.org.
> What GTK2 version are you using? Mine is 2.24.10.
I am using gtk 2.24.23 on Ubuntu 14.04. gtk2-engines-oxygen (1.4.5-0ubuntu1).
Comment 4 Ruslan Kabatsayev 2014-09-29 14:43:41 UTC
*** Bug 339507 has been marked as a duplicate of this bug. ***
Comment 5 Zsombor 2014-09-30 06:27:59 UTC
I have the same problem, if I change the line with the failing assert in oxygencomboboxdata.cpp, to " if( _button._widget ) return" - then this crash disapears. I'm not sure, if it's a proper fix, but I haven't found any problem with it.
Comment 6 Ghislain Nadeau 2014-10-01 03:51:45 UTC
Same problem. I wonder if it's an Eclipse or KDE bug, everything was wonking fine a few days ago.
I just made a kubuntu update, and reinstalled eclipse, so i don't know which one is the culprit
Comment 7 rudi.mail90 2014-10-01 09:33:36 UTC
Always Reproducible using Eclipse 4.4.1.M20140925-0400 64-bit on Linux Mint 17 64-bit using Oxygen as GTK2 theme.

To reproduce, press Ctrl+H (search in files), Eclipse immediately crash with below output.

Console Output:

rudi@rudi:~ > eclipse_jee/eclipse 
Java HotSpot(TM) 64-Bit Server VM warning: ignoring option MaxPermSize=256m; support was removed in 8.0
org.eclipse.m2e.logback.configuration: The org.eclipse.m2e.logback.configuration bundle was activated before the state location was initialized.  Will retry after the state location is initialized.
org.eclipse.m2e.logback.configuration: Logback config file: /home/rudi/space_spring/.metadata/.plugins/org.eclipse.m2e.logback.configuration/logback.1.5.0.20140606-0033.xml
org.eclipse.m2e.logback.configuration: Initializing logback
java.lang.ClassCastException: org.eclipse.osgi.internal.framework.EquinoxConfiguration$1 cannot be cast to java.lang.String
        at org.eclipse.m2e.logback.configuration.LogHelper.logJavaProperties(LogHelper.java:26)
        at org.eclipse.m2e.logback.configuration.LogPlugin.loadConfiguration(LogPlugin.java:189)
        at org.eclipse.m2e.logback.configuration.LogPlugin.configureLogback(LogPlugin.java:144)
        at org.eclipse.m2e.logback.configuration.LogPlugin.access$2(LogPlugin.java:107)
        at org.eclipse.m2e.logback.configuration.LogPlugin$1.run(LogPlugin.java:62)
        at java.util.TimerThread.mainLoop(Timer.java:555)
        at java.util.TimerThread.run(Timer.java:505)
[INFO] Setting property: classpath.resource.loader.class => 'org.codehaus.plexus.velocity.ContextClassLoaderResourceLoader'.
[INFO] Setting property: velocimacro.messages.on => 'false'.
[INFO] Setting property: resource.loader => 'classpath'.
[INFO] Setting property: resource.manager.logwhenfound => 'false'.
2014-10-01 16:22:52.461:INFO::Logging to STDERR via org.mortbay.log.StdErrLog
16:22:52.777 [Worker-1] DEBUG JRebelPlugin - Starting plugin
java: /build/buildd/gtk2-engines-oxygen-1.4.5/src/animations/oxygencomboboxdata.cpp:87: void Oxygen::ComboBoxData::setButton(GtkWidget*): Assertion `!_button._widget' failed.

System Info:
gtk2-engines-oxygen package version 1.4.5-0ubuntu1
java version "1.8.0_20"
Java(TM) SE Runtime Environment (build 1.8.0_20-b26)
Java HotSpot(TM) 64-Bit Server VM (build 25.20-b23, mixed mode)
KDE 4.13.3

*** Date: Wednesday, October 1, 2014 at 4:29:09 PM Western Indonesia Time

*** Platform Details:

*** System properties:
applicationXMI=org.eclipse.ui.workbench/LegacyIDE.e4xmi
awt.toolkit=sun.awt.X11.XToolkit
com.atlassian.connector.eclipse.branding.ui.isOnlyJiraInstalled=false
eclipse.application=org.eclipse.ui.ide.workbench
eclipse.buildId=4.4.1.M20140925-0400
eclipse.commands=-os
linux
-ws
gtk
-arch
x86_64
-showsplash
/home/rudi/eclipse_jee//plugins/org.eclipse.platform_4.4.0.v20140925-0400/splash.bmp
-launcher
/home/rudi/eclipse_jee/eclipse
-name
Eclipse
--launcher.library
/home/rudi/eclipse_jee//plugins/org.eclipse.equinox.launcher.gtk.linux.x86_64_1.1.200.v20140603-1326/eclipse_1605.so
-startup
/home/rudi/eclipse_jee//plugins/org.eclipse.equinox.launcher_1.3.0.v20140415-2008.jar
--launcher.appendVmargs
-exitdata
5030020
-product
org.eclipse.epp.package.jee.product
-vm
/usr/bin/java
eclipse.home.location=file:/home/rudi/eclipse_jee/
eclipse.launcher=/home/rudi/eclipse_jee/eclipse
eclipse.launcher.name=Eclipse
eclipse.p2.data.area=@config.dir/../p2/
eclipse.p2.profile=epp.package.jee
eclipse.product=org.eclipse.epp.package.jee.product
eclipse.startTime=1412155482672
eclipse.stateSaveDelayInterval=30000
eclipse.vm=/usr/bin/java
eclipse.vmargs=-Xverify:none
-Dosgi.requiredJavaVersion=1.6
-XX:MaxPermSize=256m
-Xms1500m
-Xmx1500m
-jar
/home/rudi/eclipse_jee//plugins/org.eclipse.equinox.launcher_1.3.0.v20140415-2008.jar
equinox.use.ds=true
file.encoding=UTF-8
file.encoding.pkg=sun.io
file.separator=/
gosh.args=--nointeractive
guice.disable.misplaced.annotation.check=true
java.awt.graphicsenv=sun.awt.X11GraphicsEnvironment
java.awt.printerjob=sun.print.PSPrinterJob
java.class.path=/home/rudi/eclipse_jee//plugins/org.eclipse.equinox.launcher_1.3.0.v20140415-2008.jar
java.class.version=52.0
java.endorsed.dirs=/usr/lib/jvm/java-8-oracle/jre/lib/endorsed
java.ext.dirs=/usr/lib/jvm/java-8-oracle/jre/lib/ext:/usr/java/packages/lib/ext
java.home=/usr/lib/jvm/java-8-oracle/jre
java.io.tmpdir=/tmp
java.library.path=/usr/java/packages/lib/amd64:/usr/lib64:/lib64:/lib:/usr/lib
java.runtime.name=Java(TM) SE Runtime Environment
java.runtime.version=1.8.0_20-b26
java.specification.name=Java Platform API Specification
java.specification.vendor=Oracle Corporation
java.specification.version=1.8
java.vendor=Oracle Corporation
java.vendor.url=http://java.oracle.com/
java.vendor.url.bug=http://bugreport.sun.com/bugreport/
java.version=1.8.0_20
java.vm.info=mixed mode
java.vm.name=Java HotSpot(TM) 64-Bit Server VM
java.vm.specification.name=Java Virtual Machine Specification
java.vm.specification.vendor=Oracle Corporation
java.vm.specification.version=1.8
java.vm.vendor=Oracle Corporation
java.vm.version=25.20-b23
line.separator=
Comment 8 rudi.mail90 2014-10-01 09:36:12 UTC
BTW, although GTK2 theme was set to "Oxygen", my KDE Widget style is actually "QtCurve".

Workaround: System Settings > Application Appearance > GTK > Set GTK2 theme to "Redmond" or others (Clearlooks works too).
Comment 9 Hendy Irawan 2014-10-01 09:50:42 UTC
Thanks Rudi for info :)
Comment 10 Hugo Pereira Da Costa 2014-10-01 09:58:31 UTC
People, please,
this is not a forum.
this is a bug report.
messages saying thanks to other messages bring no information
duplicated messages (such as workarounds) bring no information
In fact they tend to dilute the information relevant for actually investigating the issue.
Comment 11 Hugo Pereira Da Costa 2014-10-01 10:05:11 UTC
(In reply to Zsombor from comment #5)
> I have the same problem, if I change the line with the failing assert in
> oxygencomboboxdata.cpp, to " if( _button._widget ) return" - then this crash
> disapears. I'm not sure, if it's a proper fix, but I haven't found any
> problem with it.

Hi Zsombor,

The assertion failing means that something is likely broken upstream 
(two gtk buttons are associated to the same combobox, which should not happen)

One could either "return" as you suggest, to ignore the second button, or just use the new one (bit more changes), but I think it would make more sense

Now, since neither Ruslan nor I can reproduce the issue it is somewhat hard to test.
I will send two patches (this one, and one that uses the second), for you to test, if you don't mind.
If the second also fixes the issue on your side, I guess I'll push the change.

Thanks in advance,

Hugo
Comment 12 Hugo Pereira Da Costa 2014-10-01 10:06:43 UTC
(In reply to Ghislain Nadeau from comment #6)
> Same problem. I wonder if it's an Eclipse or KDE bug, everything was wonking
> fine a few days ago.
> I just made a kubuntu update, and reinstalled eclipse, so i don't know which
> one is the culprit

nothing has changed on oxygen-gtk for month.
So this is either
- an upstream bug (gtk, ecclipse, swt ...)
or an old bug, never triggered before changes to upstream code.
Comment 13 Hugo Pereira Da Costa 2014-10-01 10:18:21 UTC
Created attachment 88914 [details]
tentative patch

This patch disconnect the "old" button assigned to the combobox, and connects the new one.
Please tell me if it 'still' fixes the issue
Comment 14 Hugo Pereira Da Costa 2014-10-01 10:22:30 UTC
Created attachment 88915 [details]
tentative patch

This patch is similar to the one proposed in comment #5, plus a warning.
Will be pushed in the one posted in the previous comment does not work.
Comment 15 Ruslan Kabatsayev 2014-10-01 10:31:04 UTC
I'm now able to reproduce this crash in a virtual Kubuntu 14.04 i386 system. Easily reproduces when I open Eclipse-CDT, select File->New->C Project, and then click in the element under the one selected in the tree view (not sure if this click is necessary, things were running rather slow, and I only saw the assertion failure after the click).

I'll try to test your patches when I'm at home.
Comment 16 Axel Müller 2014-10-01 12:11:56 UTC
This seems to be a bug in GTK according to https://bugs.launchpad.net/ubuntu/+source/gtk2-engines-oxygen/+bug/1242801
(there a similar problem for Meld was reported).
Another workaround mentioned there is
For oxygen, edit the normally already existing file "/usr/share/themes/oxygen-gtk/gtk-2.0/gtkrc" and change
    GtkComboBox::appears-as-list = 1
into
    GtkComboBox::appears-as-list = 0
Comment 17 Ruslan Kabatsayev 2014-10-01 14:55:31 UTC
Indeed, this seems to be true, just checked. Looks like this bug  is a duplicate of bug 326424.
Comment 18 xor 2014-10-05 16:39:07 UTC
Can confirm: Makes Eclipse Luna (latest) unusable for me on Kubuntu 14.04 amd64. Crashes at Launch configuration / Debug configuration window every time. Those are very important parts of the UI, without them Eclipse is useless.
Comment 19 Ruslan Kabatsayev 2014-10-05 18:12:00 UTC
OK, I've tested both patches. Of course, both avoid the crash, but the first one works better: in the "New C Project" dialog, if I unset "Use default location", clicking "Choose file system" (with "default" text by default) makes the button press as a whole. With the second patch, which just ignores the new button, only the down-arrow-button is rendered sunken, while the text field part remains unpressed.
Also, the second (ignore new button one) spits lots of warnings to the console, while the first one only prints one warning.
Comment 20 Hugo Pereira Da Costa 2014-10-05 18:23:09 UTC
Hi Ruslan,
Thanks for the testing.
The patch behavior you describe is more or less expected. So I'll push the first patch, and close this bug report.
Then we'll have to make a new release in a couple of days, I guess ...
Comment 21 Hugo Pereira Da Costa 2014-10-05 18:26:36 UTC
Git commit 1d25c917611546a944d3aee56fc792c4eab87d89 by Hugo Pereira Da Costa.
Committed on 01/10/2014 at 10:17.
Pushed by hpereiradacosta into branch '1.4'.

Disconnect old button if already set
Connect new button

M  +7    -1    src/animations/oxygencomboboxdata.cpp

http://commits.kde.org/oxygen-gtk/1d25c917611546a944d3aee56fc792c4eab87d89
Comment 22 Hugo Pereira Da Costa 2014-10-05 18:27:45 UTC
Git commit 68e4caa170f6103cd4a2b5e51a14190dc1fa6cbf by Hugo Pereira Da Costa.
Committed on 01/10/2014 at 10:17.
Pushed by hpereiradacosta into branch 'gtk3'.

Disconnect old button if already set
Connect new button

M  +7    -1    src/animations/oxygencomboboxdata.cpp

http://commits.kde.org/oxygen-gtk/68e4caa170f6103cd4a2b5e51a14190dc1fa6cbf