GNOME Bugzilla – Bug 739886
sharing: Prevent an endless loop and resulting stack overflow
Last modified: 2014-11-13 10:29:54 UTC
See https://bugzilla.redhat.com/show_bug.cgi?id=1161976 for a stack trace.
Created attachment 290346 [details] [review] sharing: Prevent an endless loop and resulting stack overflow We need to block ourselves or we end up in an endless loop when setting the swtich state since we're the ::state-set handler.
Review of attachment 290346 [details] [review]: "switch". I didn't see that problem, funnily enough, but sure.
Created attachment 290540 [details] [review] sharing: Prevent an endless loop and resulting stack overflow We need to block ourselves around the gtk_switch_set_active() call or we end up in an endless loop since we're the ::state-set handler. -- (In reply to comment #2) > I didn't see that problem, funnily enough, but sure. In fact I didn't either, the documentation for GtkSwitch::state-set even says that calling gtk_swtich_set_state() from the handler is the right thing to do. But today it occured to me that maybe it was the gtk_switch_set_active() call in the error path that caused this so I tried disabling the sharing plugin in g-s-d and yes now I can reproduce this. So, I moved the block/unblock to be just around the set_active() call and it works fine now.
Review of attachment 290540 [details] [review]: Just mention in which case the crash you're fixing happens in the commit message. Thanks!
41230da..f5be9cc gnome-3-14 -> gnome-3-14 a91a607..7121f03 master -> master Attachment 290540 [details] pushed as 7121f03 - sharing: Prevent an endless loop and resulting stack overflow