After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 671901 - crash in history service
crash in history service
Status: RESOLVED FIXED
Product: epiphany
Classification: Core
Component: General
git master
Other Linux
: Normal normal
: ---
Assigned To: Epiphany Maintainers
Epiphany Maintainers
Depends on:
Blocks:
 
 
Reported: 2012-03-12 13:53 UTC by Frederic Peters
Modified: 2012-03-13 13:19 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
ephy-history-service: make the async API cancellable (35.64 KB, patch)
2012-03-13 09:04 UTC, Claudio Saavedra
committed Details | Review
ephy-embed: cancel the pending history queries during finalize (1.58 KB, patch)
2012-03-13 09:04 UTC, Claudio Saavedra
none Details | Review
ephy-embed: cancel the pending history queries during finalize (2.05 KB, patch)
2012-03-13 09:09 UTC, Claudio Saavedra
committed Details | Review

Description Frederic Peters 2012-03-12 13:53:59 UTC
Epiphany crashes reliably after adding a calendar event to egroupware (when the dialog popup is closed).

GLib-GObject-WARNING **: invalid uninstantiatable type `(null)' in cast to `EphyEmbed'

(gdb) bt full
  • #0 g_logv
    at gmessages.c line 758
  • #1 g_log
    at gmessages.c line 792
  • #2 g_type_check_instance_cast
    at gtype.c line 4011
  • #3 get_host_for_url_cb
    at ephy-embed.c line 245
  • #4 ephy_history_service_execute_job_callback
    at ephy-history-service.c line 423
  • #5 g_idle_dispatch
    at gmain.c line 4629
  • #6 g_main_dispatch
    at gmain.c line 2510
  • #7 g_main_context_dispatch
    at gmain.c line 3047
  • #8 g_main_context_iterate
    at gmain.c line 3118
  • #9 g_main_context_iteration
    at gmain.c line 3179
  • #10 g_application_run
    at gapplication.c line 1496
  • #11 main
    at ephy-main.c line 483

Comment 1 Claudio Saavedra 2012-03-12 15:10:32 UTC
I guess that the dialog popup is being closed before the zoom level retrieval happens and by then the EphyEmbed requesting for it doesn't exist anymore..
Comment 2 Claudio Saavedra 2012-03-13 09:04:07 UTC
Created attachment 209584 [details] [review]
ephy-history-service: make the async API cancellable
Comment 3 Claudio Saavedra 2012-03-13 09:04:11 UTC
Created attachment 209585 [details] [review]
ephy-embed: cancel the pending history queries during finalize
Comment 4 Claudio Saavedra 2012-03-13 09:04:57 UTC
There are probably other places where we should add a cancellable, but the second patch fixes at least this crasher in EphyEmbed.
Comment 5 Claudio Saavedra 2012-03-13 09:09:56 UTC
Created attachment 209586 [details] [review]
ephy-embed: cancel the pending history queries during finalize
Comment 6 Xan Lopez 2012-03-13 10:23:44 UTC
Review of attachment 209584 [details] [review]:

This looks good. As commented on jabber I'd explain somewhere (in the commit message or the file itself, not sure) that Read operations can be canceled both completely and in their notification phase, while Write operations can only be canceled in their notification phase (ie, a Write operation once queued will always be executed).
Comment 7 Xan Lopez 2012-03-13 10:26:08 UTC
Review of attachment 209586 [details] [review]:

OK.

::: embed/ephy-embed.c
@@ -436,1 +437,5 @@
 
+  if (priv->history_service_cancellable) {
+    g_cancellable_cancel (priv->history_service_cancellable);
+    g_object_unref (priv->history_service_cancellable);
+    priv->history_service_cancellable = NULL;

You can use my new favorite function g_clear_object here, if you want.