g_markup_escape_text: assertion 'text != NULL' failed
#0 _g_log_abort (breakpoint=1) at ../../../../Projects/glib/glib/gmessages.c:557
#1 0x00007fda99a00ba9 in g_logv (log_domain=0x7fda99a5ef24 "GLib", log_level=G_LOG_LEVEL_CRITICAL,
format=0x7fda99a6082d "%s: assertion '%s' failed", args=0x7ffd8fb147d8)
at ../../../../Projects/glib/glib/gmessages.c:1373
#2 0x00007fda99a00c9a in g_log (log_domain=0x7fda99a5ef24 "GLib", log_level=G_LOG_LEVEL_CRITICAL,
format=0x7fda99a6082d "%s: assertion '%s' failed") at ../../../../Projects/glib/glib/gmessages.c:1415
#3 0x00007fda99a02b49 in g_return_if_fail_warning (log_domain=0x7fda99a5ef24 "GLib",
pretty_function=0x7fda99a60210 <__FUNCTION__.6624> "g_markup_escape_text",
expression=0x7fda99a5f54b "text != NULL") at ../../../../Projects/glib/glib/gmessages.c:2771
#4 0x00007fda999fe433 in g_markup_escape_text (text=0x0, length=-1) at ../../../../Projects/glib/glib/gmarkup.c:2301
#5 0x00007fda9a623850 in add_tabs (self=0x2c4f240, query=0x35867e0 "e")
at ../../../../Projects/epiphany/src/ephy-suggestion-model.c:412
#6 0x00007fda9a623abd in query_completed_cb (service=0x2c4e870, success=1, result_data=0x1e20aa0,
user_data=0x347eb40) at ../../../../Projects/epiphany/src/ephy-suggestion-model.c:453
#7 0x00007fda9a5950d3 in ephy_history_service_execute_job_callback (data=0x3837e80)
at ../../../../Projects/epiphany/lib/history/ephy-history-service.c:524
#8 0x00007fda999f94c0 in g_idle_dispatch (source=0x3827920,
callback=0x7fda9a595022 <ephy_history_service_execute_job_callback>, user_data=0x3837e80)
at ../../../../Projects/glib/glib/gmain.c:5617
#9 0x00007fda999f695a in g_main_dispatch (context=0x1c38a90) at ../../../../Projects/glib/glib/gmain.c:3179
#10 0x00007fda999f77b7 in g_main_context_dispatch (context=0x1c38a90) at ../../../../Projects/glib/glib/gmain.c:3844
#11 0x00007fda999f799b in g_main_context_iterate (context=0x1c38a90, block=1, dispatch=1, self=0x1da8180)
at ../../../../Projects/glib/glib/gmain.c:3917
#12 0x00007fda999f7a5f in g_main_context_iteration (context=0x1c38a90, may_block=1)
at ../../../../Projects/glib/glib/gmain.c:3978
#13 0x00007fda99c4241b in g_application_run (application=0x1ee6220, argc=1, argv=0x7ffd8fb14e18)
at ../../../../Projects/glib/gio/gapplication.c:2559
#14 0x0000000000404af0 in main (argc=1, argv=0x7ffd8fb14e18) at ../../../../Projects/epiphany/src/ephy-main.c:427
Problem is here:
if (title)
title_casefold = g_utf8_casefold (title, -1);
if ((title_casefold && strstr (title_casefold, query_casefold)) || strstr (display_address_casefold, query_casefold)) {
escaped_title = g_markup_escape_text (title, -1);
This needs to be looked at. Problem is we should not be calling g_markup_escape_text() if title is NULL, but it can be, as shown by the condition checking this right above.
I guess we could do something like:
escaped_title = title ? g_markup_escape_text (title, -1) : "";
Or use the URL instead.
Reproducer is to start epiphany, Ctrl+T, and type "example.com". It crashes for me maybe about half the time. Seems to depend on timing.