Psychopy Crashing on Linux due GTK Error

System Information:

OS (e.g. Win10): Debian 11 (Bullseye,Kernel: 5.10.0-25-amd64; X11)

PsychoPy version (e.g. 1.84.x): 2023.2.2
Standard Standalone? (y/n) : pip installation, standalone
What are you trying to achieve?: starting psychopy - not crashing

**What did you try to make it work?:
Installed Psychopy according to linux installation instructions - all possible ways, all python versions. now running on python 3.8 with according wheel.

What specifically went wrong when you tried that?:

Hey folks,

the installation of psychopy was no problem. Howeber, if starting psychopy via the commandline from the according conda enviroment, psychopy starts with the first info message. After closing the tooltips, psychopy crashes with the error message:

10:42:28 AM: Debug: "Shift+Tab" is not supported as a keyboard accelerator with GTK
Xlib: sequence lost (0x1472f > 0x4733) in reply type 0x0!
[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.
python3.9: ../../src/xcb_io.c:725: _XReply: Assertion `!xcb_xlib_threads_sequence_lost' failed.

It seems to be a X11 issue, as I’m using X11. If anybody has experienced that kind of issue and could help, I would very happy ! Did I miss to install some dependencies for Linux ? I also tried to install it for different python versions (3.8 - also from yaml conda file), 3.9 (now), 3.10. No effect !

I appreciate your help !



No one has an idea ?


I have this exact problem on Ubuntu 22.04. It happens with python3.8 and 3.9 (from deadsnakes PPA) with a locally-compiled wheel for wxPython. I installed everything in a venv and when I run just psychopy by itself I get what OP describes (same sequence of [xcb] error messages and then a core dump.

However, if I launch with:

psychopy --builder


psychopy --coder

it runs fine. I can choose “Show runner” from the builder Window menu and everything is fine. I only get the GTK errors when I attempt to launch psychopy from the command line with no arguments or I launch --runner directly from the command line.

I seem to be able to run experiments fine from within builder, but it worries me that there are such reliable ways to crash psychopy on my lab machines. Do we have broken GTK installations or something?

1 Like