rcaelers / workrave

Workrave is a program that assists in the recovery and prevention of Repetitive Strain Injury (RSI). The program frequently alerts you to take micro-pauses, rest breaks and restricts you to your daily limit.
https://www.workrave.org
GNU General Public License v3.0
1.61k stars 204 forks source link

Segmentation fault in libX11 #145

Open kindaro opened 5 years ago

kindaro commented 5 years ago

Description:

The program crashes on startup. It does create the directory ~/.workrave, but nothing else happens as far as I can see.

The problem is solved by adding an explicit display option, like this:

% workrave --display="$DISPLAY"

I think this may be a reiteration of a long standing issue: #88 — that has been closed without resolution. Notice though that I use a completely different video card and driver.

From the description, and taking a brief look at gdb output, my guess would be that the problem is in the code that calls for X11 to initialize the window.

Expected behaviour:

The program starts normally without extraneous arguments and respects $DISPLAY environment variable.

Try it yourself:

% gdb workrave <<< run
...
(gdb) Starting program: /usr/bin/workrave 
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/usr/lib/libthread_db.so.1".
[New Thread 0x7ffff39ac700 (LWP 31895)]
[New Thread 0x7ffff31ab700 (LWP 31896)]
[New Thread 0x7ffff29aa700 (LWP 31897)]
[New Thread 0x7ffff21a7700 (LWP 31898)]

Thread 1 "workrave" received signal SIGSEGV, Segmentation fault.
0x00007ffff6a83199 in XQueryExtension () from /usr/lib/libX11.so.6

Versions:

SjonHortensius commented 4 years ago

I'm running 1.10.44 on Arch Linux which should include 8f83833 but I appear to have the same issue:

Thread 1 "workrave" received signal SIGSEGV, Segmentation fault.
0x00007ffff7d44387 in XQueryExtension () from /usr/lib/libX11.so.6

I also build the current branch, 7e6a03fc944689e50d8a4131096f549da7409292 but it shows the exact same crash. Can I help debug this?