<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.webkit.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4.1"
          urlbase="https://bugs.webkit.org/"
          
          maintainer="admin@webkit.org"
>

    <bug>
          <bug_id>133118</bug_id>
          
          <creation_ts>2014-05-20 05:09:27 -0700</creation_ts>
          <short_desc>REGRESSION(r168625): [GTK] Assertion failure in LocalStorageDatabaseTracker</short_desc>
          <delta_ts>2014-05-21 09:19:56 -0700</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>WebKitGTK</component>
          <version>528+ (Nightly build)</version>
          <rep_platform>Unspecified</rep_platform>
          <op_sys>Unspecified</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Tomas Popela">tpopela</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>berto</cc>
    
    <cc>cgarcia</cc>
    
    <cc>commit-queue</cc>
    
    <cc>gustavo</cc>
    
    <cc>mrobinson</cc>
    
    <cc>rego</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1010461</commentid>
    <comment_count>0</comment_count>
    <who name="Tomas Popela">tpopela</who>
    <bug_when>2014-05-20 05:09:27 -0700</bug_when>
    <thetext>After http://trac.webkit.org/changeset/168628 the MiniBrowser is crasing because we are passing empty localStorageDirectory when creating new WebContext.

$ ./MiniBrowser
ASSERTION FAILED: !m_localStorageDirectory.isEmpty()
../../Source/WebKit2/UIProcess/Storage/LocalStorageDatabaseTracker.cpp(50) : WebKit::LocalStorageDatabaseTracker::LocalStorageDatabaseTracker(WTF::PassRefPtr&lt;WorkQueue&gt;, const WTF::String&amp;)
1   0x7fb148665f32 /home/tpopela/dev/WebKit/WebKitBuild/Debug/lib/libwebkit2gtk-3.0.so.25(WTFCrash+0x1e) [0x7fb148665f32]
2   0x7fb14841aab0 /home/tpopela/dev/WebKit/WebKitBuild/Debug/lib/libwebkit2gtk-3.0.so.25(_ZN6WebKit27LocalStorageDatabaseTrackerC1EN3WTF10PassRefPtrI9WorkQueueEERKNS1_6StringE+0xa8) [0x7fb14841aab0]
3   0x7fb14841a97d /home/tpopela/dev/WebKit/WebKitBuild/Debug/lib/libwebkit2gtk-3.0.so.25(_ZN6WebKit27LocalStorageDatabaseTracker6createEN3WTF10PassRefPtrI9WorkQueueEERKNS1_6StringE+0x4d) [0x7fb14841a97d]
4   0x7fb1485b3e7e /home/tpopela/dev/WebKit/WebKitBuild/Debug/lib/libwebkit2gtk-3.0.so.25(_ZN6WebKit14StorageManagerC2ERKN3WTF6StringE+0x92) [0x7fb1485b3e7e]
5   0x7fb1485b3dd1 /home/tpopela/dev/WebKit/WebKitBuild/Debug/lib/libwebkit2gtk-3.0.so.25(_ZN6WebKit14StorageManager6createERKN3WTF6StringE+0x2d) [0x7fb1485b3dd1]
6   0x7fb14831d278 /home/tpopela/dev/WebKit/WebKitBuild/Debug/lib/libwebkit2gtk-3.0.so.25(_ZN6WebKit10WebContextC1ENS_23WebContextConfigurationE+0x320) [0x7fb14831d278]
7   0x7fb14831ced6 /home/tpopela/dev/WebKit/WebKitBuild/Debug/lib/libwebkit2gtk-3.0.so.25(_ZN6WebKit10WebContext6createENS_23WebContextConfigurationE+0x52) [0x7fb14831ced6]
8   0x7fb148584edf /home/tpopela/dev/WebKit/WebKitBuild/Debug/lib/libwebkit2gtk-3.0.so.25(+0x4035edf) [0x7fb148584edf]
9   0x306d66fa18 /lib64/libglib-2.0.so.0(g_once_impl+0x58) [0x306d66fa18]
10  0x7fb148585083 /home/tpopela/dev/WebKit/WebKitBuild/Debug/lib/libwebkit2gtk-3.0.so.25(webkit_web_context_get_default+0x3d) [0x7fb148585083]
11  0x40f986 ./MiniBrowser(main+0x1aa) [0x40f986]
12  0x37db621d65 /lib64/libc.so.6(__libc_start_main+0xf5) [0x37db621d65]
13  0x408369 ./MiniBrowser() [0x408369]
Segmentation fault (core dumped)
 
(gdb) bt full
#0  0x00007fb148665f37 in WTFCrash () at ../../Source/WTF/wtf/Assertions.cpp:333
No locals.
#1  0x00007fb14841aab0 in WebKit::LocalStorageDatabaseTracker::LocalStorageDatabaseTracker (this=0xa37040, queue=..., localStorageDirectory=&quot;(null)&quot;) at ../../Source/WebKit2/UIProcess/Storage/LocalStorageDatabaseTracker.cpp:50
        localStorageDatabaseTracker = {m_ptr = 0x7fff65b93518}
#2  0x00007fb14841a97d in WebKit::LocalStorageDatabaseTracker::create (queue=..., localStorageDirectory=&quot;(null)&quot;) at ../../Source/WebKit2/UIProcess/Storage/LocalStorageDatabaseTracker.cpp:43
No locals.
#3  0x00007fb1485b3e7e in WebKit::StorageManager::StorageManager (this=0xa36c10, localStorageDirectory=&quot;(null)&quot;) at ../../Source/WebKit2/UIProcess/Storage/StorageManager.cpp:378
No locals.
#4  0x00007fb1485b3dd1 in WebKit::StorageManager::create (localStorageDirectory=&quot;(null)&quot;) at ../../Source/WebKit2/UIProcess/Storage/StorageManager.cpp:373
No locals.
#5  0x00007fb14831d278 in WebKit::WebContext::WebContext (this=0xb83c00, configuration=...) at ../../Source/WebKit2/UIProcess/WebContext.cpp:183
No locals.
#6  0x00007fb14831ced6 in WebKit::WebContext::create (configuration=...) at ../../Source/WebKit2/UIProcess/WebContext.cpp:138
No locals.
#7  0x00007fb148584edf in createDefaultWebContext () at ../../Source/WebKit2/UIProcess/API/gtk/WebKitWebContext.cpp:258
        webContext = {m_ptr = 0x98f210 [WebKitWebContext]}
        priv = 0x98f130
        webContextConfiguration = {injectedBundlePath = &quot;(null)&quot;, localStorageDirectory = &quot;(null)&quot;, webSQLDatabaseDirectory = &quot;(null)&quot;, indexedDBDatabaseDirectory = &quot;(null)&quot;}
#8  0x000000306d66fa18 in g_once_impl (once=0x7fb14d3f8e30 &lt;webkit_web_context_get_default::onceInit&gt;, func=0x7fb148584d92 &lt;createDefaultWebContext(gpointer)&gt;, arg=0x0) at gthread.c:590
No locals.
#9  0x00007fb148585083 in webkit_web_context_get_default () at ../../Source/WebKit2/UIProcess/API/gtk/WebKitWebContext.cpp:290
        onceInit = {status = G_ONCE_STATUS_PROGRESS, retval = 0x0}
#10 0x000000000040f986 in main (argc=1, argv=0x7fff65b937b8) at ../../Tools/MiniBrowser/gtk/main.c:272
        multiprocess = 0x0
        context = 0xa2e400
        webkitSettings = 0xb26af0 [WebKitSettings]
        error = 0x0</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1010718</commentid>
    <comment_count>1</comment_count>
    <who name="Manuel Rego Casasnovas">rego</who>
    <bug_when>2014-05-21 01:24:46 -0700</bug_when>
    <thetext>I&apos;ve reverted r168628 and it&apos;s still crashing to me:

ASSERTION FAILED: !localStorageDirectory.isNull()
../../Source/WebKit2/UIProcess/Storage/StorageManager.cpp(390) : void WebKit::StorageManager::setLocalStorageDirectory(const WTF::String&amp;)
1   0x7fa5ae7f498e /home/rego/checkout/WebKit/WebKitBuild/Debug/lib/libwebkit2gtk-3.0.so.25(WTFCrash+0x1e) [0x7fa5ae7f498e]
2   0x7fa5ae74304e /home/rego/checkout/WebKit/WebKitBuild/Debug/lib/libwebkit2gtk-3.0.so.25(_ZN6WebKit14StorageManager24setLocalStorageDirectoryERKN3WTF6StringE+0x44) [0x7fa5ae74304e]
3   0x7fa5ae4af28a /home/rego/checkout/WebKit/WebKitBuild/Debug/lib/libwebkit2gtk-3.0.so.25(_ZN6WebKit10WebContextC1ENS_23WebContextConfigurationE+0x61a) [0x7fa5ae4af28a]
4   0x7fa5ae4aebee /home/rego/checkout/WebKit/WebKitBuild/Debug/lib/libwebkit2gtk-3.0.so.25(_ZN6WebKit10WebContext6createENS_23WebContextConfigurationE+0x52) [0x7fa5ae4aebee]
5   0x7fa5ae714350 /home/rego/checkout/WebKit/WebKitBuild/Debug/lib/libwebkit2gtk-3.0.so.25(+0x420c350) [0x7fa5ae714350]
6   0x7fa5a9869be8 /home/rego/checkout/WebKit/WebKitBuild/Dependencies/Root/lib64/libglib-2.0.so.0(g_once_impl+0x58) [0x7fa5a9869be8]
7   0x7fa5ae7144f4 /home/rego/checkout/WebKit/WebKitBuild/Debug/lib/libwebkit2gtk-3.0.so.25(webkit_web_context_get_default+0x3d) [0x7fa5ae7144f4]
8   0x40f9ae WebKitBuild/Debug/bin/MiniBrowser(main+0x1aa) [0x40f9ae]
9   0x7fa5a9475b45 /lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xf5) [0x7fa5a9475b45]
10  0x408399 WebKitBuild/Debug/bin/MiniBrowser() [0x408399]
Segmentation fault


Backtrace:

#0  0x00007ffff3217993 in WTFCrash () at ../../Source/WTF/wtf/Assertions.cpp:333
No locals.
#1  0x00007ffff316604e in WebKit::StorageManager::setLocalStorageDirectory (this=0x5655c0, localStorageDirectory=...) at ../../Source/WebKit2/UIProcess/Storage/StorageManager.cpp:390
        __PRETTY_FUNCTION__ = &quot;void WebKit::StorageManager::setLocalStorageDirectory(const WTF::String&amp;)&quot;
#2  0x00007ffff2ed228a in WebKit::WebContext::WebContext (this=0x487310, configuration=...) at ../../Source/WebKit2/UIProcess/WebContext.cpp:234
No locals.
#3  0x00007ffff2ed1bee in WebKit::WebContext::create (configuration=...) at ../../Source/WebKit2/UIProcess/WebContext.cpp:138
No locals.
#4  0x00007ffff3137350 in createDefaultWebContext () at ../../Source/WebKit2/UIProcess/API/gtk/WebKitWebContext.cpp:258
        webContext = {m_ptr = 0x564150}
        priv = 0x564070
        webContextConfiguration = {injectedBundlePath = {m_impl = {m_ptr = 0x0}}, localStorageDirectory = {m_impl = {m_ptr = 0x0}}, webSQLDatabaseDirectory = {m_impl = {m_ptr = 0x0}}, 
          indexedDBDatabaseDirectory = {m_impl = {m_ptr = 0x0}}}
#5  0x00007fffee28cbe8 in g_once_impl (once=0x7ffff7dc9d50 &lt;webkit_web_context_get_default::onceInit&gt;, func=0x7ffff3137203 &lt;createDefaultWebContext(gpointer)&gt;, arg=0x0) at gthread.c:624
No locals.
#6  0x00007ffff31374f4 in webkit_web_context_get_default () at ../../Source/WebKit2/UIProcess/API/gtk/WebKitWebContext.cpp:290
        onceInit = {status = G_ONCE_STATUS_PROGRESS, retval = 0x0}
#7  0x000000000040f9ae in main (argc=1, argv=0x7fffffffd898) at ../../Tools/MiniBrowser/gtk/main.c:272
        multiprocess = 0x0
        context = 0x55be30
        webkitSettings = 0x485200
        error = 0x0</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1010719</commentid>
    <comment_count>2</comment_count>
    <who name="Manuel Rego Casasnovas">rego</who>
    <bug_when>2014-05-21 01:34:17 -0700</bug_when>
    <thetext>Maybe it was introduced in: http://trac.webkit.org/changeset/168625</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1010768</commentid>
    <comment_count>3</comment_count>
      <attachid>231831</attachid>
    <who name="Carlos Garcia Campos">cgarcia</who>
    <bug_when>2014-05-21 08:48:47 -0700</bug_when>
    <thetext>Created attachment 231831
Patch

Temptative fix, I haven&apos;t had time to try it out.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1010770</commentid>
    <comment_count>4</comment_count>
    <who name="WebKit Commit Bot">commit-queue</who>
    <bug_when>2014-05-21 08:51:01 -0700</bug_when>
    <thetext>Thanks for the patch. If this patch contains new public API please make sure it follows the guidelines for new WebKit2 GTK+ API. See http://trac.webkit.org/wiki/WebKitGTK/AddingNewWebKit2API</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1010771</commentid>
    <comment_count>5</comment_count>
      <attachid>231831</attachid>
    <who name="Philippe Normand">pnormand</who>
    <bug_when>2014-05-21 09:06:26 -0700</bug_when>
    <thetext>Comment on attachment 231831
Patch

Looks legit!</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1010772</commentid>
    <comment_count>6</comment_count>
    <who name="Manuel Rego Casasnovas">rego</who>
    <bug_when>2014-05-21 09:07:06 -0700</bug_when>
    <thetext>(In reply to comment #3)
&gt; Created an attachment (id=231831) [details]
&gt; Patch
&gt; 
&gt; Temptative fix, I haven&apos;t had time to try it out.

Thanks for the patch, it fixes the issue here.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1010782</commentid>
    <comment_count>7</comment_count>
    <who name="Carlos Garcia Campos">cgarcia</who>
    <bug_when>2014-05-21 09:19:56 -0700</bug_when>
    <thetext>Committed r169163: &lt;http://trac.webkit.org/changeset/169163&gt;</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="1"
              isprivate="0"
          >
            <attachid>231831</attachid>
            <date>2014-05-21 08:48:47 -0700</date>
            <delta_ts>2014-05-21 09:06:25 -0700</delta_ts>
            <desc>Patch</desc>
            <filename>wk2-assert.diff</filename>
            <type>text/plain</type>
            <size>1579</size>
            <attacher name="Carlos Garcia Campos">cgarcia</attacher>
            
              <data encoding="base64">ZGlmZiAtLWdpdCBhL1NvdXJjZS9XZWJLaXQyL0NoYW5nZUxvZyBiL1NvdXJjZS9XZWJLaXQyL0No
YW5nZUxvZwppbmRleCA2ODBkNThjLi45MjIxNWMxIDEwMDY0NAotLS0gYS9Tb3VyY2UvV2ViS2l0
Mi9DaGFuZ2VMb2cKKysrIGIvU291cmNlL1dlYktpdDIvQ2hhbmdlTG9nCkBAIC0xLDMgKzEsMTYg
QEAKKzIwMTQtMDUtMjEgIENhcmxvcyBHYXJjaWEgQ2FtcG9zICA8Y2dhcmNpYUBpZ2FsaWEuY29t
PgorCisgICAgICAgIFJFR1JFU1NJT04ocjE2ODYyNSk6IFtHVEtdIEFzc2VydGlvbiBmYWlsdXJl
IGluIExvY2FsU3RvcmFnZURhdGFiYXNlVHJhY2tlcgorICAgICAgICBodHRwczovL2J1Z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HRXZWJDb250ZXh0KGdwb2ludGVy
KQogCiAgICAgV2ViQ29udGV4dENvbmZpZ3VyYXRpb24gd2ViQ29udGV4dENvbmZpZ3VyYXRpb247
CiAgICAgd2ViQ29udGV4dENvbmZpZ3VyYXRpb24uaW5qZWN0ZWRCdW5kbGVQYXRoID0gV2ViQ29y
ZTo6ZmlsZW5hbWVUb1N0cmluZyhpbmplY3RlZEJ1bmRsZUZpbGVuYW1lKCkuZGF0YSgpKTsKKyAg
ICBXZWJDb250ZXh0OjphcHBseVBsYXRmb3JtU3BlY2lmaWNDb25maWd1cmF0aW9uRGVmYXVsdHMo
d2ViQ29udGV4dENvbmZpZ3VyYXRpb24pOwogICAgIHByaXYtPmNvbnRleHQgPSBXZWJDb250ZXh0
OjpjcmVhdGUoc3RkOjptb3ZlKHdlYkNvbnRleHRDb25maWd1cmF0aW9uKSk7CiAKICAgICBwcml2
LT5yZXF1ZXN0TWFuYWdlciA9IHdlYkNvbnRleHQtPnByaXYtPmNvbnRleHQtPnN1cHBsZW1lbnQ8
V2ViU291cEN1c3RvbVByb3RvY29sUmVxdWVzdE1hbmFnZXI+KCk7Cg==
</data>
<flag name="review"
          id="256291"
          type_id="1"
          status="+"
          setter="pnormand"
    />
          </attachment>
      

    </bug>

</bugzilla>