Arch Linux

Please read this before reporting a bug:

Do NOT report bugs when a package is just outdated, or it is in the AUR. Use the 'flag out of date' link on the package page, or the Mailing List.

REPEAT: Do NOT report bugs for outdated packages!

FS#21924 - [xbindkeys] crashes with libx11-1.4

Attached to Project: Arch Linux
Opened by Nick (clu) - Monday, 29 November 2010, 19:00 GMT
Last edited by Ionut Biru (wonder) - Friday, 10 December 2010, 11:02 GMT
Task Type Bug Report
Category Upstream Bugs
Status Closed
Assigned To Dan Griffiths (Ghost1227)
Architecture All
Severity Medium
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 8
Private No


Description: xbindkeys crashes after pressing two bound keys. This can be avoided by downgrading from libx11-1.4 to older versions.

Additional info:
* xbindkeys 1.8.3-2
* libx11 1.4.0

Steps to reproduce:
Install these packages and attempt to use any keys that have binds in ~/.xbindkeysrc

I'm not sure whether the actual bug is in the libx11-1.4 source or in the xbindkeys source.

I have attached a backtrace. The pages for libx11 and xbindkeys don't seem to have bug trackers that I can find.

This task depends upon

Closed by  Ionut Biru (wonder)
Friday, 10 December 2010, 11:02 GMT
Reason for closing:  Fixed
Additional comments about closing:  xbindkeys 1.8.4
Comment by Jan de Groot (JGC) - Tuesday, 30 November 2010, 08:19 GMT
I can't reproduce it here, keeps running no matter how many times I press a bound key. Could you run it trough valgrind and attach the output? That way we can see if this is a bug in xbindkeys triggered by libx11, or a bug in libx11.
Comment by Oliver Appel (Ollo) - Tuesday, 30 November 2010, 09:09 GMT
I have excactly the same error. I have run xbindkeys through valgrind. Pls. see attached file. Unfortunately I am not very familiar with valgrind, so please let me know if you need anything else.
Comment by Nick (clu) - Tuesday, 30 November 2010, 09:18 GMT
Well ... this gets even more strange. When I make sure that there is no xbindkeys instance running and run `valgrind --log-file="example.txt" xbindkeys` then the key binds (and xbindkeys of course) keep working after pressing two bound keys. I don't understand how valgrind works exactly but this behavior seems very odd to me. I have also attached a valgrind log but note that it may not be helpful because the behavior of xbindkeys changes when run with valgrind.

Of course, when I kill the valgrind xbindkeys instance and just run xbindkeys alone again it dies after two bound keypresses.

I'm pretty damn confused now.
Comment by Nick (clu) - Friday, 03 December 2010, 08:48 GMT
So I found the bug tracker for xbindkeys and submitted the bug there. I didn't notice the savannah link until just now (sigh). Hopefully this will get some attention. Link below:
Comment by Nick (clu) - Friday, 03 December 2010, 09:03 GMT
Also found the tracker and filed there against libx11-1.4:
Comment by Alexander Kaltsas (firewalker) - Saturday, 04 December 2010, 14:41 GMT
I think the problem is caused by line 205 of xbindkeys.c

Increasing the allocated memory by 2 (char* envstr = malloc (envstr_size+2);) seems to solve the issue.
Comment by Philippe Brochard (hocwp) - Sunday, 05 December 2010, 17:01 GMT
Hi, I'm the xbindkeys author. I've fixed the memory fault with Alexander Kaltsas code. It's in the git and the 1.8.4 version is comming soon.
Comment by Nick (clu) - Wednesday, 08 December 2010, 20:14 GMT
Just installed xbindkeys 1.8.4 from official repos and no more crash.