I'm getting a segfault when destroying the WebView widget in a idle callback. Piece of code: ... g_signal_connect (self, "navigation-policy-decision-requested", G_CALLBACK (link_cb), NULL); ... static gboolean link_cb (WebKitWebView *web_view, WebKitWebFrame *frame, WebKitNetworkRequest *request, WebKitWebNavigationAction *navigation_action, WebKitWebPolicyDecision *policy_decision, gpointer user_data) { const gchar *uri; uri = webkit_network_request_get_uri (request); if (strncmp (uri, "ascli://remove", 14) == 0) { webkit_web_policy_decision_ignore (policy_decision); g_idle_add ((GSourceFunc) delayed_destroy, web_view); return TRUE; } return FALSE; } ... static gboolean delayed_destroy (GtkWidget *w) { gtk_widget_destroy (w); <<<<----------- CRASH return FALSE; } ...... I'm putting the WebView inside a GtkVBox
Created attachment 42792 [details] small test case I wrote this small test case to demonstrate the crash. Replacing WebView with GtkTextView there makes the crash go away, which implies this is a bug in our stuff.
Created attachment 49497 [details] Fix this crash, by only relaying focus out when the page exists
Comment on attachment 49497 [details] Fix this crash, by only relaying focus out when the page exists Landed as r55245 with minor changes to not require the 200ms timeout on the test. Reviewed by Xan over XMPP.