Skip to content

Fix crash on exit caused by async callback and signal handler on disposed objects

crvi requested to merge crvi/rhythmbox:rb-header-crash-on-exit-issue into master

Rhythmbox crashes with SIGSEGV on exit.

One such instance involving RBHeader object:

This is due to art_cb () not properly handling the disposed state of RBHeader.

(gdb) bt
#0  0x00007f7f269d1f37 in rb_shell_player_get_playing_entry (player=0x0) at rb-shell-player.c:613
#1  0x00007f7f26a13ff7 in art_cb (key=<optimized out>, store_key=0x556d030a8980, filename=0x0, data=0x0, header=0x556d01588230 [RBHeader]) at rb-header.c:490
#2  0x00007f7f26a098af in answer_request (data=<optimized out>, filename=<optimized out>, store_key=<optimized out>, request=0x556d0304e540) at rb-ext-db.c:835
#3  store_request_cb (store=0x556d014db350 [RBExtDB], result=<optimized out>, data=<optimized out>) at rb-ext-db.c:835
#4  0x00007f7f25499b42 in g_simple_async_result_complete (simple=0x7f7f04015ee0 [GSimpleAsyncResult]) at ../../../gio/gsimpleasyncresult.c:802
#5  0x00007f7f25499beb in complete_in_idle_cb_for_thread (_data=0x556d012bbb40) at ../../../gio/gsimpleasyncresult.c:873
#6  0x00007f7f25ef94ce in g_main_dispatch (context=0x556d01011eb0) at ../../../glib/gmain.c:3309
#7  g_main_context_dispatch (context=context@entry=0x556d01011eb0) at ../../../glib/gmain.c:3974
#8  0x00007f7f25ef9880 in g_main_context_iterate (context=context@entry=0x556d01011eb0, block=block@entry=0, dispatch=dispatch@entry=1, self=<optimized out>) at ../../../glib/gmain.c:4047
#9  0x00007f7f25ef990f in g_main_context_iteration (context=context@entry=0x556d01011eb0, may_block=may_block@entry=0) at ../../../glib/gmain.c:4108
#10 0x00007f7f254db09a in g_application_run (application=0x556d0101b140 [RBApplication], argc=argc@entry=1, argv=argv@entry=0x7ffd6cb12f88) at ../../../gio/gapplication.c:2584
#11 0x00007f7f269bcca6 in rb_application_run (app=0x556d0101b140 [RBApplication], argc=<optimized out>, argv=0x7ffd6cb12f88) at rb-application.c:595
#12 0x0000556cfff90249 in main (argc=3, argv=0x7ffd6cb12f88) at main.c:89
Edited by crvi

Merge request reports