lwindolf / liferea

Liferea (Linux Feed Reader), a news reader for GTK/GNOME
https://lzone.de/liferea
GNU General Public License v2.0
822 stars 130 forks source link

Segmentation fault upon sorting feeds #247

Closed GreenLunar closed 6 years ago

GreenLunar commented 9 years ago

Click on menu Sort Feeds menu until Liferea crashes.

lwindolf commented 8 years ago

Cannot reproduce it. Can you post a backtrace?

Leiaz commented 8 years ago

I get a different segfault than the one in #83 by : selecting the folder, selecting an item (normal view), right clicking the folder and selecting sort.

Gtk:ERROR:gtktreestore.c:596:gtk_tree_store_get_path: assertion failed: (G_NODE (iter->user_data)->parent != NULL)
#0  0x00007ffff0bd75f8 in raise () from /usr/lib/libc.so.6
#1  0x00007ffff0bd8a7a in abort () from /usr/lib/libc.so.6
#2  0x00007ffff11d48c5 in g_assertion_message () from /usr/lib/libglib-2.0.so.0
#3  0x00007ffff11d495a in g_assertion_message_expr () from /usr/lib/libglib-2.0.so.0
#4  0x00007ffff34605e5 in ?? () from /usr/lib/libgtk-3.so.0
#5  0x00007ffff3462997 in gtk_tree_store_set_valist () from /usr/lib/libgtk-3.so.0
#6  0x00007ffff3462a54 in gtk_tree_store_set () from /usr/lib/libgtk-3.so.0
#7  0x000000000044d29c in feed_list_node_update (nodeId=0x12e0be0 "vprmelm")
    at ../../../src/ui/feed_list_node.c:340
#8  0x000000000042ac51 in itemlist_check_for_deferred_action ()
    at ../../src/itemlist.c:191
#9  0x000000000042b280 in itemlist_unload (markRead=1) at ../../src/itemlist.c:352
#10 0x0000000000426a9f in feedlist_selection_changed (node=0x1147ab0)
    at ../../src/feedlist.c:589
#11 0x000000000044bb5b in feed_list_view_selection_changed_cb (
    selection=0x7fffd8004170, data=0xbc2540) at ../../../src/ui/feed_list_view.c:74
#12 0x00007ffff1483244 in ?? () from /usr/lib/libgobject-2.0.so.0
#13 0x00007ffff149da46 in g_signal_emit_valist () from /usr/lib/libgobject-2.0.so.0
#14 0x00007ffff149e12f in g_signal_emit () from /usr/lib/libgobject-2.0.so.0
#15 0x00007ffff3472014 in ?? () from /usr/lib/libgtk-3.so.0
#16 0x00007ffff3474df6 in ?? () from /usr/lib/libgtk-3.so.0
#17 0x00007ffff1483015 in g_closure_invoke () from /usr/lib/libgobject-2.0.so.0
#18 0x00007ffff1495061 in ?? () from /usr/lib/libgobject-2.0.so.0
#19 0x00007ffff149ddfc in g_signal_emit_valist () from /usr/lib/libgobject-2.0.so.0
#20 0x00007ffff149e12f in g_signal_emit () from /usr/lib/libgobject-2.0.so.0
---Type <return> to continue, or q <return> to quit---
#21 0x00007ffff3462bc1 in gtk_tree_store_remove () from /usr/lib/libgtk-3.so.0
#22 0x00007ffff3462d2b in ?? () from /usr/lib/libgtk-3.so.0
#23 0x00007ffff3462cfc in ?? () from /usr/lib/libgtk-3.so.0
#24 0x00007ffff3462cfc in ?? () from /usr/lib/libgtk-3.so.0
#25 0x00007ffff3464218 in gtk_tree_store_clear () from /usr/lib/libgtk-3.so.0
#26 0x000000000044cefd in feed_list_node_clear_feedlist ()
    at ../../../src/ui/feed_list_node.c:246
#27 0x000000000044cf1d in feed_list_node_reload_feedlist ()
    at ../../../src/ui/feed_list_node.c:253
#28 0x000000000044c07f in feed_list_view_sort_folder (folder=0x1150780)
    at ../../../src/ui/feed_list_view.c:221
#29 0x0000000000460589 in ui_popup_sort_feeds (callback_data=0x1150780)
    at ../../../src/ui/popup_menu.c:256
#30 0x00007ffff1483015 in g_closure_invoke () from /usr/lib/libgobject-2.0.so.0
#31 0x00007ffff1495061 in ?? () from /usr/lib/libgobject-2.0.so.0
#32 0x00007ffff149ddfc in g_signal_emit_valist () from /usr/lib/libgobject-2.0.so.0
#33 0x00007ffff149e12f in g_signal_emit () from /usr/lib/libgobject-2.0.so.0
#34 0x00007ffff348c8ae in gtk_widget_activate () from /usr/lib/libgtk-3.so.0
#35 0x00007ffff336a906 in gtk_menu_shell_activate_item () from /usr/lib/libgtk-3.so.0
#36 0x00007ffff336ac34 in ?? () from /usr/lib/libgtk-3.so.0
#37 0x00007ffff334d35a in ?? () from /usr/lib/libgtk-3.so.0
#38 0x00007ffff1483244 in ?? () from /usr/lib/libgobject-2.0.so.0
#39 0x00007ffff149d558 in g_signal_emit_valist () from /usr/lib/libgobject-2.0.so.0
#40 0x00007ffff149e12f in g_signal_emit () from /usr/lib/libgobject-2.0.so.0
#41 0x00007ffff348a40c in ?? () from /usr/lib/libgtk-3.so.0
---Type <return> to continue, or q <return> to quit---
#42 0x00007ffff334a6ce in ?? () from /usr/lib/libgtk-3.so.0
#43 0x00007ffff334c47c in gtk_main_do_event () from /usr/lib/libgtk-3.so.0
#44 0x00007ffff2ec57c2 in ?? () from /usr/lib/libgdk-3.so.0
#45 0x00007ffff11aedc7 in g_main_context_dispatch () from /usr/lib/libglib-2.0.so.0
#46 0x00007ffff11af020 in ?? () from /usr/lib/libglib-2.0.so.0
#47 0x00007ffff11af0cc in g_main_context_iteration () from /usr/lib/libglib-2.0.so.0
#48 0x00007ffff19a290c in g_application_run () from /usr/lib/libgio-2.0.so.0
#49 0x00000000004353be in main (argc=1, argv=0x7fffffffe618) at ../../src/main.c:258

When sorting the feeds, the tree store used to display them in the view is emptied. When that happens, the selection changed signal is emitted and the feed_list_view_selection_changed_cb callback is called, but flIterHash contains invalid iters, which causes a crash in feed_list_node_update.

In #83 the crash happen in gtk_tree_model_filter_refilter in the same selection changed callback and I'm not sure why. Perhaps the partially cleared tree store is not in a usable state.

I've posted a possible fix.

lwindolf commented 8 years ago

@GreenLunar Can you please retest @Leiaz fix in git master?

GreenLunar commented 8 years ago

I am unable to compile master branch.

make[3]: Entering directory `/home/salix/SLKBUILD/liferea/src/liferea-master/src/tests'
  CC     html.o
  CC     ../html.o
  CC     ../common.o
  CC     ../debug.o
  CC     ../xml.o
  CCLD   html_auto
libtool: link: cannot find the library `/usr/lib/libsecret-1.la' or unhandled argument `/usr/lib/libsecret-1.la'
make[3]: *** [html_auto] Error 1
make[3]: Leaving directory `/home/salix/SLKBUILD/liferea/src/liferea-master/src/tests'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/home/salix/SLKBUILD/liferea/src/liferea-master/src'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/salix/SLKBUILD/liferea/src/liferea-master'
make: *** [all] Error 2
build() failed.
rich-coe commented 8 years ago

install the libsecret devel package using your distribution's package manager.

GreenLunar commented 8 years ago

This is the only available libsecret package in Slackware 14.1.

salix[~]$ slapt-get --search libsecret
libsecret-0.15-i486-1 [inst=yes]: libsecret (library to access the Secret Service API)
mikelolasagasti commented 7 years ago

Works for me in master. @GreenLunar can you reproduce?

lwindolf commented 6 years ago

Closing this very old bug.