Bug #761

RCP: x.x, Linux crash at start-up job

Added by Matthieu Decorde almost 9 years ago. Updated over 8 years ago.

Status:Closed Start date:04/22/2014
Priority:Immediate Due date:
Assignee:Sebastien Jacquot % Done:

100%

Category:Démarrage Spent time: -
Target version:TXM 0.7.6

Description

Linux builds crash during start-up, during splash screen or start job

Error 1:

[xcb] Unknown request in queue while dequeuing
[xcb] Most likely this is a multi-threaded client and XInitThreads has not been called
[xcb] Aborting, sorry about that.
java: ../../src/xcb_io.c :179 : dequeue_pending_request:  l'assertion « !xcb_xlib_unknown_req_in_deq » a échoué.

Error 2:

[xcb] Unknown sequence number while processing queue
[xcb] Most likely this is a multi-threaded client and XInitThreads has not been called
[xcb] Aborting, sorry about that.
java: ../../src/xcb_io.c :274 : poll_for_event:  l'assertion « !xcb_xlib_threads_sequence_lost » a échoué.

Error 3:

JVM terminated. Exit code=1
/usr/bin/java
-Xms512m
-Xmx1024m
-Dfile.encoding=UTF-8
-jar /usr/lib/TXM/TXM//plugins/org.eclipse.equinox.launcher_1.3.0.v20130327-1440.jar
-os linux
-ws gtk
-arch x86_64
-showsplash
-launcher /usr/lib/TXM/TXM/TXM
-name TXM
--launcher.library /usr/lib/TXM/TXM//plugins/org.eclipse.equinox.launcher.gtk.linux.x86_64_1.1.200.v20130521-0416/eclipse_1506.so
-startup /usr/lib/TXM/TXM//plugins/org.eclipse.equinox.launcher_1.3.0.v20130327-1440.jar
--launcher.overrideVmargs
-exitdata 120007
- clearPersistedState
-run
-data /home/mdecorde/.txm
-user /home/mdecorde/.txm/user
-configuration /home/mdecorde/.txm/configuration
-vm /usr/bin/java
-vmargs
-Xms512m
-Xmx1024m
-Dfile.encoding=UTF-8
-jar /usr/lib/TXM/TXM//plugins/org.eclipse.equinox.launcher_1.3.0.v20130327-1440.jar

Under Ubuntu 12.04 64-bit, a further error message dialog box indicates:

The crashed program seems to use third-party or local libraries:

/home/sheiden/.txm/configuration/org.eclipse.osgi/bundles/119/1/.cp/libswt-gtk-4332.so
/home/sheiden/.txm/configuration/org.eclipse.osgi/bundles/119/1/.cp/libswt-cairo-gtk-4332.so
/home/sheiden/.txm/configuration/org.eclipse.osgi/bundles/119/1/.cp/libswt-pi-gtk-4332.so
/home/sheiden/.txm/configuration/org.eclipse.osgi/bundles/179/1/.cp/os/linux/x86_64/libunixfile_1_0_0.so
/home/sheiden/.txm/configuration/org.eclipse.osgi/bundles/119/1/.cp/libswt-atk-gtk-4332.so

It is highly recommended to check if the problem persists without those first.

Do you want to continue the report process anyway?

Error 4:

No message, but TXM is frozen

Error 5:

java: pthread_mutex_lock.c :113 : __pthread_mutex_lock:  l'assertion « mutex->__data.__owner == 0 » a échoué.

History

#1 Updated by Matthieu Decorde almost 9 years ago

  • Description updated (diff)

#2 Updated by Matthieu Decorde almost 9 years ago

  • Description updated (diff)

#3 Updated by Matthieu Decorde almost 9 years ago

  • Description updated (diff)

#4 Updated by Matthieu Decorde almost 9 years ago

  • Description updated (diff)

#5 Updated by Sebastien Jacquot almost 9 years ago

Does the crash occur when TXM is launched from Eclipse too ?
I tested the latest SVN version in Ubuntu 13.04 64bits/OpenJDK 7 and didn't got these problems.
I tested the last 0.7.5 stable setup with no errors too (0.7.5.201402120915)

#6 Updated by Sebastien Jacquot almost 9 years ago

  • Category set to UI
  • Status changed from New to Feedback
  • Assignee set to Sebastien Jacquot
  • Priority changed from Normal to Immediate
  • % Done changed from 0 to 50

I tested the latest SVN in Ubuntu with now openjdk6 and managed to reproduce the bugs (freeze, errors).
This appears to be an SWT/GTK bug related to concurrent threads access (GTK/AWT-Swing).
This bug seems to occur only with openjdk-6 (not 7) and with the Linux GTK Java Look and Feel(com.sun.java.swing.plaf.gtk.GTKLookAndFeel)

https://bugs.eclipse.org/bugs/show_bug.cgi?id=341799

The bug has been fixed by commenting the use of the default system L&F in SWTChartsComponentProvider constructor:

   try {
        UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());
        }
        catch(ClassNotFoundException e) {
            e.printStackTrace();
        }
        catch(InstantiationException e) {
            e.printStackTrace();
        }
        catch(IllegalAccessException e) {
            e.printStackTrace();
        }
        catch(UnsupportedLookAndFeelException e) {
            e.printStackTrace();
        }

It means the AWT/Swing components (if we need some) will used the Java L&F.
Here is a test we could do for deactivate the GTK L&F only:

  if (Platform.WS_GTK.equals(Platform.getWS())) {
        // Eclipse Bug 341799 workaround
        UIManager.setLookAndFeel("javax.swing.plaf.metal.MetalLookAndFeel");
      }
      else {
        UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());
      }

e.g.: at the moment, the context menu of JFreeChart chart editors will not use the system L&F but the Java L&F.

#7 Updated by Serge Heiden almost 9 years ago

  • Description updated (diff)

#8 Updated by Serge Heiden almost 9 years ago

That bug concerns Linux only, so ok for the rapid fix to only apply to Linux systems(1).
Notes:
  1. Eclipse/SWT was prefered to other graphic libraries because of its operating system L&F adaptation mecanism for ergonomic reasons (general UI infrastructure must be familiar to users - close to the rest of the local applications UI ecosystem: to make users rapidly and intuitively use the UI at least for basic interactions, lower the UI learning curve and help users be confident). It is important to keep that service at maximum (at least for Windows).

#9 Updated by Serge Heiden almost 9 years ago

Suggested fix of SJ: replace 4 classes (SWTChartsComponentProvider$3.class, SWTChartsComponentProvider$2.class, SWTChartsComponentProvider$1.class, SWTChartsComponentProvider.class) in
"TXM\plugins\org.txm.rcpapplication_0.7.5.xxxxxxxxxxxxxx.jar\bin\org\txm\rcp\chartsengine\base".

But on my Ubuntu 64-bit TXM 0.7.5, my "/usr/lib/TXM/TXM/plugins/org.txm.rcpapplication_0.7.5.201402120915.jar/bin/org/txm/rcp" directory only contains the "testers" directory.

MD: it is normal since this version of TXM does not contains the new ChartEngine classes

#10 Updated by Matthieu Decorde almost 9 years ago

  • % Done changed from 50 to 60

The work around solution allow me to run TXM without any crash or freeze (tested with my Linux 64bit).

#11 Updated by Sebastien Jacquot almost 9 years ago

NOTE: the .jar files installed using the RCP updates system are saved in the user directory (eg. "C:\Users\USERNAME\AppData\Roaming\.txm\plugins" on Win 7) and not in the TXM "plugins" install path (only the first installation seems to be saved here). So quick fixes, as the suggested fix above, should aim to the user path instead of the TXM installation path.

#12 Updated by Sebastien Jacquot over 8 years ago

  • Status changed from Feedback to Resolved
  • % Done changed from 60 to 80

#13 Updated by Matthieu Decorde over 8 years ago

  • % Done changed from 80 to 90

#14 Updated by Matthieu Decorde over 8 years ago

  • Category changed from UI to Démarrage

#15 Updated by Matthieu Decorde over 8 years ago

  • % Done changed from 90 to 100

#16 Updated by Matthieu Decorde over 8 years ago

  • Status changed from Resolved to Closed

Also available in: Atom PDF