[webkit-dev] Multithread issue

David Kilzer ddkilzer at webkit.org
Wed May 27 10:18:08 PDT 2009


This assertion is telling you that the code expects to be running on the main thread.

You're also probably running a debug build since assertions are disabled in release builds.

Dave




________________________________
From: Matt Bockt <bocktmatt at gmail.com>
To: webkit-dev at lists.webkit.org
Sent: Wednesday, May 27, 2009 5:17:44 AM
Subject: [webkit-dev]  Multithread issue

Hi everybody, 

I'm new to WebKit and I'm developing a C++ application that uses the WebKit browser.

It runs on Fedora10, kernel 2.6.27.5-117.fc10.i686.
The WebKit version I'm using is the r44111.

Here is my problem : I'm creating a new web view in the main thread, say, thread A. 
The webview is then attached to a gtk_window as it's made in the GtkLauncher exemple.

Then webkit_web_view_load_uri() is called, always in thread A.

Finally, the gtk_main() function is called in another thread, say thread B.

And it crashes  with the following trace  : 

ASSERTION FAILED: m_thread == currentThread()
(WebCore/platform/Timer.cpp:206 bool WebCore::TimerBase::isActive() const)

I experience this problem with the webkit r44111 and r43808, but not with r38297.

I
noticed that there must have been a modification in the thread management
between the builds r38297 and r43808 since g_threads must be
initialized. 
But I can't figure out why it doesn't work.

Any suggestions or specific rules to follow about multi-threading, gtk and webkit ?

Thank you for your help.

-- 
matt
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-dev/attachments/20090527/fa007d77/attachment.html>


More information about the webkit-dev mailing list