Failed assertion in midori_view_has_selection with webkit 1.6.1

Bug #883157 reported by gue5t gue5t
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Midori Web Browser
Fix Released
Undecided
Unassigned

Bug Description

Running with --g-fatal-warnings, I get the following backtrace when right-clicking, with git midori, GTK3, and webkit 1.6.1. I think a guard of if (webkit_dom_dom_selection_get_range_count(selection) == 0) { return FALSE; } needs to be added to midori_view_has_selection before line 4182, as current'y we're asking for the first selected range without ensuring that there are more than 0 ranges.

** CRITICAL **: WebKitDOMRange* WebKit::kit(WebCore::Range*): assertion `obj' failed

Program received signal SIGTRAP, Trace/breakpoint trap.
0x00007ffff74d8083 in g_logv () from /usr/lib/libglib-2.0.so.0
(gdb) bt
#0 0x00007ffff74d8083 in g_logv () from /usr/lib/libglib-2.0.so.0
#1 0x00007ffff74d8412 in g_log () from /usr/lib/libglib-2.0.so.0
#2 0x00007ffff34a7d45 in WebKit::kit(WebCore::Range*) ()
   from /usr/lib/libwebkitgtk-1.0.so.0
#3 0x00007ffff3431f1e in webkit_dom_dom_selection_get_range_at ()
   from /usr/lib/libwebkitgtk-1.0.so.0
#4 0x000000000046f46d in midori_view_has_selection (view=0x979a90)
    at ../midori/midori-view.c:4182
#5 0x0000000000469efb in midori_view_populate_popup (view=0x979a90,
    menu=0x82bb70, manual=0) at ../midori/midori-view.c:2281
#6 0x000000000046b387 in webkit_web_view_populate_popup_cb (
    web_view=0x82b9d0, menu=0x82bb70, view=0x979a90)
    at ../midori/midori-view.c:2664
#7 0x00007ffff7b9c0e4 in g_closure_invoke () from /usr/lib/libgobject-2.0.so.0
#8 0x00007ffff7bae06a in ?? () from /usr/lib/libgobject-2.0.so.0
#9 0x00007ffff7bb76f1 in g_signal_emit_valist ()
   from /usr/lib/libgobject-2.0.so.0
#10 0x00007ffff7bb7892 in g_signal_emit () from /usr/lib/libgobject-2.0.so.0
#11 0x00007ffff3416399 in webkit_web_view_forward_context_menu_event(_WebKitWebView*, WebCore::PlatformMouseEvent const&) ()
   from /usr/lib/libwebkitgtk-1.0.so.0
#12 0x00007ffff34168aa in webkit_web_view_button_press_event(_GtkWidget*, _GdkEventButton*) () from /usr/lib/libwebkitgtk-1.0.so.0
#13 0x00007ffff6b03c78 in ?? () from /usr/lib/libgtk-x11-2.0.so.0
#14 0x00007ffff7b9c0e4 in g_closure_invoke () from /usr/lib/libgobject-2.0.so.0
#15 0x00007ffff7bade9f in ?? () from /usr/lib/libgobject-2.0.so.0
#16 0x00007ffff7bb74c3 in g_signal_emit_valist ()
   from /usr/lib/libgobject-2.0.so.0
#17 0x00007ffff7bb7892 in g_signal_emit () from /usr/lib/libgobject-2.0.so.0
#18 0x00007ffff6c1cbf1 in ?? () from /usr/lib/libgtk-x11-2.0.so.0
#19 0x00007ffff6b01e33 in gtk_propagate_event ()
   from /usr/lib/libgtk-x11-2.0.so.0
#20 0x00007ffff6b02193 in gtk_main_do_event ()
   from /usr/lib/libgtk-x11-2.0.so.0
#21 0x00007ffff67777fc in ?? () from /usr/lib/libgdk-x11-2.0.so.0
#22 0x00007ffff74cf7fd in g_main_context_dispatch ()
   from /usr/lib/libglib-2.0.so.0
#23 0x00007ffff74cfff8 in ?? () from /usr/lib/libglib-2.0.so.0
#24 0x00007ffff74d0532 in g_main_loop_run () from /usr/lib/libglib-2.0.so.0
#25 0x00007ffff6b011e7 in gtk_main () from /usr/lib/libgtk-x11-2.0.so.0
#26 0x0000000000428832 in main (argc=1, argv=0x7fffffffe1e8)
    at ../midori/main.c:2629

Revision history for this message
Cris Dywan (kalikiana) wrote :

I agree (though arguably the DOM API should not run into internal errors like that).

Changed in midori:
status: New → Fix Committed
Cris Dywan (kalikiana)
Changed in midori:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.