<?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>25751</bug_id>
          
          <creation_ts>2009-05-13 10:10:39 -0700</creation_ts>
          <short_desc>REGRESSION: Gmail popups cause an assertion failure and crash</short_desc>
          <delta_ts>2009-06-26 11:27:32 -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>Layout and Rendering</component>
          <version>528+ (Nightly build)</version>
          <rep_platform>All</rep_platform>
          <op_sys>All</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>WORKSFORME</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords>InRadar, NeedsReduction, Regression</keywords>
          <priority>P1</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Brett Wilson (Google)">brettw</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>beidson</cc>
    
    <cc>darin</cc>
    
    <cc>ddkilzer</cc>
    
    <cc>mrowe</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>121050</commentid>
    <comment_count>0</comment_count>
    <who name="Brett Wilson (Google)">brettw</who>
    <bug_when>2009-05-13 10:10:39 -0700</bug_when>
    <thetext>I reproed this in my own debug build of WebKit on Mac inside Safari. I originally noticed this in Chromium about a week ago.

Go to Gmail in a debug build. Click on &quot;Move To&quot; or &quot;Labels.&quot; You will get an assertion failure. &quot;More actions&quot; doesn&apos;t have the problem, presumably because it&apos;s more simple (the other two have a scrolling element and an input).

Stack:

WebCore::RenderTextControl::setSelectionRange(int start=0, int end=0)  Line 251

WebCore::RenderTextControl::select()  Line 230

WebCore::HTMLInputElement::select()  Line 507

WebCore::InputElement::updateFocusAppearance(WebCore::InputElementData &amp; data={...}, WebCore::Document * document=0x04105000, bool restorePreviousSelection=true)  Line 103

WebCore::HTMLInputElement::updateFocusAppearance(bool restorePreviousSelection=true)  Line 165

WebCore::Element::focus(bool restorePreviousSelection=true)  Line 1188

WebCore::ElementInternal::focusCallback(const v8::Arguments &amp; args={...})  Line 353


If I step past this assertion, I get a null pointer dereference and it crashes.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>121056</commentid>
    <comment_count>1</comment_count>
    <who name="Brett Wilson (Google)">brettw</who>
    <bug_when>2009-05-13 10:23:47 -0700</bug_when>
    <thetext>Satck on Mac in Safari (custom trunk build):

#0  0x03ba2c11 in WebCore::RenderTextControl::setSelectionRange (this=0x20518f3c, start=0, end=0) at /Users/brettw/wk/WebCore/rendering/RenderTextControl.cpp:251
#1  0x03ba2e35 in WebCore::RenderTextControl::select (this=0x20518f3c) at /Users/brettw/wk/WebCore/rendering/RenderTextControl.cpp:230
#2  0x037e8ba8 in WebCore::HTMLInputElement::select (this=0x201c1470) at /Users/brettw/wk/WebCore/html/HTMLInputElement.cpp:506
#3  0x03878e04 in WebCore::InputElement::updateFocusAppearance (data=@0x201c14b8, document=0x75ef400, restorePreviousSelection=true) at /Users/brettw/wk/WebCore/dom/InputElement.cpp:103
#4  0x037e8f9e in WebCore::HTMLInputElement::updateFocusAppearance (this=0x201c1470, restorePreviousSelection=true) at /Users/brettw/wk/WebCore/html/HTMLInputElement.cpp:165
#5  0x0372a563 in WebCore::Element::focus (this=0x201c1470, restorePreviousSelection=true) at /Users/brettw/wk/WebCore/dom/Element.cpp:1158
#6  0x038fd581 in WebCore::jsElementPrototypeFunctionFocus (exec=0x1be5473c, thisValue={m_ptr = 0x203b3160}, args=@0xbfffd828) at /Users/brettw/wk/WebKitBuild/Debug/DerivedSources/WebCore/JSElement.cpp:564
#7  0x1bdf320f in ?? ()</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>121059</commentid>
    <comment_count>2</comment_count>
    <who name="Brady Eidson">beidson</who>
    <bug_when>2009-05-13 10:32:12 -0700</bug_when>
    <thetext>&lt;rdar://problem/6883877&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>121072</commentid>
    <comment_count>3</comment_count>
    <who name="Brady Eidson">beidson</who>
    <bug_when>2009-05-13 12:33:31 -0700</bug_when>
    <thetext>The assertion has been around forever.  Running a Debug build of WebKit from *last* May, the ASSERT still fires in this case.

However, I&apos;m not seeing the case where after the ASSERT there&apos;s a crash.  It seems that this code handles null startPosition or endPosition.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>121073</commentid>
    <comment_count>4</comment_count>
    <who name="Brady Eidson">beidson</who>
    <bug_when>2009-05-13 12:35:42 -0700</bug_when>
    <thetext>&quot;If I step past this assertion, I get a null pointer dereference and it crashes.&quot;

Can you give more details on this?  I cannot reproduce.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>121074</commentid>
    <comment_count>5</comment_count>
    <who name="Brett Wilson (Google)">brettw</who>
    <bug_when>2009-05-13 12:39:12 -0700</bug_when>
    <thetext>This is the stack to the NULL pointer dereference. I commented out the assert and ran this in Safari on Mac.

Program received signal:  “EXC_BAD_ACCESS”.
(gdb) bt
#0  0x03a94625 in WebCore::Node::shadowAncestorNode (this=0x0) at /Users/brettw/wk/WebCore/dom/Node.cpp:1340
#1  0x03ba2c99 in WebCore::RenderTextControl::setSelectionRange (this=0x1d3d0ebc, start=0, end=0) at /Users/brettw/wk/WebCore/rendering/RenderTextControl.cpp:252
#2  0x03ba2e7b in WebCore::RenderTextControl::select (this=0x1d3d0ebc) at /Users/brettw/wk/WebCore/rendering/RenderTextControl.cpp:230
#3  0x037e8c68 in WebCore::HTMLInputElement::select (this=0x1e1e9790) at /Users/brettw/wk/WebCore/html/HTMLInputElement.cpp:506
#4  0x03878ec4 in WebCore::InputElement::updateFocusAppearance (data=@0x1e1e97d8, document=0x71db400, restorePreviousSelection=true) at /Users/brettw/wk/WebCore/dom/InputElement.cpp:103
#5  0x037e905e in WebCore::HTMLInputElement::updateFocusAppearance (this=0x1e1e9790, restorePreviousSelection=true) at /Users/brettw/wk/WebCore/html/HTMLInputElement.cpp:165
#6  0x0372a623 in WebCore::Element::focus (this=0x1e1e9790, restorePreviousSelection=true) at /Users/brettw/wk/WebCore/dom/Element.cpp:1158
</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>121075</commentid>
    <comment_count>6</comment_count>
    <who name="Brady Eidson">beidson</who>
    <bug_when>2009-05-13 12:42:15 -0700</bug_when>
    <thetext>That null deref is simply in the next assertion on the next line, and those two assertions are logically connected.  I was under the impression you found a null deref downstream unrelated to these assertions - have you?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>121076</commentid>
    <comment_count>7</comment_count>
    <who name="Brett Wilson (Google)">brettw</who>
    <bug_when>2009-05-13 12:44:25 -0700</bug_when>
    <thetext>Ah, sorry I missed that. There&apos;s no other crash except inside the assertions.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>123870</commentid>
    <comment_count>8</comment_count>
    <who name="Dimitri Glazkov (Google)">dglazkov</who>
    <bug_when>2009-06-01 12:24:55 -0700</bug_when>
    <thetext>Corresponding Chromium bug is http://crbug.com/12908</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>128526</commentid>
    <comment_count>9</comment_count>
    <who name="Ojan Vafai">ojan</who>
    <bug_when>2009-06-26 11:27:32 -0700</bug_when>
    <thetext>We no longer hit an assert in a ToT build. I don&apos;t know if the problem was fixed or if gmail changed. In either case, we can no longer reproduce this. Is worksforme the right resolution?</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>