$ midori &
[1] 30512
(midori4:30512): Gtk-CRITICAL **: IA__gtk_entry_set_text: assertion `text != NULL' failed
(midori4:30512): Gtk-CRITICAL **: IA__gtk_entry_set_text: assertion `text != NULL' failed
(midori4:30512): Gtk-CRITICAL **: IA__gtk_entry_set_text: assertion `text != NULL' failed
(midori4:30512): Gtk-CRITICAL **: IA__gtk_entry_set_text: assertion `text != NULL' failed
This is what I found out (for the first warning).
$ gdb midori
(gdb) run --config=/tmp/midori/ --g-fatal-warnings
Starting program: /usr/bin/midori --config=/tmp/midori/ --g-fatal-warnings
[…]
(midori4:27050): Gtk-CRITICAL **: IA__gtk_entry_set_text: assertion `text != NULL' failed
Program received signal SIGTRAP, Trace/breakpoint trap.
g_logv (log_domain=log_domain@entry=0xb7cba9bb "Gtk", log_level=log_level@entry=G_LOG_LEVEL_CRITICAL,
format=format@entry=0xb7ef5c62 "%s: assertion `%s' failed", args1=args1@entry=0xbfffea1c "7\307̷U\322̷\300Y\377\267\003")
at /build/buildd-glib2.0_2.32.3-1-i386-987P8N/glib2.0-2.32.3/./glib/gmessages.c:765
765 /build/buildd-glib2.0_2.32.3-1-i386-987P8N/glib2.0-2.32.3/./glib/gmessages.c: Datei oder Verzeichnis nicht gefunden.
(gdb) bt
#0 g_logv (log_domain=log_domain@entry=0xb7cba9bb "Gtk", log_level=log_level@entry=G_LOG_LEVEL_CRITICAL,
format=format@entry=0xb7ef5c62 "%s: assertion `%s' failed", args1=args1@entry=0xbfffea1c "7\307̷U\322̷\300Y\377\267\003")
at /build/buildd-glib2.0_2.32.3-1-i386-987P8N/glib2.0-2.32.3/./glib/gmessages.c:765
#1 0xb7eb10c3 in g_log (log_domain=log_domain@entry=0xb7cba9bb "Gtk", log_level=log_level@entry=G_LOG_LEVEL_CRITICAL,
format=format@entry=0xb7ef5c62 "%s: assertion `%s' failed")
at /build/buildd-glib2.0_2.32.3-1-i386-987P8N/glib2.0-2.32.3/./glib/gmessages.c:792
#2 0xb7eb110d in g_return_if_fail_warning (log_domain=log_domain@entry=0xb7cba9bb "Gtk",
pretty_function=pretty_function@entry=0xb7ccc737 "IA__gtk_entry_set_text", expression=0xb7ccd255 "text != NULL")
at /build/buildd-glib2.0_2.32.3-1-i386-987P8N/glib2.0-2.32.3/./glib/gmessages.c:801
#3 0xb7a7ff5d in IA__gtk_entry_set_text (entry=entry@entry=0x80183028, text=text@entry=0x0)
at /build/buildd-gtk+2.0_2.24.10-2-i386-Tg7Q_2/gtk+2.0-2.24.10/gtk/gtkentry.c:6808
#4 0x80079394 in gtk_entry_set_placeholder_text (entry=0x80183028, default_text=default_text@entry=0x0) at ../katze/gtk3-compat.c:85
#5 0x8007685b in sokoke_search_entry_new (placeholder_text=placeholder_text@entry=0x0) at ../midori/sokoke.c:1637
#6 0x8007dc9c in midori_findbar_init (findbar=0x80272810) at ../toolbars/midori-findbar.c:267
#7 0xb7f8e507 in g_type_create_instance (type=type@entry=2150209872)
at /build/buildd-glib2.0_2.32.3-1-i386-987P8N/glib2.0-2.32.3/./gobject/gtype.c:1892
#8 0xb7f70cf1 in g_object_constructor (type=2150209872, n_construct_properties=0, construct_params=0x0)
at /build/buildd-glib2.0_2.32.3-1-i386-987P8N/glib2.0-2.32.3/./gobject/gobject.c:1849
#9 0xb7f72a19 in g_object_newv (object_type=object_type@entry=2150209872, n_parameters=n_parameters@entry=0,
parameters=parameters@entry=0x0) at /build/buildd-glib2.0_2.32.3-1-i386-987P8N/glib2.0-2.32.3/./gobject/gobject.c:1632
#10 0xb7f72fb8 in g_object_new (object_type=2150209872, first_property_name=0x0,
first_property_name@entry=0x80044130 "\203\354\\\211|$T\213|$d\211\\$L\211l$X1\355\350\001\315\375\377\201\303\032\373\005")
at /build/buildd-glib2.0_2.32.3-1-i386-987P8N/glib2.0-2.32.3/./gobject/gobject.c:1542
#11 0x80042adb in midori_browser_init (browser=0x8025e000) at ../midori/midori-browser.c:6721
---Type <return> to continue, or q <return> to quit---
#12 0xb7f8e507 in g_type_create_instance (type=type@entry=2148399640)
at /build/buildd-glib2.0_2.32.3-1-i386-987P8N/glib2.0-2.32.3/./gobject/gtype.c:1892
#13 0xb7f70cf1 in g_object_constructor (type=2148399640, n_construct_properties=5, construct_params=0x802c2e38)
at /build/buildd-glib2.0_2.32.3-1-i386-987P8N/glib2.0-2.32.3/./gobject/gobject.c:1849
#14 0xb7f724fd in g_object_newv (object_type=object_type@entry=2148399640, n_parameters=n_parameters@entry=6,
parameters=parameters@entry=0x802c2c78) at /build/buildd-glib2.0_2.32.3-1-i386-987P8N/glib2.0-2.32.3/./gobject/gobject.c:1713
#15 0xb7f72d4a in g_object_new_valist (object_type=object_type@entry=2148399640,
first_property_name=first_property_name@entry=0x800832df "settings", var_args=0xbffff098 "=",
var_args@entry=0xbffff068 "\220\b\016\200Ro\b\200(\005\024\200\377\065\b\200\070R\260\261\372\005\b\200x\002\024\200\207-\b\200\250R\260\261\065w\b\200\220\323\v\200") at /build/buildd-glib2.0_2.32.3-1-i386-987P8N/glib2.0-2.32.3/./gobject/gobject.c:1830
#16 0xb7f72f90 in g_object_new (object_type=2148399640, first_property_name=first_property_name@entry=0x800832df "settings")
at /build/buildd-glib2.0_2.32.3-1-i386-987P8N/glib2.0-2.32.3/./gobject/gobject.c:1545
#17 0x8003973b in midori_app_create_browser (app=app@entry=0x800add98) at ../midori/midori-app.c:1227
#18 0x8002249f in midori_load_session (data=data@entry=0x80140598) at ../midori/main.c:1407
#19 0xb7ea70f0 in g_idle_dispatch (source=source@entry=0xb1b1cfa0, callback=0x80022400 <midori_load_session>, user_data=0x80140598)
at /build/buildd-glib2.0_2.32.3-1-i386-987P8N/glib2.0-2.32.3/./glib/gmain.c:4657
#20 0xb7ea9633 in g_main_dispatch (context=0x800d3b00) at /build/buildd-glib2.0_2.32.3-1-i386-987P8N/glib2.0-2.32.3/./glib/gmain.c:2539
#21 g_main_context_dispatch (context=context@entry=0x800d3b00)
at /build/buildd-glib2.0_2.32.3-1-i386-987P8N/glib2.0-2.32.3/./glib/gmain.c:3075
#22 0xb7ea99d0 in g_main_context_iterate (context=0x800d3b00, block=block@entry=1, dispatch=dispatch@entry=1,
self=<error reading variable: Unhandled dwarf expression opcode 0xfa>)
at /build/buildd-glib2.0_2.32.3-1-i386-987P8N/glib2.0-2.32.3/./glib/gmain.c:3146
#23 0xb7ea9e2b in g_main_loop_run (loop=loop@entry=0xb1b30100)
at /build/buildd-glib2.0_2.32.3-1-i386-987P8N/glib2.0-2.32.3/./glib/gmain.c:3340
#24 0xb7af7ad0 in IA__gtk_main () at /build/buildd-gtk+2.0_2.24.10-2-i386-Tg7Q_2/gtk+2.0-2.24.10/gtk/gtkmain.c:1256
#25 0x800201b4 in main (argc=1, argv=0xbffff624) at ../midori/main.c:2607
(gdb) bt full 6
#0 g_logv (log_domain=log_domain@entry=0xb7cba9bb "Gtk", log_level=log_level@entry=G_LOG_LEVEL_CRITICAL,
format=format@entry=0xb7ef5c62 "%s: assertion `%s' failed", args1=args1@entry=0xbfffea1c "7\307̷U\322̷\300Y\377\267\003")
at /build/buildd-glib2.0_2.32.3-1-i386-987P8N/glib2.0-2.32.3/./glib/gmessages.c:765
domain = 0x0
data = <optimized out>
depth = <optimized out>
log_func = <optimized out>
domain_fatal_mask = <optimized out>
masquerade_fatal = <optimized out>
test_level = <optimized out>
was_fatal = 0
was_recursion = 0
i = <optimized out>
#1 0xb7eb10c3 in g_log (log_domain=log_domain@entry=0xb7cba9bb "Gtk", log_level=log_level@entry=G_LOG_LEVEL_CRITICAL,
format=format@entry=0xb7ef5c62 "%s: assertion `%s' failed")
at /build/buildd-glib2.0_2.32.3-1-i386-987P8N/glib2.0-2.32.3/./glib/gmessages.c:792
args = 0xbfffea1c "7\307̷U\322̷\300Y\377\267\003"
#2 0xb7eb110d in g_return_if_fail_warning (log_domain=log_domain@entry=0xb7cba9bb "Gtk",
pretty_function=pretty_function@entry=0xb7ccc737 "IA__gtk_entry_set_text", expression=0xb7ccd255 "text != NULL")
at /build/buildd-glib2.0_2.32.3-1-i386-987P8N/glib2.0-2.32.3/./glib/gmessages.c:801
No locals.
#3 0xb7a7ff5d in IA__gtk_entry_set_text (entry=entry@entry=0x80183028, text=text@entry=0x0)
at /build/buildd-gtk+2.0_2.24.10-2-i386-Tg7Q_2/gtk+2.0-2.24.10/gtk/gtkentry.c:6808
tmp_pos = <optimized out>
completion = <optimized out>
__PRETTY_FUNCTION__ = "IA__gtk_entry_set_text"
#4 0x80079394 in gtk_entry_set_placeholder_text (entry=0x80183028, default_text=default_text@entry=0x0) at ../katze/gtk3-compat.c:85
old_value = <optimized out>
#5 0x8007685b in sokoke_search_entry_new (placeholder_text=placeholder_text@entry=0x0) at ../midori/sokoke.c:1637
entry = 0x80183028
(More stack frames follow...)
So the cause seems to be in `midori-findbar.c`.
static void
midori_findbar_init (MidoriFindbar* findbar)
{
GtkToolItem* toolitem;
gtk_widget_set_name (GTK_WIDGET (findbar), "MidoriFindbar");
katze_widget_add_class (GTK_WIDGET (findbar), "bottom-toolbar");
gtk_toolbar_set_icon_size (GTK_TOOLBAR (findbar), GTK_ICON_SIZE_MENU);
gtk_toolbar_set_style (GTK_TOOLBAR (findbar), GTK_TOOLBAR_BOTH_HORIZ);
gtk_toolbar_set_show_arrow (GTK_TOOLBAR (findbar), FALSE);
g_signal_connect (findbar, "key-press-event",
G_CALLBACK (midori_findbar_find_key_press_event_cb), NULL);
toolitem = gtk_tool_item_new ();
gtk_container_set_border_width (GTK_CONTAINER (toolitem), 6);
gtk_container_add (GTK_CONTAINER (toolitem),
/* i18n: A panel at the bottom, to search text in pages */
gtk_label_new_with_mnemonic (_("_Inline Find:")));
gtk_toolbar_insert (GTK_TOOLBAR (findbar), toolitem, -1);
findbar->find_text = sokoke_search_entry_new (NULL);
[…]
This NULL gets passed down all the way causing the warning. I am not sure how to fix it though and what the reason for the call is.
Thanks a lot for the report and first analysis!
It appears the real offender is our fallback of gtk_entry_ set_placeholder _text, it should treat NULL as unsetting the text. I added that.