<?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>36894</bug_id>
          
          <creation_ts>2010-03-31 11:49:31 -0700</creation_ts>
          <short_desc>Crash with frame flattening on after r56854</short_desc>
          <delta_ts>2010-04-06 11:43:30 -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>Frames</component>
          <version>528+ (Nightly build)</version>
          <rep_platform>PC</rep_platform>
          <op_sys>OS X 10.5</op_sys>
          <bug_status>CLOSED</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>
          
          <blocked>35784</blocked>
          <everconfirmed>1</everconfirmed>
          <reporter name="Greg Bolsinga">bolsinga</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>ain</cc>
    
    <cc>beanoboy7</cc>
    
    <cc>ddkilzer</cc>
    
    <cc>deleted_user1</cc>
    
    <cc>drcarstens</cc>
    
    <cc>hausmann</cc>
    
    <cc>hyatt</cc>
    
    <cc>kenneth</cc>
    
    <cc>koivisto</cc>
    
    <cc>mcroft</cc>
    
    <cc>svetloslav</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>206614</commentid>
    <comment_count>0</comment_count>
    <who name="Greg Bolsinga">bolsinga</who>
    <bug_when>2010-03-31 11:49:31 -0700</bug_when>
    <thetext>Thread 0 Crashed:  Dispatch queue: com.apple.main-thread
0   com.apple.WebCore             	0x00000001011cd4c0 WebCore::Frame::ownerElement() const + 12 (Frame.cpp:1107)
1   com.apple.WebCore             	0x00000001011f6d6c WebCore::FrameView::avoidScrollbarCreation() + 36 (FrameView.cpp:334)
2   com.apple.WebCore             	0x00000001018101c4 WebCore::ScrollView::setHasHorizontalScrollbar(bool) + 38 (ScrollView.cpp:84)
3   com.apple.WebCore             	0x00000001011f9faf WebCore::FrameView::~FrameView() + 359 (FrameView.cpp:165)

m_frame is being destroyed here and is being accessed.

To reproduce apply the following patch, build WebKit debug and run Safari:

diff --git a/WebKit/mac/WebView/WebPreferences.mm b/WebKit/mac/WebView/WebPreferences.mm
index 84a6e9e..28f8f17 100644
--- a/WebKit/mac/WebView/WebPreferences.mm
+++ b/WebKit/mac/WebView/WebPreferences.mm
@@ -357,7 +357,7 @@ static WebCacheModel cacheModelForMainBundle(void)
         [NSNumber numberWithBool:NO],   WebKitWebGLEnabledPreferenceKey,
         [NSNumber numberWithBool:NO],   WebKitUsesProxiedOpenPanelPreferenceKey,
         [NSNumber numberWithUnsignedInt:4], WebKitPluginAllowedRunTimePreferenceKey,
-        [NSNumber numberWithBool:NO],   WebKitFrameFlatteningEnabledPreferenceKey,
+        [NSNumber numberWithBool:YES],   WebKitFrameFlatteningEnabledPreferenceKey,
         nil];
 
     // This value shouldn&apos;t ever change, which is assumed in the initialization of WebKitPDFDisplay</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>206619</commentid>
    <comment_count>1</comment_count>
    <who name="Greg Bolsinga">bolsinga</who>
    <bug_when>2010-03-31 11:52:46 -0700</bug_when>
    <thetext>See Bug 36798</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>206624</commentid>
    <comment_count>2</comment_count>
    <who name="Kenneth Rohde Christiansen">kenneth</who>
    <bug_when>2010-03-31 12:04:55 -0700</bug_when>
    <thetext>Could you try changing

void ScrollView::setHasVerticalScrollbar(bool hasBar)                                                            
{                                                                                                                
    if (avoidScrollbarCreation())                                                                                
        return;

to 

if (hasBar &amp;&amp; avoidScrollbarCreation())
    return;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>206626</commentid>
    <comment_count>3</comment_count>
    <who name="Greg Bolsinga">bolsinga</who>
    <bug_when>2010-03-31 12:08:46 -0700</bug_when>
    <thetext>I did that for both tests, and that prevents the crash.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>206632</commentid>
    <comment_count>4</comment_count>
    <who name="Kenneth Rohde Christiansen">kenneth</who>
    <bug_when>2010-03-31 12:17:53 -0700</bug_when>
    <thetext>Fix landed in r56856</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>208962</commentid>
    <comment_count>5</comment_count>
    <who name="Simon Hausmann">hausmann</who>
    <bug_when>2010-04-06 02:53:41 -0700</bug_when>
    <thetext>Revision r56856 cherry-picked into qtwebkit-2.0 with commit 59daec93fc7ad1f4c5dbeb88b67aca17d6f4cc3b</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>209141</commentid>
    <comment_count>6</comment_count>
    <who name="Alexey Proskuryakov">ap</who>
    <bug_when>2010-04-06 11:41:42 -0700</bug_when>
    <thetext>*** Bug 36928 has been marked as a duplicate of this bug. ***</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>209144</commentid>
    <comment_count>7</comment_count>
    <who name="Alexey Proskuryakov">ap</who>
    <bug_when>2010-04-06 11:42:49 -0700</bug_when>
    <thetext>*** Bug 36915 has been marked as a duplicate of this bug. ***</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>209146</commentid>
    <comment_count>8</comment_count>
    <who name="Alexey Proskuryakov">ap</who>
    <bug_when>2010-04-06 11:42:52 -0700</bug_when>
    <thetext>*** Bug 36914 has been marked as a duplicate of this bug. ***</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>209148</commentid>
    <comment_count>9</comment_count>
    <who name="Alexey Proskuryakov">ap</who>
    <bug_when>2010-04-06 11:42:56 -0700</bug_when>
    <thetext>*** Bug 36913 has been marked as a duplicate of this bug. ***</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>209150</commentid>
    <comment_count>10</comment_count>
    <who name="Alexey Proskuryakov">ap</who>
    <bug_when>2010-04-06 11:42:59 -0700</bug_when>
    <thetext>*** Bug 36969 has been marked as a duplicate of this bug. ***</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>209152</commentid>
    <comment_count>11</comment_count>
    <who name="Alexey Proskuryakov">ap</who>
    <bug_when>2010-04-06 11:43:08 -0700</bug_when>
    <thetext>*** Bug 36927 has been marked as a duplicate of this bug. ***</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>209154</commentid>
    <comment_count>12</comment_count>
    <who name="Alexey Proskuryakov">ap</who>
    <bug_when>2010-04-06 11:43:18 -0700</bug_when>
    <thetext>*** Bug 36922 has been marked as a duplicate of this bug. ***</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>209157</commentid>
    <comment_count>13</comment_count>
    <who name="Alexey Proskuryakov">ap</who>
    <bug_when>2010-04-06 11:43:30 -0700</bug_when>
    <thetext>*** Bug 36920 has been marked as a duplicate of this bug. ***</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>