Geoviewer crashing ("Unknown sequence number while appending request") MacOS

When I press the button (see attached) in the Geoviewer Flair crashes and exits. The error message is as follows:

[xcb] Unknown sequence number while appending request
[xcb] Most likely this is a multi-threaded client and XInitThreads has not been called
[xcb] Aborting, sorry about that.
Assertion failed: (!xcb_xlib_unknown_seq_number), function append_pending_request, file xcb_io.c, line 155.
/Users/Stuart/Physics/fluka/flair-3.1/flair: line 14: 98824 Abort trap: 6           ${PYTHON} -O -W ignore ${DIR}/flair.py "$@"

This makes the geoviewer unusable as I can only ever see the one display panel. I followed the installation instructions and downgraded xorg-libxcb and xorg-xcb-proto to 1.13 as instructed. I’m using flair and geoviewer versions 3.1.6, and xorg version 20090316_0 (macports) with xorg-server version 1.20.10_0 (again macports). Any ideas as to how I can fix this?

To provide some additional context I recently upgrade some outdated macports. It worked before, but then started getting this error afterwards. I reinstalled flair and geoviewer from scratch just in case and the error persists.

I fixed the crash it seems by downgrading xorg-libX11 (macports) from 1.7.0_0 to 1.6.12_0. I don’t know why this works. Good to know though.

Thank you @sdwalker for reporting.
Is it possible to compile geoviewer with debug information and check the core dump why it is crashing.

make -B DEBUG=yes 

then run flair and normally it should create a coredump file called core or core.##### ####=process number
open it in the debugger

gdb /usr/bin/python core

then execute a backtrace command as bt

Hi @sdwalker,
I’m not able to reproduce your issue.
I think that you have some version mismatch in the different xorg libraries.

Have you tried to run these commands?
sudo port selfupdate
sudo port update outdated

Cheers, luigi

@luillo

Yes, doing that is precisely what led to this problem in the first place (remembering also to downgrade xorg-libxcb and xorg-xcb-proto afterwards to fix the known bug). Everything is updated and upgraded minus the two aforementioned ports.

@vasilis

I followed these instructions but when it crashes there is no such core file created.

Hi @sdwalker
thanks for the checking.

Could you possibly send the list of installed ports with the command
port installed

and the output of this command - with Flair running -
lsof | grep -e libX11 -e xcb

Thanks, luigi

I’ve attached my list of ports. here is the output of lsof | grep -e libX11 -e xcb when I’m running flair in the configuration that crashes:

Python    64648 Stuart  txt       REG                1,4     146276 8728710114 /opt/local/lib/libxcb.1.dylib
Python    64648 Stuart  txt       REG                1,4    1111752 8728957703 /opt/local/lib/libX11.6.dylib
Python    64648 Stuart  txt       REG                1,4     334208 8594973544 /opt/X11/lib/libxcb.1.dylib
Python    64648 Stuart  txt       REG                1,4    2382992 8594973464 /opt/X11/lib/libX11.6.dylib
xinit     92591 Stuart  txt       REG                1,4    1111752 8727952239 /opt/local/lib/libX11.6.dylib
xinit     92591 Stuart  txt       REG                1,4     146276 8728710114 /opt/local/lib/libxcb.1.dylib
X11.bin   92593 Stuart  txt       REG                1,4    1111752 8727952239 /opt/local/lib/libX11.6.dylib
X11.bin   92593 Stuart  txt       REG                1,4     146276 8728710114 /opt/local/lib/libxcb.1.dylib
quartz-wm 92630 Stuart  txt       REG                1,4    1111752 8727952239 /opt/local/lib/libX11.6.dylib
quartz-wm 92630 Stuart  txt       REG                1,4     146276 8728710114 /opt/local/lib/libxcb.1.dylib
Emacs     92663 Stuart  txt       REG                1,4       4272 8727952237 /opt/local/lib/libX11-xcb.1.dylib
Emacs     92663 Stuart  txt       REG                1,4     146276 8728710114 /opt/local/lib/libxcb.1.dylib
Emacs     92663 Stuart  txt       REG                1,4      49828 8728710181 /opt/local/lib/libxcb-render.0.dylib
Emacs     92663 Stuart  txt       REG                1,4    1111752 8727952239 /opt/local/lib/libX11.6.dylib

port-installed-sdwalker.txt (34.4 KB)

Hi @sdwalker,

I see two possible clues.

  1. The output of lsof shows that Python has opened two different libxcb and libX11: one from macports (/opt/local/lib/) and the second one I guess from XQuartz (/opt/X11/lib/). This might generate conflicts. However, it’s not totally evident if the libraries inside /opt/X11/lib/ are open by Flair or by another program running on your machine which uses X server.
    For the check, it would have been better to close the X server, run Flair and then execute the lsof command.

  2. From the list of installed ports, I see that you have active the ports xorg-*xcb@1.13.1_0.
    Try to activate xorg-libxcb@1.14_0 and xorg-xcb-proto@1.14_0, instead.
    On my machine, with those ports work with xorg-libX11@1.7.0_0.
    Otherwise, I would investigate the first point.

Cheers, luigi

OK I finally got round to trying this out. The output from lsof | grep -e libX11 -e xcb is now (I’ve done various upgrades and restarts since I last posted so I guess stuff has changed):

13386:xinit     69200 Stuart  txt       REG                1,4    2382992 8594973464 /opt/X11/lib/libX11.6.dylib
13387:xinit     69200 Stuart  txt       REG                1,4     334208 8594973544 /opt/X11/lib/libxcb.1.dylib
13411:X11.bin   69210 Stuart  txt       REG                1,4    2382992 8594973464 /opt/X11/lib/libX11.6.dylib
13412:X11.bin   69210 Stuart  txt       REG                1,4     334208 8594973544 /opt/X11/lib/libxcb.1.dylib
13490:quartz-wm 69280 Stuart  txt       REG                1,4    2382992 8594973464 /opt/X11/lib/libX11.6.dylib
13495:quartz-wm 69280 Stuart  txt       REG                1,4     334208 8594973544 /opt/X11/lib/libxcb.1.dylib

These files are opened by flair when I run it. When flair is closed the above command prints nothing to stdout. So everything here looks OK I think? The crash persists, however.

Regarding your point 2 I am surprised you advocate this and that it works for you. The download instructions state that you must downgrade both xorg-libxcb and xorg-xcb-proto from 1.14_0 to 1.13.1_0, lest you get the following crash:

Assertion failed: (pthreadret == 0), function _xcb_in_wake_up_next_reader, file xcb_in.c

Well I did try your second point regarding upgrading the two ports to 1.14 and I can confirm I get the above assertion failure warned against on the download page, so this is not an option for me, I will stay on 1.13.1_0. Thanks.

Dear @sdwalker,
thanks for checking.

I see that all libraries point to the MacPorts installation. In principle, there should be no conflicts.

Let me clarify that the downgrade to an older version of both xorg-libxcb and xorg-xcb-proto was a patch needed because, at that time, geoviewer required the obsolete XQuartz, which is distributed with an installer package from 2016. The xorg-libxcb and xorg-xcb-proto inside XQuartz are not compatible with the one distributed in MacPorts.
From version 3.0-11 (May 2020), we changed the requirements on the X server and we advised to install the latest X11 window system from MacPorts. Therefore, no need to downgrade. That’s why I asked you to make a few additional tests and try to reproduce the issue myself.

Unfortunately, I do not have a solution to your problem yet.
Fortunately, the old patch works for you.

Sorry for the inconvenience.

All the best, Luigi