Skip to main content
Skip table of contents

Linux GUI shell configuration notes

The GUI shell may fail on linux due to incompatibilities in supporting expected third party libraries, such as the linux specific SWT libraries. If this occurs then the following advice may be useful:

Identifying that the SWT library is the issue

The first clue that the shipped SWT Java library may be incompatible with your operating system can be obtained from the exception stack trace.

Consider the following example trace:

CODE
Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code)
C [libgobject-2.0.so.0+0x3234c] g_type_check_instance_cast+0x1c
j org.eclipse.swt.internal.gtk.OS.GTK_WIDGET_HAS_FOCUS(J)Z+8
j org.eclipse.swt.widgets.Control.forceFocus(J)Z+1
j org.eclipse.swt.widgets.Composite.forceFocus(J)Z+18
j org.eclipse.swt.widgets.Control.forceFocus()Z+54
j org.eclipse.swt.widgets.Control.setTabItemFocus(Z)Z+10
j org.eclipse.swt.widgets.Composite.setTabItemFocus(Z)Z+2
j org.eclipse.swt.widgets.Composite.setTabGroupFocus(Z)Z+61
j org.eclipse.swt.widgets.Control.traverseGroup(Z)Z+94
j org.eclipse.swt.widgets.Shell.open()V+31
j com.deltaxml.gui.view.swt.components.ComparisonShell.displaySettings()V+26
...

This trace suggests that:

  1. The final Java method to be invoked in the stack trace is from an internal package within a third party SWT library jar.

  2. The Java method in (1) invokes a native 'C' function - g_type_check_instance_cast - located in the libgobject-2.0.so.0 shared object.

  3. It is this native 'C' function, which is part of the operation system, that is not behaving in a compatible manner.

Incompatible SWT version

We are shipping 3.7 version of the SWT libraries, and from my initial exploration of Debian Linux distribution's package management they are now using 3.8 version.

Note: The libgobject-2.0.so.0 shared object appears to be in the libglib2.0-0 Debian package.

If you are using Eclipse then it might be worth checking which version of the SWT libraries your current eclipse is using and updating the deltaxml-gui.sh shell script to use these.
That is by appropriately modifying the line:

SWT_JAR="swt-lib/$SWT_NAME.jar";

It might also be worth downloading the 3.8 (or 4.2 which appears to be a slight variant of it - they are treating these as almost equivalent) from http://www.eclipse.org/swt/

Alternatively, you might want to get the relevant SWT versions from an eclipse download, or a Debian package.

Incompatible Java Virtual Machine

It might be worth trying either the OpenJDK or the Oracle/Sun JDK virtual machines to see if they can run the GUI successfully.

A customer provided solution (Support Case 365)

  • Log out from KDE and log in to Gnome instead. (Interestingly, Gnome is also the only place where logs are generated).

  • Switch to the java-6-openjdk-amd64 JRE (none of the Oracle ones worked).

  • Use the 4.3 SWT lib from eclipse.

Fixing problems with the libgobject-2.0.so shared object

A google search suggests that the libgobject-2.0.so.0 library has some known issues associated with it. For example, if you look at the following forum post, it shows a similar failure for LibreOffice, and the first link provides a workaround solution that appears to fix this and related issues for LibreOffice, eclipse and other applications.

http://forums.opensuse.org/showthread.php/496579-LibreOffice-crashing-because-of-GTK2-theme-issue

This seems the same problem as bug #1205452. The workaround mentioned there is applicable here. For convenience the workaround instructions are: 

  1. Open System Settings

  2. Select Application Appearance

  3. Select GTK

  4. Change the GTK2 theme to anything but oxygen-gtk

summary:
- fatal error Problematic frame: C [libgobject-2.0.so.0+0x19528]
- g_object_get_qdata+0x18
+ fatal error on eclipse Problematic frame: C
+ [libgobject-2.0.so.0+0x19528] g_object_get_qdata+0x18

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.