Eclipse crashes in g_str_hash when using menu proxy and "New Window"

Bug #1427866 reported by Marc-Andre Laperle
30
This bug affects 4 people
Affects Status Importance Assigned to Milestone
unity-gtk-module (Ubuntu)
Confirmed
High
William Hua

Bug Description

Ubuntu 14.04.2 LTS
unity-gtk2-module:
  Installed: 0.0.0+14.04.20141212-0ubuntu1

1. Download Eclipse 4.4.2 available here:
https://www.eclipse.org/downloads/download.php?file=/technology/epp/downloads/release/luna/SR2/eclipse-java-luna-SR2-linux-gtk-x86_64.tar.gz
2. Start Eclipse. Close the Welcome screen.
3. Mouse over to "Window" menu on top bar, click, move mouse down to "New Window", click to open a new, empty window.
4. Mouse over to "Window" menu on top bar, click. Crash occurs.

If Eclipse is started with UBUNTU_MENUPROXY=0, it doesn't crash.

# SIGSEGV (0xb) at pc=0x00007fa88c654fe0, pid=3787, tid=140362505688832
#
# JRE version: OpenJDK Runtime Environment (7.0_75-b13) (build 1.7.0_75-b13)
# Java VM: OpenJDK 64-Bit Server VM (24.75-b04 mixed mode linux-amd64 compressed oops)
# Derivative: IcedTea 2.5.4
# Distribution: Ubuntu 14.04 LTS, package 7u75-2.5.4-1~trusty1
# Problematic frame:
# C [libglib-2.0.so.0+0x38fe0] g_str_hash+0x0

...

Java frames: (J=compiled Java code, j=interpreted, Vv=VM code)
j org.eclipse.swt.internal.gtk.OS._gtk_widget_show(J)V+0
j org.eclipse.swt.internal.gtk.OS.gtk_widget_show(J)V+8
j org.eclipse.swt.widgets.MenuItem.createHandle(I)V+248
j org.eclipse.swt.widgets.Widget.createWidget(I)V+2
j org.eclipse.swt.widgets.MenuItem.<init>(Lorg/eclipse/swt/widgets/Menu;II)V+38
j org.eclipse.ui.internal.SwitchToWindowMenu.fill(Lorg/eclipse/swt/widgets/Menu;I)V+97
j org.eclipse.jface.action.MenuManager.doItemFill(Lorg/eclipse/jface/action/IContributionItem;I)V+6
j org.eclipse.jface.action.MenuManager.update(ZZ)V+371
j org.eclipse.jface.action.MenuManager.handleAboutToShow()V+33

Tags: patch
Revision history for this message
Marc-Andre Laperle (malaperle) wrote :
Revision history for this message
Laurenz Kamp (laurenz-kamp) wrote :

I can confirm this bug. Same setup, also UBUNTU_MENUPROXY=0 prevents the crash.

Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in unity-gtk-module (Ubuntu):
status: New → Confirmed
Revision history for this message
Sxenos (sxenos) wrote :

Note that https://bugs.eclipse.org/bugs/show_bug.cgi?id=461311 has a short SWT-only code snippet that demonstrates the bug without the need to load all of Eclipse.

The steps to reproduce this using Eclipse are now more complicated since Eclipse has a workaround that disables the feature was adding a radio buttons to the Window menu when running under Ubuntu. You can still reproduce it with Eclipse by selecting Run -> Breakpoint Types. The Window menu no longer causes the crash.

Revision history for this message
Marc-Andre Laperle (malaperle) wrote :

This bug is fixed in Ubuntu >= 14.10 but a lot of people use 14.04 LTS. It would be very appreciated to get this fix backported to 14.04. I am attaching a simple patch that backports the fix to 14.04. Please let me know what I can go to help further in applying this fix. I can also create a Bazar branch if that it valuable. Thank you!

Revision history for this message
Ubuntu Foundations Team Bug Bot (crichton) wrote :

The attachment "Back-port of fix from 14.10" seems to be a patch. If it isn't, please remove the "patch" flag from the attachment, remove the "patch" tag, and if you are a member of the ~ubuntu-reviewers, unsubscribe the team.

[This is an automated message performed by a Launchpad user owned by ~brian-murray, for any issues please contact him.]

tags: added: patch
Revision history for this message
Marc-Andre Laperle (malaperle) wrote :

Ping? This would greatly help stability of Eclipse on Ubuntu and make Ubuntu look better. How can I help?

Changed in unity-gtk-module (Ubuntu):
assignee: nobody → William Hua (attente)
importance: Undecided → High
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.