Java crashes during Eclipse Helios Start

Bug #598371 reported by Paweł Smoliński on 2010-06-25
This bug affects 7 people
Affects Status Importance Assigned to Milestone
eclipse (Ubuntu)
gtk-qt-engine (Ubuntu)

Bug Description

It happens when I press "OK" button on workspace-chose-window during Eclipse start (clean installation)

# A fatal error has been detected by the Java Runtime Environment:
# SIGSEGV (0xb) at pc=0x00007fd843bb62b0, pid=2671, tid=140567681361680
# JRE version: 6.0_18-b18
# Java VM: OpenJDK 64-Bit Server VM (14.0-b16 mixed mode linux-amd64 )
# Derivative: IcedTea6 1.8
# Distribution: Ubuntu lucid (development branch), package 6b18-1.8-0ubuntu1
# Problematic frame:
# C [] g_object_get_qdata+0x20
# An error report file with more information is saved as:
# /home/pawel/bin/hs_err_pid2671.log
# If you would like to submit a bug report, please include
# instructions how to reproduce the bug and visit:
# The crash happened outside the Java Virtual Machine in native code.
# See problematic frame for where to report the bug.

apetrelli (antonio-petrelli) wrote :

I have the same problem, but I think this is a problem with glib, not openjdk.

Checked in other OS (Slackware) and there is working fine, so it looks it's bug in glib.

affects: openjdk-6 (Ubuntu) → glib2.0 (Ubuntu)
Sebastien Bacher (seb128) wrote :

it doesn't seem to be a glib bug or nothing indicates it in the details there at least

affects: glib2.0 (Ubuntu) → openjdk-6 (Ubuntu)
apetrelli (antonio-petrelli) wrote :

Sebastien, why not? libgobject is part of libglib package.

apetrelli (antonio-petrelli) wrote :

I tried Eclipse Helios with Sun's JDK (downloaded from Sun's site) and it crashes the same. I attach the crash log.

apetrelli (antonio-petrelli) wrote :
hazica (hazica) wrote :

I was struggling with the exact same issue, on my Kubuntu 10.04 64 Bit machine. The issue was resolved by doing a simple system update. (I had not done this for quite some time: 3-4 weeks) Hope this helps

apetrelli (antonio-petrelli) wrote :

The update didn't work for me, thanks anyway.

It looks that is the bug in the GTK or Eclipse SWT library.
During window close process method org.eclipse.widgets.Display.removeWidget() calls native method org.eclipse.swt.internal.gtk.OS._g_object_get_qdata() which causes segmentation fault (it not cause Java exception due we are in native code).
Display.removeWidget() source code:
Widget removeWidget (long /*int*/ handle) {
 if (handle == 0) return null;
 lastWidget = null;
 Widget widget = null;
 int index = (int)/*64*/ OS.g_object_get_qdata (handle, SWT_OBJECT_INDEX) - 1;
 if (0 <= index && index < widgetTable.length) {
  widget = widgetTable [index];
  widgetTable [index] = null;
  indexTable [index] = freeSlot;
  freeSlot = index;
  OS.g_object_set_qdata (handle, SWT_OBJECT_INDEX, 0);
 return widget;

native method implementation:
JNIEXPORT jintLong JNICALL OS_NATIVE(_1g_1object_1get_1qdata)
 (JNIEnv *env, jclass that, jintLong arg0, jint arg1)
 jintLong rc = 0;
 OS_NATIVE_ENTER(env, that, _1g_1object_1get_1qdata_FUNC);
 rc = (jintLong)g_object_get_qdata((GObject *)arg0, (GQuark)arg1);
 OS_NATIVE_EXIT(env, that, _1g_1object_1get_1qdata_FUNC);
 return rc;

I see here 2 places which can mess:
- g_object_set_qdata returns handle, which is then casted to int (in amd64 sizeof(int) is still 4!)
- if first arg (casted to GObect*) is greather than 2^63 we will have negative long value and it can cause segmentation fault (pointer to negative memory address) - shouldn't be unsigned long putted here?

In Eclipse Bugzilla guys found that gtk-qt-engine is guilty here. Turning off this (switching from QtCurve to Raleigh) solves the problem. More info:

Matthias Klose (doko) wrote :

this is a locally installed version of eclipse. please report the problem where you did download this binary.
please recheck if this is reproducible with the eclipse version distributed by Ubuntu

affects: openjdk-6 (Ubuntu) → eclipse (Ubuntu)
Changed in eclipse (Ubuntu):
status: New → Incomplete
Andreas Göb (agoeb) wrote :

Currently there seems to be no Ubuntu package of Eclipse Helios (3.6).
Wouldn't it be better to resolve this in gtk-qt-engine rather than in the Ubuntu eclipse package? This would prevent similar problems with other GTK applications.

Niels Thykier (niels-thykier) wrote :

Hi gtk-qt-engine people

I would like your opinion on this; you may also want to read the bug log on the eclipse tracker[1].


Changed in eclipse (Ubuntu):
status: Incomplete → Opinion
Changed in eclipse (Ubuntu):
status: Opinion → New
Jonathan Thomas (echidnaman) wrote :

gtk-qt-engine is no longer in Ubuntu. (and is abandoned upstream, causing the former)

Changed in gtk-qt-engine (Ubuntu):
status: New → Won't Fix
Niels Thykier (niels-thykier) wrote :

Alright, I am closing this as invalid then since gtk-qt-engine has been removed and the eclipse binary involved is not from Ubuntu so we cannot really do much about it.


Changed in eclipse (Ubuntu):
status: New → Invalid
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers

Remote bug watches

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