! Please note that this is a snapshot of our old Bugzilla server, which is read only since May 29, 2020. Please go to gitlab.xfce.org for our new server !
Segmentation fault when trying to add/remove bookmarks
Status:
RESOLVED: FIXED
Product:
Xfce4-appfinder
Component:
General

Comments

Description ToZ editbugs 2018-01-02 03:47:51 CET
Running xfce4-appfinder built from git on Arch Linux.

When trying to add/remove a bookmark I get a "Gtk-CRITICAL **: gtk_tree_model_filter_get_model: assertion 'GTK_IS_TREE_MODEL_FILTER (filter)' failed" and core dumps. 

Here is gdb run with backtrace:

$ gdb
GNU gdb (GDB) 8.0.1
Copyright (C) 2017 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 "x86_64-pc-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
<http://www.gnu.org/software/gdb/documentation/>.
For help, type "help".
Type "apropos word" to search for commands related to "word".
(gdb) file /usr/bin/xfce4-appfinder
Reading symbols from /usr/bin/xfce4-appfinder...done.
(gdb) run
Starting program: /usr/bin/xfce4-appfinder 
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/usr/lib/libthread_db.so.1".
[New Thread 0x7fffebbcb700 (LWP 27970)]
[New Thread 0x7fffeb3ca700 (LWP 27971)]
[New Thread 0x7fffeabc9700 (LWP 27972)]
[New Thread 0x7fffe8dce700 (LWP 27973)]
[Thread 0x7fffe8dce700 (LWP 27973) exited]
FILTER TEXT: (null)
[New Thread 0x7fffd95da700 (LWP 27979)]

(xfce4-appfinder:27919): Gtk-CRITICAL **: gtk_tree_model_filter_get_model: assertion 'GTK_IS_TREE_MODEL_FILTER (filter)' failed

Thread 1 "xfce4-appfinder" received signal SIGSEGV, Segmentation fault.
xfce_appfinder_model_bookmark_toggle (model=0x0, 
    desktop_id=desktop_id@entry=0x555555c28160 "cmus.desktop", 
    error=error@entry=0x7fffffffdcd0) at appfinder-model.c:2430
2430	  if (g_hash_table_lookup (model->bookmarks_hash, desktop_id) == NULL)
(gdb) bt
#0  0x0000555555562594 in xfce_appfinder_model_bookmark_toggle (model=0x0, desktop_id=desktop_id@entry=0x555555c28160 "cmus.desktop", error=error@entry=0x7fffffffdcd0) at appfinder-model.c:2430
#1  0x000055555556484f in xfce_appfinder_window_popup_menu_toggle_bookmark (mi=<optimized out>, window=<optimized out>) at appfinder-window.c:823
#2  0x00007ffff61626f5 in g_closure_invoke () at /usr/lib/libgobject-2.0.so.0
#3  0x00007ffff61760b0 in  () at /usr/lib/libgobject-2.0.so.0
#4  0x00007ffff617a696 in g_signal_emit_valist ()
    at /usr/lib/libgobject-2.0.so.0
#5  0x00007ffff617b920 in g_signal_emit () at /usr/lib/libgobject-2.0.so.0
#6  0x00007ffff7634099 in gtk_widget_activate () at /usr/lib/libgtk-3.so.0
#7  0x00007ffff74fb86d in gtk_menu_shell_activate_item ()
    at /usr/lib/libgtk-3.so.0
#8  0x00007ffff74fbb09 in  () at /usr/lib/libgtk-3.so.0
#9  0x00007ffff74de488 in  () at /usr/lib/libgtk-3.so.0
#10 0x00007ffff617ac01 in g_signal_emit_valist ()
    at /usr/lib/libgobject-2.0.so.0
#11 0x00007ffff617b920 in g_signal_emit () at /usr/lib/libgobject-2.0.so.0
#12 0x00007ffff76319e5 in  () at /usr/lib/libgtk-3.so.0
#13 0x00007ffff74db1eb in  () at /usr/lib/libgtk-3.so.0
#14 0x00007ffff74dd443 in gtk_main_do_event () at /usr/lib/libgtk-3.so.0
#15 0x00007ffff6fe59f6 in  () at /usr/lib/libgdk-3.so.0
#16 0x00007ffff7018375 in  () at /usr/lib/libgdk-3.so.0
---Type <return> to continue, or q <return> to quit---Quit
(gdb) quit


I ran a git bisect and it identified the following commit as the problem commit:

$ git bisect bad
5b9a0c8553fa29309b64dd7bc5975f702c5132b1 is the first bad commit
commit 5b9a0c8553fa29309b64dd7bc5975f702c5132b1
Author: Andre Miranda <andreldm@xfce.org>
Date:   Thu Oct 12 16:59:52 2017 -0300

    Sort by app name

:040000 040000 30fcaa559c13a0fdb0b2cdfbe1d766bbee1b95e5 10ba9c644b65fd69c9f4c11d80b724bed57867e1 M	src
Comment 1 Andre Miranda editbugs 2018-01-03 17:14:33 CET
Unfortunately that commit was accidentally pushed (shame on me), sorting for list view is now much better, but is awkward for icon view. I should probably just revert, but I wanna try to fix that bug and the one you just reported.

Thanks for reporting.
Comment 2 Git Bot editbugs 2018-01-04 04:11:35 CET
Andre Miranda referenced this bugreport in commit 354c7c5bb9f5cb1d01b2b0eec3e668e94b474a45

Fix segfault when toggling bookmarks (Bug #14134)

https://git.xfce.org/xfce/xfce4-appfinder/commit?id=354c7c5bb9f5cb1d01b2b0eec3e668e94b474a45
Comment 3 Andre Miranda editbugs 2018-01-04 04:15:36 CET
Easy fix.

With regards to the broken sorting for icon view, I have disabled the improved sorting for this view (tree view still features this improvement). Well, I have tried lots of things, it seems a bug in GtkIconView or GtkTreeModelSort, but I don't have the time to put together a reproducer sample.
Comment 4 ToZ editbugs 2018-01-04 04:16:55 CET
Confirmed that the fix works. Thanks.

Bug #14134

Reported by:
ToZ
Reported on: 2018-01-02
Last modified on: 2018-01-04

People

Assignee:
Andre Miranda
CC List:
1 user

Version

Version:
4.13.0

Attachments

Additional information