Zend Studio Crashes with Segmentation Fault in KDE 4.11

Symptom

KDE users on Linux may face a theme related issue where in Zend Studio crashes at seemingly random actions or even fails to start. If started from the console, an error message appears that is similar to the one below:

#
# A fatal error has been detected by the Java Runtime Environment:
#
#  SIGSEGV (0xb) at pc=0x00007f1ce04b26b8, pid=12553, tid=139762088978176
#
# JRE version: OpenJDK Runtime Environment (7.0_51) (build 1.7.0_51-b00)
# Java VM: OpenJDK 64-Bit Server VM (24.45-b08 mixed mode linux-amd64 compressed oops)
# Problematic frame:
# C  [libgobject-2.0.so.0+0x1a6b8]  g_object_get_qdata+0×18
#
# Failed to write core dump. Core dumps have been disabled. To enable core dumping, try "ulimit -c unlimited" before starting Java again
#
# An error report file with more information is saved as:
# /tmp/jvm-12553/hs_error.log
Compiled method (nm)   25374 1211     n       org.eclipse.swt.internal.gtk.OS::_g_object_get_qdata (native)
 total in heap  [0x00007f1cd92ecad0,0x00007f1cd92ece50] = 896
 relocation     [0x00007f1cd92ecbf0,0x00007f1cd92ecc50] = 96
 main code      [0x00007f1cd92ecc60,0x00007f1cd92ece50] = 496
#
# If you would like to submit a bug report, please include
# instructions on how to reproduce the bug and visit:
#   http://icedtea.classpath.org/bugzilla
# The crash happened outside the Java Virtual Machine in native code.
# See problematic frame for where to report the bug.
#

 

Technical Details

The problem is caused by the incompatibility of the selected GTK2 theme with Eclipse. The problem is relevant to any Eclipse-based product, including Zend Studio.

Resolution / Workaround

A different GTK2 theme needs to be set for programs run under KDE. To do this:

  1. Open the System Settings application (systemsettings).
  2.  Go to Application Appearance.
  3. Open the GTK page.
  4. Switch the GTK2 theme to either "Raleigh" or "Adwaita" and click Apply.
    There may be more themes that work correctly with Eclipse. This depends on the Linux distribution; also there is a vast amount of themes available on-line.
  5. Restart Zend Studio.

 

Alternatively, you can run only Zend Studio with a different GTK2 theme. To do this, launch Zend Studio in a modified environment.

To launch Zend Studio with Adwaita GTK2 theme, run the following command (make sure you adjust Zend Studio location for your installation):

$ env GTK2_RC_FILES="/usr/share/themes/Adwaita/gtk-2.0/gtkrc" /home/user/Zend/ZendStudio/ZendStudio

 

To launch Zend Studio with the default GTK2 theme (usually Raleigh), you can simply use empty value for $GTK2_RC_FILES

$ env GTK2_RC_FILES="" /home/user/Zend/ZendStudio/ZendStudio