<?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>46770</bug_id>
          
          <creation_ts>2010-09-28 17:23:28 -0700</creation_ts>
          <short_desc>crash at lineBreakExistsAtPosition</short_desc>
          <delta_ts>2010-09-29 17:13:12 -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>HTML Editing</component>
          <version>528+ (Nightly build)</version>
          <rep_platform>All</rep_platform>
          <op_sys>OS X 10.5</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords>InRadar</keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Enrica Casucci">enrica</reporter>
          <assigned_to name="Enrica Casucci">enrica</assigned_to>
          <cc>rniwa</cc>
    
    <cc>tony</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>286656</commentid>
    <comment_count>0</comment_count>
    <who name="Enrica Casucci">enrica</who>
    <bug_when>2010-09-28 17:23:28 -0700</bug_when>
    <thetext>This bug has been reported by several people.
We don&apos;t have a repro case, but it seems related to typing in form controls.
Here is the stacktrace:


Exception Type:  EXC_BAD_ACCESS (SIGBUS)
Exception Codes: KERN_PROTECTION_FAILURE at 0x0000000000000004
Crashed Thread:  0

Thread 0 Crashed:
0   com.apple.WebCore             	0x9282476d WebCore::lineBreakExistsAtPosition(WebCore::Position const&amp;) + 125
1   com.apple.WebCore             	0x928236c6 WebCore::InsertTextCommand::input(WebCore::String const&amp;, bool) + 294
2   com.apple.WebCore             	0x92822e8c WebCore::TypingCommand::insertTextRunWithoutNewlines(WebCore::String const&amp;, bool) + 140
3   com.apple.WebCore             	0x92822ddf WebCore::TypingCommand::insertText(WebCore::String const&amp;, bool) + 351
4   com.apple.WebCore             	0x928215c3 WebCore::TypingCommand::insertText(WebCore::Document*, WebCore::String const&amp;, WebCore::VisibleSelection const&amp;, bool, bool) + 659
5   com.apple.WebCore             	0x92820c78 WebCore::Editor::insertTextWithoutSendingTextEvent(WebCore::String const&amp;, bool, WebCore::Event*) + 1048
6   com.apple.WebCore             	0x92820835 WebCore::EventHandler::defaultTextInputEventHandler(WebCore::TextEvent*) + 197
7   com.apple.WebCore             	0x9263ddbb WebCore::Node::defaultEventHandler(WebCore::Event*) + 379
8   com.apple.WebCore             	0x927026b8 WebCore::HTMLInputElement::defaultEventHandler(WebCore::Event*) + 600
9   com.apple.WebCore             	0x9263d8f1 WebCore::Node::dispatchGenericEvent(WTF::PassRefPtr&lt;WebCore::Event&gt;) + 1297
10  com.apple.WebCore             	0x9263d2a1 WebCore::Node::dispatchEvent(WTF::PassRefPtr&lt;WebCore::Event&gt;, int&amp;) + 225
11  com.apple.WebCore             	0x928205ce WebCore::EventHandler::handleTextInputEvent(WebCore::String const&amp;, WebCore::Event*, bool, bool) + 238
12  com.apple.WebCore             	0x928204d9 WebCore::Editor::insertText(WebCore::String const&amp;, WebCore::Event*) + 57
13  com.apple.WebKit              	0x932588bd -[WebHTMLView(WebNSTextInputSupport) insertText:] + 1229
14  com.apple.WebKit              	0x9325830a -[WebHTMLView(WebInternal) _interceptEditingKeyEvent:shouldSaveCommand:] + 682
15  com.apple.WebKit              	0x93258b4c WebEditorClient::handleKeyboardEvent(WebCore::KeyboardEvent*) + 108
16  com.apple.WebCore             	0x9281fc99 WebCore::EventHandler::defaultKeyboardEventHandler(WebCore::KeyboardEvent*) + 217
17  com.apple.WebCore             	0x9263dcaa WebCore::Node::defaultEventHandler(WebCore::Event*) + 106
18  com.apple.WebCore             	0x927025f6 WebCore::HTMLInputElement::defaultEventHandler(WebCore::Event*) + 406
19  com.apple.WebCore             	0x9263d8f1 WebCore::Node::dispatchGenericEvent(WTF::PassRefPtr&lt;WebCore::Event&gt;) + 1297
20  com.apple.WebCore             	0x9263d2a1 WebCore::Node::dispatchEvent(WTF::PassRefPtr&lt;WebCore::Event&gt;, int&amp;) + 225
21  com.apple.WebCore             	0x9281f3f3 WebCore::EventHandler::keyEvent(WebCore::PlatformKeyboardEvent const&amp;) + 1827
22  com.apple.WebCore             	0x9281d068 WebCore::EventHandler::keyEvent(NSEvent*) + 296
23  com.apple.WebKit              	0x93257ebd -[WebHTMLView keyDown:] + 269</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>286659</commentid>
    <comment_count>1</comment_count>
      <attachid>69141</attachid>
    <who name="Enrica Casucci">enrica</who>
    <bug_when>2010-09-28 17:27:17 -0700</bug_when>
    <thetext>Created attachment 69141
Patch</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>286662</commentid>
    <comment_count>2</comment_count>
      <attachid>69141</attachid>
    <who name="Darin Adler">darin</who>
    <bug_when>2010-09-28 17:29:55 -0700</bug_when>
    <thetext>Comment on attachment 69141
Patch

Normally we require a test for any bug fix. I am saying review+ on this even without a test, but it seems that given you understanding of the cause you could construct a test.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>287032</commentid>
    <comment_count>3</comment_count>
    <who name="Enrica Casucci">enrica</who>
    <bug_when>2010-09-29 11:48:39 -0700</bug_when>
    <thetext>(In reply to comment #2)
&gt; (From update of attachment 69141 [details])
&gt; Normally we require a test for any bug fix. I am saying review+ on this even without a test, but it seems that given you understanding of the cause you could construct a test.

I still want to spend some more time trying to create a test. What makes me feel comfortable landing this patch without a test, is the fact that this is the only case of dereferencing of a render object that is performed without checking for null that I could find in Webcore.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>287041</commentid>
    <comment_count>4</comment_count>
    <who name="Tony Chang">tony</who>
    <bug_when>2010-09-29 12:00:23 -0700</bug_when>
    <thetext>If it helps, many of the crash dumps in Chromium have http://www.netflix.com/WiHome as the crashing URL.

The chromium crash report is here: http://code.google.com/p/chromium/issues/detail?id=29253

Ryosuke also suspects that this null check is all that we need to do, but a repro would still be nice.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>287045</commentid>
    <comment_count>5</comment_count>
    <who name="Ryosuke Niwa">rniwa</who>
    <bug_when>2010-09-29 12:06:42 -0700</bug_when>
    <thetext>(In reply to comment #4)
&gt; If it helps, many of the crash dumps in Chromium have http://www.netflix.com/WiHome as the crashing URL.
&gt; 
&gt; The chromium crash report is here: http://code.google.com/p/chromium/issues/detail?id=29253
&gt; 
&gt; Ryosuke also suspects that this null check is all that we need to do, but a repro would still be nice.

Oh yeah, I spent sometime investigating that bug and it&apos;s to do with input element.  I remembre it was hard to reproduce.  But every time I could reproduce, it was right after the page load.  I had to move back &amp; forth between pages to reproduce it.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>287049</commentid>
    <comment_count>6</comment_count>
    <who name="Enrica Casucci">enrica</who>
    <bug_when>2010-09-29 12:08:46 -0700</bug_when>
    <thetext>This is the only place I could find where we dereference the renderer without checking for null.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>287233</commentid>
    <comment_count>7</comment_count>
    <who name="Enrica Casucci">enrica</who>
    <bug_when>2010-09-29 17:13:12 -0700</bug_when>
    <thetext>Committed revision 68727.</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="1"
              isprivate="0"
          >
            <attachid>69141</attachid>
            <date>2010-09-28 17:27:17 -0700</date>
            <delta_ts>2010-09-28 17:29:55 -0700</delta_ts>
            <desc>Patch</desc>
            <filename>bug7028809.txt</filename>
            <type>text/plain</type>
            <size>1659</size>
            <attacher name="Enrica Casucci">enrica</attacher>
            
              <data encoding="base64">SW5kZXg6IFdlYkNvcmUvQ2hhbmdlTG9nCj09PT09PT09PT09PT09PT09PT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dFBvc2l0aW9uKTogQWRkZWQgY2hlY2sgdGhhdCB0aGUgcmVuZGVyZXIgaXMgbm90
IG51bGwKKyAgICAgICAgYmVmb3JlIGRlcmVmZXJlbmNpbmcgaXQuCisKIDIwMTAtMDktMjggIE1p
aGFpIFBhcnBhcml0YSAgPG1paGFpcEBjaHJvbWl1bS5vcmc+CiAKICAgICAgICAgUmV2aWV3ZWQg
YnkgRGltaXRyaSBHbGF6a292LgpJbmRleDogV2ViQ29yZS9lZGl0aW5nL2h0bWxlZGl0aW5nLmNw
cAo9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09
PT09PT09PT09PT09Ci0tLSBXZWJDb3JlL2VkaXRpbmcvaHRtbGVkaXRpbmcuY3BwCShyZXZpc2lv
biA2ODU0NykKKysrIFdlYkNvcmUvZWRpdGluZy9odG1sZWRpdGluZy5jcHAJKHdvcmtpbmcgY29w
eSkKQEAgLTEwNjksNiArMTA2OSw5IEBAIGJvb2wgbGluZUJyZWFrRXhpc3RzQXRQb3NpdGlvbihj
b25zdCBQb3MKICAgICBpZiAocG9zaXRpb24uYW5jaG9yTm9kZSgpLT5oYXNUYWdOYW1lKGJyVGFn
KSAmJiBwb3NpdGlvbi5hdEZpcnN0RWRpdGluZ1Bvc2l0aW9uRm9yTm9kZSgpKQogICAgICAgICBy
ZXR1cm4gdHJ1ZTsKICAgICAKKyAgICBpZiAoIXBvc2l0aW9uLmFuY2hvck5vZGUoKS0+cmVuZGVy
ZXIoKSkKKyAgICAgICAgcmV0dXJuIGZhbHNlOworICAgIAogICAgIGlmICghcG9zaXRpb24uYW5j
aG9yTm9kZSgpLT5pc1RleHROb2RlKCkgfHwgIXBvc2l0aW9uLmFuY2hvck5vZGUoKS0+cmVuZGVy
ZXIoKS0+c3R5bGUoKS0+cHJlc2VydmVOZXdsaW5lKCkpCiAgICAgICAgIHJldHVybiBmYWxzZTsK
ICAgICAK
</data>
<flag name="review"
          id="58776"
          type_id="1"
          status="+"
          setter="darin"
    />
          </attachment>
      

    </bug>

</bugzilla>