(WebKitWebProcess:1594): GLib-CRITICAL **: g_main_loop_run: assertion 'loop != NULL' failed (WebKitWebProcess:1617): GLib-CRITICAL **: g_main_loop_run: assertion 'loop != NULL' failed (WebKitWebProcess:1609): GLib-CRITICAL **: g_main_loop_run: assertion 'loop != NULL' failed (WebKitWebProcess:1613): GLib-CRITICAL **: g_main_loop_run: assertion 'loop != NULL' failed (WebKitWebProcess:1638): GLib-CRITICAL **: g_main_loop_run: assertion 'loop != NULL' failed This is caused by the CustomProtocolManager work queue theread. This WorkQueue is created when the CustomProtocolManager object is constructed, but destroyed when it's initialized when the UI process asks to use the network process. In this case, sometimes happens that the work queue thread that runs the main loop is executed once the object has been destroyed and the main loop pointer is null.
Created attachment 245542 [details] Patch Detach the worker thread when the work queue is destroyed, right before deleting the main loop
Attachment 245542 [details] did not pass style-queue: ERROR: Source/WebKit2/Platform/gtk/WorkQueueGtk.cpp:55: More than one command on the same line [whitespace/newline] [4] Total errors found: 1 in 2 files If any of these errors are false positives, please file a bug against check-webkit-style.
Comment on attachment 245542 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=245542&action=review > Source/WebKit2/Platform/gtk/WorkQueueGtk.cpp:55 > - m_workQueueThread = createThread(reinterpret_cast<WTF::ThreadFunction>(&WorkQueue::startWorkQueueThread), this, threadName); > + m_workQueueThread = createThread(threadName, [this] { g_main_loop_run(m_eventLoop.get()); }); WorkQueue is ref-counted. This should probably pass a RefPtr protector into the lambda.
Committed r179395: <http://trac.webkit.org/changeset/179395>