RESOLVED FIXED 56083
[GTK] unittests/testapplicationcache crashes
https://bugs.webkit.org/show_bug.cgi?id=56083
Summary [GTK] unittests/testapplicationcache crashes
Philippe Normand
Reported 2011-03-10 02:14:50 PST
#0 0x00007fe8e57d4916 in WebCore::ApplicationCacheStorage::setCacheDirectory (this=0x1dc8230, cacheDirectory=...) at ../../Source/WebCore/loader/appcache/ApplicationCacheStorage.cpp:359 359 ASSERT(m_cacheDirectory.isNull()); Thread 1 (Thread 7535): #0 0x00007fe8e57d4916 in WebCore::ApplicationCacheStorage::setCacheDirectory (this=0x1dc8230, cacheDirectory=...) at ../../Source/WebCore/loader/appcache/ApplicationCacheStorage.cpp:359 #1 0x00007fe8e5203411 in webkit_application_cache_set_database_directory_path (path=0x1e6e430 "/home/slave/.local/share/webkit/databases") at ../../Source/WebKit/gtk/webkit/webkitapplicationcache.cpp:118 #2 0x0000000000400ed9 in test_application_cache_database_directory_path () at ../../Source/WebKit/gtk/tests/testapplicationcache.c:46 #3 0x00007fe8e19d48e3 in test_case_run (suite=0x1d99ba0, path=0x7fe8e1a21c5e "") at /tmp/buildd/glib2.0-2.27.91/./glib/gtestutils.c:1174 #4 g_test_run_suite_internal (suite=0x1d99ba0, path=0x7fe8e1a21c5e "") at /tmp/buildd/glib2.0-2.27.91/./glib/gtestutils.c:1223 #5 0x00007fe8e19d4a56 in g_test_run_suite_internal (suite=<value optimized out>, path=0x7fe8e1a21c5e "") at /tmp/buildd/glib2.0-2.27.91/./glib/gtestutils.c:1233 #6 0x00007fe8e19d4a56 in g_test_run_suite_internal (suite=<value optimized out>, path=0x7fe8e1a21c5e "") at /tmp/buildd/glib2.0-2.27.91/./glib/gtestutils.c:1233 #7 0x00007fe8e19d4d3b in g_test_run_suite (suite=0x1d99b20) at /tmp/buildd/glib2.0-2.27.91/./glib/gtestutils.c:1282 #8 0x0000000000400ff0 in main (argc=1, argv=0x7fff53873978) at ../../Source/WebKit/gtk/tests/testapplicationcache.c:70
Attachments
proposed patch (5.82 KB, patch)
2011-03-10 06:46 PST, Philippe Normand
xan.lopez: review+
Philippe Normand
Comment 2 2011-03-10 02:21:39 PST
Sorry Christian, doesn't seem to be your patch.
Philippe Normand
Comment 3 2011-03-10 02:43:23 PST
Lukasz, the testapplicationcache has been crashing since its checkin in r80225. Did it ever run fine for you? in Debug build?
Philippe Normand
Comment 4 2011-03-10 03:23:06 PST
webkit_application_cache_set_database_directory_path() is called twice, once in webkitInit() and once in the test itself. To avoid the ASSERT the test should probably clear the path before setting it again. Or it could be done directly in webkit_application_cache_set_database_directory_path().
Philippe Normand
Comment 5 2011-03-10 03:38:48 PST
The mac port calls cacheStorage().setCacheDirectory() once only in all application life-time and I think we should do the same and not expose an API to modify the cache directory as there's no API to clear m_cacheDirectory in ApplicationCacheStorage.
Philippe Normand
Comment 6 2011-03-10 03:39:53 PST
CCing Xan as he reviewed the original patch.
Philippe Normand
Comment 7 2011-03-10 06:46:56 PST
Created attachment 85316 [details] proposed patch
Xan Lopez
Comment 8 2011-03-10 06:48:25 PST
Comment on attachment 85316 [details] proposed patch Thank you.
Philippe Normand
Comment 9 2011-03-10 06:52:38 PST
Lukasz Slachciak
Comment 10 2011-04-24 00:41:02 PDT
Thx Philippe for fix. I was testing it on the release build and everything seemed OK. I'm sorry for problems.
Note You need to log in before you can comment on or make changes to this bug.