archimatetool / archi

Archi: ArchiMate Modelling Tool
https://www.archimatetool.com
MIT License
952 stars 268 forks source link

XCB crash during publish report (both Jasper & HTML) #925

Closed grufghr closed 1 year ago

grufghr commented 1 year ago

Version of Archi

Archi-Linux64-5.0.1

Archi Plug-ins

coArchi 0.8.7 jArchi 1.4.0

Operating System

Red Hat Enterprise Linux release 8.7

Expected Behaviour

no crash

Actual Behaviour

Archi crashes and reports the following:

(Archi:76716): Gtk-WARNING **: 19:19:06.553: Negative content height -6 (allocation 1, extents 3x4) while allocating gadget (node button, owner GtkToggleButton) [xcb] Unknown sequence number while processing reply [xcb] Most likely this is a multi-threaded client and XInitThreads has not been called [xcb] Aborting, sorry about that. java: xcb_io.c:641: _XReply: Assertion `!xcb_xlib_threads_sequence_lost' failed.

Steps to Reproduce the Behaviour

  1. Select Model
  2. Publish to Jasper - PDF
jbsarrodie commented 1 year ago

Hi, if you use Wayland, please test using X11 (Wayland is not fully supported by the underlying eclipse framework and is known to raise issues in Archi).

Phillipus commented 1 year ago

I think XCB is in X11. I Googled the error message and this can happen with apps depending on GTK and other factors.

Phillipus commented 1 year ago

I tried Jasper report export as PDF on Linux Mint and got this:

(Archi:1925): Gdk-ERROR **: 20:19:35.582: The program 'Archi' received an X Window System error.
This probably reflects a bug in the program.
The error was 'BadIDChoice (invalid resource ID chosen for this connection)'.
  (Details: serial 24343 error_code 14 request_code 131 (MIT-SHM) minor_code 1)
  (Note to programmers: normally, X errors are reported asynchronously;
   that is, you will receive the error a while after causing it.
   To debug your program, run it with the GDK_SYNCHRONIZE environment
   variable to change this behavior. You can then get a meaningful
   backtrace from your debugger if you break on the gdk_x_error() function.)

Not sure where the problem is.

Phillipus commented 1 year ago

I'm seeing crashes exporting to Jasper and HTML report on Linux. Not sure whether this is because of Java or Eclipse.

Archi 4.10 - Eclipse 4.25 - Java 11 - OK Archi 5.0.0 - Eclipse 4.25 - Java 17 - Crash Archi 5.0.1 - Eclipse 4.27 - Java 17 - Crash

Phillipus commented 1 year ago

This is a nasty bug which I can reproduce.

It's triggered in 2 places - export to HTML report and Jasper report.

In both cases a new thread is started in order to show a dialog box that shows progress. When the diagrams are created these are created in another UI thread and this causes the crash on Linux. The annoying thing is this works fine on Mac and Windows.

I'm investigating...

Phillipus commented 1 year ago

@grufghr I think I have a fix for this problem. Can you please download and try this build:

https://www.archimatetool.com/downloads/temp/Archi-Linux64-5.0.1-testbuild.tgz

grufghr commented 1 year ago

@Phillipus testbuild works as expected without XCB crash, exports PDF & HTML successful. Great work.

Phillipus commented 1 year ago

@grufghr Thanks for the report and thanks for testing the new version.

I'll release a new version of Archi sometime soon.

jbsarrodie commented 1 year ago

I'll release a new version of Archi sometime soon.

If you release a new version soon, I might have a small request (I'm opening another issue for that)

Phillipus commented 1 year ago

This is now fixed in Archi 5.0.2.