Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

mate-keybinding segfaults after setting custom keybinding #45

Closed
Vdragon opened this issue Apr 17, 2013 · 25 comments
Closed

mate-keybinding segfaults after setting custom keybinding #45

Vdragon opened this issue Apr 17, 2013 · 25 comments

Comments

@Vdragon
Copy link

Vdragon commented Apr 17, 2013

Backtrace

Program received signal SIGSEGV, Segmentation fault.
__strcmp_sse4_2 () at ../sysdeps/i386/i686/multiarch/strcmp-sse4.S:254
254     ../sysdeps/i386/i686/multiarch/strcmp-sse4.S: 沒有此一檔案或目錄.
(gdb) bt
#0  __strcmp_sse4_2 () at ../sysdeps/i386/i686/multiarch/strcmp-sse4.S:254
#1  0xb76f55cb in g_strcmp0 () from /lib/i386-linux-gnu/libglib-2.0.so.0
#2  0x0804cf73 in key_match (model=model@entry=0x80defa0, path=path@entry=0x8173b40, iter=iter@entry=0xbfffee80, 
    data=data@entry=0xbfffef50) at mate-keybinding-properties.c:459
#3  0xb7d71059 in gtk_tree_model_foreach_helper (model=model@entry=0x80defa0, iter=iter@entry=0xbfffee80, 
    path=path@entry=0x8173b40, func=func@entry=0x804cec0 <key_match>, user_data=user_data@entry=0xbfffef50)
    at /build/buildd/gtk+2.0-2.24.13/gtk/gtktreemodel.c:1607
#4  0xb7d7109b in gtk_tree_model_foreach_helper (model=model@entry=0x80defa0, iter=iter@entry=0xbfffeeb0, 
    path=path@entry=0x8173b40, func=func@entry=0x804cec0 <key_match>, user_data=user_data@entry=0xbfffef50)
    at /build/buildd/gtk+2.0-2.24.13/gtk/gtktreemodel.c:1613
#5  0xb7d72373 in IA__gtk_tree_model_foreach (model=model@entry=0x80defa0, func=func@entry=0x804cec0 <key_match>, 
    user_data=user_data@entry=0xbfffef50) at /build/buildd/gtk+2.0-2.24.13/gtk/gtktreemodel.c:1653
#6  0x0804f739 in key_is_already_shown (entry=0x81347f0, model=0x80defa0) at mate-keybinding-properties.c:477
#7  append_keys_to_tree (builder=builder@entry=0x806c2a0, title=<optimized out>, 
    schema=schema@entry=0x8053730 "org.mate.control-center.keybinding", package=0x0, package@entry=0x808cba0 "\200\313\b\b", 
    keys_list=keys_list@entry=0x81347c8) at mate-keybinding-properties.c:620
#8  0x08050257 in append_keys_to_tree_from_gsettings (builder=0x806c2a0, gsettings_path=<optimized out>)
    at mate-keybinding-properties.c:1028
#9  reload_key_entries (builder=builder@entry=0x806c2a0) at mate-keybinding-properties.c:1084
#10 0x0804cad5 in setup_dialog (marco_settings=0x80c8cc8, builder=0x806c2a0) at mate-keybinding-properties.c:1904
#11 main (argc=1, argv=0xbffff124) at mate-keybinding-properties.c:1963
(gdb)

distro: Ubuntu 12.10 x86 32-bit
DE: mate from PPA
Reproduce video
http://www.youtube.com/watch?v=VVm7QVCf-gY&feature=youtu.be

@oz123
Copy link
Contributor

oz123 commented Apr 19, 2013

I can confirm this bug too: mate 1.6 from official rep on debian wheezy. Here is what I did:

  $ dconf dump /org/mate/desktop/keybindings/ > test
  $ cat test 

  [custom0]
  action='/usr/bin/firefox'
  binding='<Shift><Mod4>f'
  name='Firefox'

 # add another keyboad short cut with your favorite editor (vim or pluma)
  [custom1]
  action='/usr/bin/firefox'
  binding='<Shift><Mod4>g'
  name='Firefox2'

 $  dconf load /org/mate/desktop/keybindings/ < test
 # try to start       

 $ mate-keybinding-properties 
  Segmentation fault

some more info

[4] ozn@deboz:~/Desktop $ mate-keybinding-properties 

(mate-keybinding-properties:11952): GLib-GObject-CRITICAL **: Object class EggCellEditableEventBox doesn't implement property 'editing-canceled' from interface 'GtkCellEditable'
# add another custom keybinding with the GUI. 
[5] ozn@deboz:~/Desktop $ mate-keybinding-properties 
[6] ozn@deboz:~/Desktop $ dconf dump /org/mate/desktop/keybindings/ > test
[7] ozn@deboz:~/Desktop $ cat test 
[custom0]
action='/usr/bin/firefox'
binding='<Primary><Shift>f'
name='Firefox'
[8] ozn@deboz:~/Desktop $ vim test # add another custom keybind with vim

[9] ozn@deboz:~/Desktop $ dconf load /org/mate/desktop/keybindings/ < test
[10] ozn@deboz:~/Desktop $ mate-keybinding-properties 
Segmentation fault

Erasing ~/.config/dconf/user enables the start mate-keybinding-properties again.

@CopyKat
Copy link

CopyKat commented May 2, 2013

Confirm. Arch Linux, mate 1.6 from official repo.

sbalneav pushed a commit that referenced this issue May 10, 2013
@szesch
Copy link
Contributor

szesch commented May 11, 2013

@sbalneav This can be closed?

@sbalneav
Copy link
Contributor

Nothing else heard, closing.

@uberamd
Copy link

uberamd commented Sep 17, 2013

Still experiencing issues in Ubuntu with mate 1.6

$ mate-keybinding-properties
zsh: segmentation fault (core dumped)  mate-keybinding-properties

My custom keybindings:

$ dconf dump /org/mate/desktop/keybindings/

[custom2]
action='wmctrl -r :ACTIVE: -e 500,0,600,700,475'
binding='<Alt><Mod4>Delete'
name='snap bottom-left'

[custom5]
action='wmctrl -r :ACTIVE: -e 0,703,0,696,1000'
binding='<Alt><Mod4>Right'
name='snap-right'

[custom1]
action='wmctrl -r :ACTIVE: -e 0,703,0,696,475'
binding='<Alt><Mod4>Home'
name='snap top-right'

[custom4]
action='wmctrl -r :ACTIVE: -e 0,0,0,700,1000'
binding='<Alt><Mod4>Left'
name='snap-left'

[custom0]
action='wmctrl -r :ACTIVE: -e 0,0,0,700,475'
binding='<Alt><Mod4>Insert'
name='snap top-left'

[custom3]
action='wmctrl -r :ACTIVE: -e 0,703,525,696,475'
binding='<Alt><Mod4>End'
name='snap bottom-right'

@stephenangelico
Copy link

I don't believe this can be closed yet. It's an issue for me on Debian Wheezy i386 with MATE 1.8 from wheezy-backports, and it has been since I used 1.6 from the MATE repo.
Here's the GDB output, but I'm sorry, I don't know how to interpret GDB.
GNU gdb (GDB) 7.4.1-debian
Copyright (C) 2012 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later http://gnu.org/licenses/gpl.html
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law. Type "show copying"
and "show warranty" for details.
This GDB was configured as "i486-linux-gnu".
For bug reporting instructions, please see:
http://www.gnu.org/software/gdb/bugs/...
Reading symbols from /usr/bin/mate-keybinding-properties...Reading symbols from /usr/lib/debug/.build-id/b9/ea8cdb1a0f44d8019d388f9b9ce8d71244c7ac.debug...done.
done.
(gdb) start
Temporary breakpoint 1 at 0x804d160: file mate-keybinding-properties.c, line 1937.
Starting program: /usr/bin/mate-keybinding-properties
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/i386-linux-gnu/i686/cmov/libthread_db.so.1".

Temporary breakpoint 1, main (argc=1, argv=0xbffff574)
at mate-keybinding-properties.c:1937
1937 mate-keybinding-properties.c: No such file or directory.

@Vdragon
Copy link
Author

Vdragon commented Jun 13, 2014

@stephenangelico As per commit ea467b2 , this bug has been fixed in the mate-control-center 1.8.11.6.1 release, if your mate-control-center package is older than 1.8.1 upgrade it should fix this issue.

@infirit
Copy link
Contributor

infirit commented Jun 13, 2014

@stephenangelico Here is how to get a proper backtrace in debian, https://wiki.debian.org/HowToGetABacktrace.

If you, as @Vdragon said, have version 1.8.1 and can reproduce this do post the backtrace here. But please make sure to enclose them in ``` (3 backticks).

@stephenangelico
Copy link

Yeah, I've got 1.8.1:

$ apt-cache policy mate-control-center
mate-control-center:
  Installed: 1.8.1+dfsg1-3~bpo70+1
  Candidate: 1.8.1+dfsg1-3~bpo70+1
  Version table:
 *** 1.8.1+dfsg1-3~bpo70+1 0
        100 http://ftp.iinet.net.au/debian/debian/ wheezy-backports/main i386 Packages
        100 /var/lib/dpkg/status

I also got different output from GDB. I also got libc6-dbg and libgtk2.0-0-dbg (as you can see from my above comment, I already got mate-control-center-dbg). Thanks @infirit for the link on Debian backtracing. This is the result, but I'm still missing a file:

$ gdb mate-keybinding-properties 
GNU gdb (GDB) 7.4.1-debian
Copyright (C) 2012 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "i486-linux-gnu".
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>...
Reading symbols from /usr/bin/mate-keybinding-properties...Reading symbols from /usr/lib/debug/.build-id/b9/ea8cdb1a0f44d8019d388f9b9ce8d71244c7ac.debug...done.
done.
(gdb) run
Starting program: /usr/bin/mate-keybinding-properties 
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/i386-linux-gnu/i686/cmov/libthread_db.so.1".
[New Thread 0xb69b0b70 (LWP 6325)]
[New Thread 0xb61a8b70 (LWP 6326)]

Program received signal SIGSEGV, Segmentation fault.
__strcmp_ia32 () at ../sysdeps/i386/i686/multiarch/../strcmp.S:40
40  ../sysdeps/i386/i686/multiarch/../strcmp.S: No such file or directory.
(gdb) bt
#0  __strcmp_ia32 () at ../sysdeps/i386/i686/multiarch/../strcmp.S:40
#1  0xb71da28b in g_strcmp0 () from /lib/i386-linux-gnu/libglib-2.0.so.0
#2  0x0804d953 in key_match (model=model@entry=0x80ceaa0, path=path@entry=0x811c130, iter=iter@entry=0xbffff2c0, 
    data=data@entry=0xbffff390) at mate-keybinding-properties.c:457
#3  0xb7ba3249 in gtk_tree_model_foreach_helper (model=model@entry=0x80ceaa0, iter=iter@entry=0xbffff2c0, 
    path=path@entry=0x811c130, func=func@entry=0x804d8a0 <key_match>, user_data=user_data@entry=0xbffff390)
    at /build/buildd-gtk+2.0_2.24.10-2-i386-Tg7Q_2/gtk+2.0-2.24.10/gtk/gtktreemodel.c:1607
#4  0xb7ba328b in gtk_tree_model_foreach_helper (model=model@entry=0x80ceaa0, iter=iter@entry=0xbffff2f0, 
    path=path@entry=0x811c130, func=func@entry=0x804d8a0 <key_match>, user_data=user_data@entry=0xbffff390)
    at /build/buildd-gtk+2.0_2.24.10-2-i386-Tg7Q_2/gtk+2.0-2.24.10/gtk/gtktreemodel.c:1613
#5  0xb7ba4563 in IA__gtk_tree_model_foreach (model=model@entry=0x80ceaa0, func=func@entry=0x804d8a0 <key_match>, 
    user_data=user_data@entry=0xbffff390)
    at /build/buildd-gtk+2.0_2.24.10-2-i386-Tg7Q_2/gtk+2.0-2.24.10/gtk/gtktreemodel.c:1653
#6  0x08050139 in key_is_already_shown (entry=0x814e4d0, model=0x80ceaa0) at mate-keybinding-properties.c:475
#7  append_keys_to_tree (builder=builder@entry=0x806daa0, title=<optimized out>, 
    schema=schema@entry=0x80541b0 "org.mate.control-center.keybinding", package=0x0, 
    package@entry=0x808db80 "\200\302\022\b", keys_list=keys_list@entry=0x814e4a8) at mate-keybinding-properties.c:618
#8  0x08050c57 in append_keys_to_tree_from_gsettings (builder=0x806daa0, gsettings_path=<optimized out>)
    at mate-keybinding-properties.c:1026
#9  reload_key_entries (builder=builder@entry=0x806daa0) at mate-keybinding-properties.c:1082
#10 0x0804d4b9 in setup_dialog (marco_settings=0x80bf4c8, builder=0x806daa0) at mate-keybinding-properties.c:1902
#11 main (argc=1, argv=0xbffff574) at mate-keybinding-properties.c:1963
(gdb) next
[Thread 0xb61a8b70 (LWP 6326) exited]
[Thread 0xb69b0b70 (LWP 6325) exited]

Program terminated with signal SIGSEGV, Segmentation fault.
The program no longer exists.
(gdb) quit

I haven't mentioned that this only happens on my i386 laptop. My desktop, also running Debian 7.5 with MATE 1.8, but amd64, doesn't have this problem.

@Vdragon
Copy link
Author

Vdragon commented Jun 13, 2014

@infirit @stephenangelico I've made a mistake, the fix of this issue should be landed in 1.6.1 instead of 1.8.1 , so it's a strange situation now.

And I confirmed that similar issue happened in version 1.8.0 as well on my Ubuntu 14.04 32-bit machine, I'll add my backtrace when I found time switch to MATE DE.

@infirit
Copy link
Contributor

infirit commented Jun 16, 2014

It fails in the same function as far as I can see so re-opening.

@infirit infirit reopened this Jun 16, 2014
@ivancekg
Copy link

I just added the next patch to the "mate-control-center-1.8.1/capplets/keybindings/mate-keybinding-properties.c" file:

@@ -1004,6 +1004,7 @@
           key.name = g_strdup("binding");
           key.cmd_key = g_strdup("action");
           key.description_key = g_strdup("name");
+          key.schema = NULL;
           g_array_append_val (entries, key);
         }
     }

and the segfault problem seems to be resolved.

Can you try it too?

@stephenangelico
Copy link

I installed MATE from the Debian repositories. I could get the source and compile it myself, as long as clear instructions are included. I'd rather get the patch as a package upgrade, though. Sorry to be a nuisance, but I'm not a programmer.

@Vdragon
Copy link
Author

Vdragon commented Jul 28, 2014

@stephenangelico The build & install instructions can be acquired here, I've asked to make this file appear in all of the branches but currently the devs didn't feel to do so.

@ivancekg
Copy link

@stephenangelico If you want, you can find a compiled "mate-keybinding-properties" bin for i386 arch on this link: http://ge.tt/89o2ldp1/v/0 . Note that the "mate-control-center" sources version is "1.8.1-0" (the one distributed with Linux Mint 17). At first you have to verify your "mate-control-center" version, then test the original file path with this command:

which mate-keybinding-properties

If the output is this:

/usr/bin/mate-keybinding-properties

you can change it with the patched one:

sudo mv /usr/bin/mate-keybinding-properties /usr/bin/mate-keybinding-properties_orig
sudo tar xvzf mate-keybinding-properties-1.8.1-0_patched.tgz -C /usr/bin/

@stephenangelico
Copy link

Thanks @ivancekg but I got this error:

mate-keybinding-properties: error while loading shared libraries: libdconf.so.1: cannot open shared object file: No such file or directory

I think that's what comes of trying to use an Arch-built binary on Debian. No permanent damage, of course, because I backed up the original as you suggested, but I already had a suspicion that it wouldn't work.

@ivancekg
Copy link

@stephenangelico Which version is your "mate-control-center" packet?

@stefano-k
Copy link
Collaborator

@ivancekg can you open a pull request?

@stephenangelico
Copy link

@ivancekg See my comment from the 13th of June. But for readability I'll put it here too:

$ apt-cache policy mate-control-center
mate-control-center:
  Installed: 1.8.1+dfsg1-4~bpo70+1
  Candidate: 1.8.1+dfsg1-4~bpo70+1
  Version table:
 *** 1.8.1+dfsg1-4~bpo70+1 0
        100 http://ftp.iinet.net.au/debian/debian/ wheezy-backports/main i386 Packages
        100 /var/lib/dpkg/status

@dcharlespyle
Copy link

I just got hit with this bug in Fedora 21, running mate-control-center 1.8.2 in mate-desktop 1.9.1. I added a custom keybinding to enable the Scroll Lock key (automatically disabled in mate-desktop and elsewhere for some odd reason) and the next time I wanted to try to adjust that keybinding every launch of mate-keybinding-properties greeted me with a segfault and/or a sigsev until I ran dconf reset -f /org/mate/desktop/keybindings/.

@ivancekg
Copy link

@stefano-k I opened a pull request with the patch: #116

@stefano-k
Copy link
Collaborator

@ivancekg thank you!

@PennyHassett
Copy link

@ivancekg
I can confirm the patch works for me. I'm running Mint 17 , mate-control-center 1.8.1-0 and had the segfault problem. I downloaded the package, made the one-line change to mate-keybindings-properties.c, rebuilt, and everything is hunky-dory. My first use of github and rebuilding linux code!

Of course, I had to install a plethora of packages to get it to compile so I can't be sure it will work in a vanilla installation on Mint 17.

@stefano-k
Copy link
Collaborator

54730d9

@monsta
Copy link
Contributor

monsta commented Aug 29, 2014

#80 seems to be similar - so is it considered to be fixed by that commit too?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests