xbindkeys-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xbindkeys-devel] Crash with glibc invalid pointer when guile config


From: Philippe Brochard
Subject: Re: [Xbindkeys-devel] Crash with glibc invalid pointer when guile config file is used
Date: Mon, 21 Feb 2011 22:07:47 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.2 (gnu/linux)

Hi,

Many thanks. I've searched how to solve this bug some times ago and
failed to solve it.
Thanks again.

Regards,

Philippe

Thomas Lindroth writes:

> I get random crashes when I use xbindkeys-1.8.4 with a guile based config 
> file.
> I googled for similar problems and found this bug http://bugs.debian.org/51632
> It's the exact same problem I'm having and the proposed change of
> scm_take0str(rc_guile_file) into scm_makfrom0str(rc_guile_file) fix my 
> problem.
> I guess this debian bug never reached any upstream developers because the
> problem still exists two years later.
>
> I use xbindkeys-1.8.4, guile-1.8.8, xorg-server-1.9.4 and libX11-1.4.1
>
> Output I get
> ...
> Button press !
> e.xbutton.button=5
> e.xbutton.state=16
> "(Scheme function)"
>     m:0x0 + b:5   (mouse)
> got screen 0 for window 1ad
> *** glibc detected *** xbindkeys: free(): invalid pointer:
> 0x000000000060b2e0 ***
> ======= Backtrace: =========
> /lib/libc.so.6(+0x72b56)[0x7f6bb0bf1b56]
> /lib/libc.so.6(cfree+0x6c)[0x7f6bb0bf690c]
> /usr/lib/libguile.so.17(scm_i_sweep_card+0x223)[0x7f6bb114f583]
> /usr/lib/libguile.so.17(scm_i_sweep_some_cards+0x53)[0x7f6bb114dda3]
> /usr/lib/libguile.so.17(scm_i_sweep_some_segments+0x5c)[0x7f6bb114e01c]
> /usr/lib/libguile.so.17(scm_gc_for_newcell+0x54)[0x7f6bb114cdb4]
> /usr/lib/libguile.so.17(scm_dynwind_unwind_handler+0xe7)[0x7f6bb11376e7]
> /usr/lib/libguile.so.17(scm_apply+0x79b)[0x7f6bb1142fcb]
> xbindkeys[0x4025f0]
> xbindkeys[0x402a15]
> /usr/lib/libguile.so.17(+0x6795f)[0x7f6bb115b95f]
> /usr/lib/libguile.so.17(+0x3eaba)[0x7f6bb1132aba]
> /usr/lib/libguile.so.17(scm_c_catch+0x161)[0x7f6bb1197d91]
> /usr/lib/libguile.so.17(scm_i_with_continuation_barrier+0xb7)[0x7f6bb1132f77]
> /usr/lib/libguile.so.17(scm_c_with_continuation_barrier+0x30)[0x7f6bb1133010]
> /usr/lib/libguile.so.17(scm_i_with_guile_and_parent+0x34)[0x7f6bb1196d84]
> /usr/lib/libguile.so.17(scm_boot_guile+0x25)[0x7f6bb115b915]
> xbindkeys[0x401fd1]
> /lib/libc.so.6(__libc_start_main+0xfd)[0x7f6bb0b9dbbd]
> xbindkeys[0x401ec9]
> ======= Memory map: ========
> 00400000-0040b000 r-xp 00000000 08:05 937183
>   /usr/bin/xbindkeys
> 0060a000-0060b000 r--p 0000a000 08:05 937183
>   /usr/bin/xbindkeys
> 0060b000-0060c000 rw-p 0000b000 08:05 937183
>   /usr/bin/xbindkeys
> 01cc7000-01d2e000 rw-p 00000000 00:00 0                                  
> [heap]
> 7f6ba8000000-7f6ba8021000 rw-p 00000000 00:00 0
> 7f6ba8021000-7f6bac000000 ---p 00000000 00:00 0
> 7f6baf822000-7f6baf837000 r-xp 00000000 08:05 1719829
>   /lib64/libgcc_s.so.1
> 7f6baf837000-7f6bafa37000 ---p 00015000 08:05 1719829
>   /lib64/libgcc_s.so.1
> 7f6bafa37000-7f6bafa38000 r--p 00015000 08:05 1719829
>   /lib64/libgcc_s.so.1
> 7f6bafa38000-7f6bafa39000 rw-p 00016000 08:05 1719829
>   /lib64/libgcc_s.so.1
> 7f6bafa39000-7f6bafa3e000 r-xp 00000000 08:05 1077014
>   /usr/lib64/libXdmcp.so.6.0.0
> 7f6bafa3e000-7f6bafc3d000 ---p 00005000 08:05 1077014
>   /usr/lib64/libXdmcp.so.6.0.0
> 7f6bafc3d000-7f6bafc3e000 r--p 00004000 08:05 1077014
>   /usr/lib64/libXdmcp.so.6.0.0
> 7f6bafc3e000-7f6bafc3f000 rw-p 00005000 08:05 1077014
>   /usr/lib64/libXdmcp.so.6.0.0
> 7f6bafc3f000-7f6bafc41000 r-xp 00000000 08:05 1077002
>   /usr/lib64/libXau.so.6.0.0
> 7f6bafc41000-7f6bafe41000 ---p 00002000 08:05 1077002
>   /usr/lib64/libXau.so.6.0.0
> 7f6bafe41000-7f6bafe42000 r--p 00002000 08:05 1077002
>   /usr/lib64/libXau.so.6.0.0
> 7f6bafe42000-7f6bafe43000 rw-p 00003000 08:05 1077002
>   /usr/lib64/libXau.so.6.0.0
> 7f6bafe43000-7f6bafe4c000 r-xp 00000000 08:05 1078289
>   /usr/lib64/libltdl.so.7.2.2
> 7f6bafe4c000-7f6bb004b000 ---p 00009000 08:05 1078289
>   /usr/lib64/libltdl.so.7.2.2
> 7f6bb004b000-7f6bb004c000 r--p 00008000 08:05 1078289
>   /usr/lib64/libltdl.so.7.2.2
> 7f6bb004c000-7f6bb004d000 rw-p 00009000 08:05 1078289
>   /usr/lib64/libltdl.so.7.2.2
> 7f6bb004d000-7f6bb00cd000 r-xp 00000000 08:05 1707240
>   /lib64/libm-2.11.2.so
> 7f6bb00cd000-7f6bb02cc000 ---p 00080000 08:05 1707240
>   /lib64/libm-2.11.2.so
> 7f6bb02cc000-7f6bb02cd000 r--p 0007f000 08:05 1707240
>   /lib64/libm-2.11.2.so
> 7f6bb02cd000-7f6bb02ce000 rw-p 00080000 08:05 1707240
>   /lib64/libm-2.11.2.so
> 7f6bb02ce000-7f6bb02d6000 r-xp 00000000 08:05 1707219
>   /lib64/libcrypt-2.11.2.so
> 7f6bb02d6000-7f6bb04d5000 ---p 00008000 08:05 1707219
>   /lib64/libcrypt-2.11.2.so
> 7f6bb04d5000-7f6bb04d6000 r--p 00007000 08:05 1707219
>   /lib64/libcrypt-2.11.2.so
> 7f6bb04d6000-7f6bb04d7000 rw-p 00008000 08:05 1707219
>   /lib64/libcrypt-2.11.2.so
> 7f6bb04d7000-7f6bb0505000 rw-p 00000000 00:00 0
> 7f6bb0505000-7f6bb055c000 r-xp 00000000 08:05 1077884
>   /usr/lib64/libgmp.so.3.5.2
> 7f6bb055c000-7f6bb075b000 ---p 00057000 08:05 1077884
>   /usr/lib64/libgmp.so.3.5.2
> 7f6bb075b000-7f6bb075c000 r--p 00056000 08:05 1077884
>   /usr/lib64/libgmp.so.3.5.2
> 7f6bb075c000-7f6bb075d000 rw-p 00057000 08:05 1077884
>   /usr/lib64/libgmp.so.3.5.2
> 7f6bb075d000-7f6bb075f000 r-xp 00000000 08:05 1707224
>   /lib64/libdl-2.11.2.so
> 7f6bb075f000-7f6bb095f000 ---p 00002000 08:05 1707224
>   /lib64/libdl-2.11.2.so
> 7f6bb095f000-7f6bb0960000 r--p 00002000 08:05 1707224
>   /lib64/libdl-2.11.2.so
> 7f6bb0960000-7f6bb0961000 rw-p 00003000 08:05 1707224
>   /lib64/libdl-2.11.2.so
> 7f6bb0961000-7f6bb097e000 r-xp 00000000 08:05 1078869
>   /usr/lib64/libxcb.so.1.1.0
> 7f6bb097e000-7f6bb0b7d000 ---p 0001d000 08:05 1078869
>   /usr/lib64/libxcb.so.1.1.0
> 7f6bb0b7d000-7f6bb0b7e000 r--p 0001c000 08:05 1078869
>   /usr/lib64/libxcb.so.1.1.0
> 7f6bb0b7e000-7f6bb0b7f000 rw-p 0001d000 08:05 1078869
>   /usr/lib64/libxcb.so.1.1.0
> 7f6bb0b7f000-7f6bb0ccf000 r-xp 00000000 08:05 1707214
>   /lib64/libc-2.11.2.so
> 7f6bb0ccf000-7f6bb0ece000 ---p 00150000 08:05 1707214
>   /lib64/libc-2.11.2.so
> 7f6bb0ece000-7f6bb0ed2000 r--p 0014f000 08:05 1707214
>   /lib64/libc-2.11.2.so
> 7f6bb0ed2000-7f6bb0ed3000 rw-p 00153000 08:05 1707214
>   /lib64/libc-2.11.2.so
> 7f6bb0ed3000-7f6bb0ed8000 rw-p 00000000 00:00 0
> 7f6bb0ed8000-7f6bb0eef000 r-xp 00000000 08:05 1707257
>   /lib64/libpthread-2.11.2.so
> 7f6bb0eef000-7f6bb10ee000 ---p 00017000 08:05 1707257
>   /lib64/libpthread-2.11.2.so
> 7f6bb10ee000-7f6bb10ef000 r--p 00016000 08:05 1707257
>   /lib64/libpthread-2.11.2.so
> 7f6bb10ef000-7f6bb10f0000 rw-p 00017000 08:05 1707257
>   /lib64/libpthread-2.11.2.so
> 7f6bb10f0000-7f6bb10f4000 rw-p 00000000 00:00 0
> 7f6bb10f4000-7f6bb11d2000 r-xp 00000000 08:05 1318171
>   /usr/lib64/libguile.so.17.2.0
> 7f6bb11d2000-7f6bb13d1000 ---p 000de000 08:05 1318171
>   /usr/lib64/libguile.so.17.2.0
> 7f6bb13d1000-7f6bb13d5000 r--p 000dd000 08:05 1318171
>   /usr/lib64/libguile.so.17.2.0
> 7f6bb13d5000-7f6bb13d9000 rw-p 000e1000 08:05 1318171
>   /usr/lib64/libguile.so.17.2.0Aborted
>
>
> Config file I use. It's mostly copy and paste from an example I found online.
> ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
> ;; xbindkeys mouse shortcuts for Logitech 700
>
> ;; Button_______Location___________
> ;; 1,2,3      standard three keys
> ;; 4, 5               scroll: up, down
> ;; 6, 7               undefined
> ;; 8,9,10,11  thumb buttons: low back, low front, high back, high front
> ;; 12,13,14   top side buttons: back, middle, front
> ;; 15         undefined
> ;; 16,17      scroll: left, right
>
> ;; 9 primary shortcuts are always active
> ;; 20 secondary shortcuts gets activated when the modifier keys are held down
>
> ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
>
> (define (display-n str)
>   "Display a string then newline"
>   (display str)
>   (newline))
>
> ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
>
> (define (primary-8)
>   "Play / Pause on media player"
>   (run-command "clementine --play-pause"))
>
> (define (primary-9) ;; Also used with modifier (secondary)
>   "Browser back by Alt + Left keyboard shortcut"
>   (run-command "xte 'keydown Alt_L' 'key Left' 'keyup Alt_L'"))
>
> (define (primary-10)
>   "Next track on media player"
>   (run-command "clementine --next"))
>
> (define (primary-11) ;; Also used with modifier (tertiary)
>   "Enter / Return"
>   (run-command "xte 'key Return'"))
>
> (define (primary-12)
>   "Lower Volume"
>   (run-command "amixer --quiet set Master 5-"))
>
> (define (primary-13)
>   "Raise Volume"
>   (run-command "amixer --quiet set Master 5+"))
>
> (define (primary-14)
>   "Spawn edict search script"
>   (run-command "/home/cocobo/Programmering/work/glossy/editc_no_dialog.pl"))
>
> (define (primary-16)
>   "Circulate windows backwards by Alt + Shift + Tab keyboard shortcut"
>   (run-command "xte 'keydown Alt_L' 'keydown Shift_L' 'key Tab' 'keyup
> Shift_L' 'keyup Alt_L'"))
>
> (define (primary-17)
>   "Circulate windows forward by Alt + Tab keyboard shortcut"
>   (run-command "xte 'keydown Alt_L' 'key Tab' 'keyup Alt_L'"))
>
> ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
>
> (define (secondary-1)
>   "Toggle fullscreen in mplayer by f key"
>   (run-command "xte 'key f'"))
>
> (define (secondary-2)
>   "Minimize active window by Win + g keyboard shortcut"
>   (run-command "xte 'keydown Super_L' 'key g' 'keyup Super_L'"))
>
> (define (secondary-3)
>   "Pause / Frame step in mplayer by . key"
>   (run-command "xte 'key period'"))
>
> (define (secondary-4)
>   "Page Up"
>   (run-command "xte 'key Page_Up'"))
>
> (define (secondary-5)
>   "Page Down"
>   (run-command "xte 'key Page_Down'"))
>
> (define (secondary-12) ;;UNASSIGNED
>   (display-n "Code Me"))
>
> (define (secondary-13) ;;UNASSIGNED
>   (display-n "Code Me"))
>
> (define (secondary-14) ;;UNASSIGNED
>   (display-n "Code Me"))
>
> (define (secondary-16)
>   "Previous klipper history item by Ctrl + Alt + Up keyboard shortcut"
>   (run-command "xte 'keydown Control_L' 'keydown Alt_L' 'key Up'
> 'keyup Alt_L' 'keyup Control_L'"))
>
> (define (secondary-17)
>   "Next klipper history item by Ctrl + Alt + Down keyboard shortcut"
>   (run-command "xte 'keydown Control_L' 'keydown Alt_L' 'key Down'
> 'keyup Alt_L' 'keyup Control_L'"))
>
> ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
>
> (define (tertiary-1) ;;UNASSIGNED
>   (display-n "Code Me"))
>
> (define (tertiary-2) ;;UNASSIGNED
>   (display-n "Code Me"))
>
> (define (tertiary-3) ;;UNASSIGNED
>   (display-n "Code Me"))
>
> (define (tertiary-4)
>   "Up key"
>   (run-command "xte 'key Up'"))
>
> (define (tertiary-5)
>   "Down key"
>   (run-command "xte 'key Down'"))
>
> (define (tertiary-12) ;;UNASSIGNED
>   (display-n "Code Me"))
>
> (define (tertiary-13) ;;UNASSIGNED
>   (display-n "Code Me"))
>
> (define (tertiary-14) ;;UNASSIGNED
>   (display-n "Code Me"))
>
> (define (tertiary-16)
>   "Browser back by Alt + Left keyboard shortcut"
>   (run-command "xte 'keydown Alt_L' 'key Left' 'keyup Alt_L'"))
>
> (define (tertiary-17)
>   "Browser forward by Alt + Right keyboard shortcut"
>   (run-command "xte 'keydown Alt_L' 'key Right' 'keyup Alt_L'"))
>
> ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
>
> (define (primary-binding)
>   "Bind all primary bindings"
>   ;; 1 - 5 use the default action
>   (xbindkey-function  '("b:8") primary-8)
>   (xbindkey-function  '("b:9") second-binding)
>   (xbindkey-function '("b:10") primary-10)
>   (xbindkey-function '("b:11") tertiary-binding)
>   (xbindkey-function '("b:12") primary-12)
>   (xbindkey-function '("b:13") primary-13)
>   (xbindkey-function '("b:14") primary-14)
>   (xbindkey-function '("b:16") primary-16)
>   (xbindkey-function '("b:17") primary-17))
>
> (define (reset-to-primary-binding)
>   "reset primary binding"
>   (ungrab-all-keys)
>   (remove-all-keys)
>   (primary-binding)
>   (grab-all-keys))
>
> (define (second-binding) ;;bindings for the 9th button
>   "Bind all secondary binding"
>   (let ((modkey-used #f))
>     (ungrab-all-keys)
>     (remove-all-keys)
>     (xbindkey-function '("b:1")
>                        (lambda () (secondary-1)
>                                (set! modkey-used #t)))
>     (xbindkey-function '("b:2")
>                        (lambda () (secondary-2)
>                                (set! modkey-used #t)))
>     (xbindkey-function '("b:3")
>                        (lambda () (secondary-3)
>                                (set! modkey-used #t)))
>     (xbindkey-function '("b:4")
>                        (lambda () (secondary-4)
>                                (set! modkey-used #t)))
>     (xbindkey-function '("b:5")
>                        (lambda () (secondary-5)
>                                (set! modkey-used #t)))
>     ;; 8,10,11 with 9 as modify key requires rubber fingers
>     (xbindkey-function '("b:12")
>                        (lambda () (secondary-12)
>                                (set! modkey-used #t)))
>     (xbindkey-function '("b:13")
>                        (lambda () (secondary-13)
>                                (set! modkey-used #t)))
>     (xbindkey-function '("b:14")
>                        (lambda () (secondary-14)
>                                (set! modkey-used #t)))
>     (xbindkey-function '("b:16")
>                        (lambda () (secondary-16)
>                                (set! modkey-used #t)))
>     (xbindkey-function '("b:17")
>                        (lambda () (secondary-17)
>                                (set! modkey-used #t)))
>     (xbindkey-function '(release "b:9")
>                        (lambda ()
>                          (if (not modkey-used)
>                              (primary-9))
>                          (set! modkey-used #f)
>                          (reset-to-primary-binding)))
>     (grab-all-keys)))
>
> (define (tertiary-binding) ;;bindings for the 11th button
>   "Bind all tertiary binding"
>   (let ((modkey-used #f))
>     (ungrab-all-keys)
>     (remove-all-keys)
>     (xbindkey-function '("b:1")
>                        (lambda () (tertiary-1)
>                                (set! modkey-used #t)))
>     (xbindkey-function '("b:2")
>                        (lambda () (tertiary-2)
>                                (set! modkey-used #t)))
>     (xbindkey-function '("b:3")
>                        (lambda () (tertiary-3)
>                                (set! modkey-used #t)))
>     (xbindkey-function '("b:4")
>                        (lambda () (tertiary-4)
>                                (set! modkey-used #t)))
>     (xbindkey-function '("b:5")
>                        (lambda () (tertiary-5)
>                                (set! modkey-used #t)))
>     ;; 8,9,10 with 11 as modify key requires rubber fingers
>     (xbindkey-function '("b:12")
>                        (lambda () (tertiary-12)
>                                (set! modkey-used #t)))
>     (xbindkey-function '("b:13")
>                        (lambda () (tertiary-13)
>                                (set! modkey-used #t)))
>     (xbindkey-function '("b:14")
>                        (lambda () (tertiary-14)
>                                (set! modkey-used #t)))
>     (xbindkey-function '("b:16")
>                        (lambda () (tertiary-16)
>                                (set! modkey-used #t)))
>     (xbindkey-function '("b:17")
>                        (lambda () (tertiary-17)
>                                (set! modkey-used #t)))
>     (xbindkey-function '(release "b:11")
>                        (lambda ()
>                          (if (not modkey-used)
>                              (primary-11))
>                          (set! modkey-used #f)
>                          (reset-to-primary-binding)))
>     (grab-all-keys)))
>
>
> (debug)
> (grab-all-keys)
> (primary-binding)



reply via email to

[Prev in Thread] Current Thread [Next in Thread]