<?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>114952</bug_id>
          
          <creation_ts>2013-04-22 05:43:28 -0700</creation_ts>
          <short_desc>[BlackBerry] Invalid assert in InputHandler::requestCheckingOfString()</short_desc>
          <delta_ts>2013-04-23 12:11: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>WebKit BlackBerry</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="Carlos Garcia Campos">cgarcia</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>commit-queue</cc>
    
    <cc>nghanavatian</cc>
    
    <cc>rwlbuis</cc>
    
    <cc>xan.lopez</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>879102</commentid>
    <comment_count>0</comment_count>
    <who name="Carlos Garcia Campos">cgarcia</who>
    <bug_when>2013-04-22 05:43:28 -0700</bug_when>
    <thetext>It produces this crash running some layout tests like editing/pasteboard/19644-1.html

Program terminated with signal 11, Segmentation fault.
#0  0x7a19e988 in BlackBerry::WebKit::InputHandler::requestCheckingOfString (this=0x80b4470, spellCheckRequest=...)
    at /home/cgarcia/rim/webkit/Source/WebKit/blackberry/WebKitSupport/InputHandler.cpp:634
634	        ASSERT(spellCheckRequest-&gt;data().processType() == TextCheckingProcessIncremental);
(gdb) bt
#0  0x7a19e988 in BlackBerry::WebKit::InputHandler::requestCheckingOfString (this=0x80b4470, spellCheckRequest=...)
    at /home/cgarcia/rim/webkit/Source/WebKit/blackberry/WebKitSupport/InputHandler.cpp:634
#1  0x7a1637b6 in WebCore::EditorClientBlackBerry::requestCheckingOfString (this=0x80d1488, textCheckingRequest=...)
    at /home/cgarcia/rim/webkit/Source/WebKit/blackberry/WebCoreSupport/EditorClientBlackBerry.cpp:585
#2  0x7c9a8e5e in WebCore::SpellChecker::invokeRequest (this=0x80d3e20, request=...) at /home/cgarcia/rim/webkit/Source/WebCore/editing/SpellChecker.cpp:187
#3  0x7c9a8d94 in WebCore::SpellChecker::requestCheckingFor (this=0x80d3e20, request=...) at /home/cgarcia/rim/webkit/Source/WebCore/editing/SpellChecker.cpp:178
#4  0x7c96fda4 in WebCore::Editor::replaceSelectionWithFragment (this=0x811f7dc, fragment=..., selectReplacement=false, smartReplace=false, matchStyle=false)
    at /home/cgarcia/rim/webkit/Source/WebCore/editing/Editor.cpp:485
#5  0x7c96ee4a in WebCore::Editor::handleTextEvent (this=0x811f7dc, event=0x99cdb48) at /home/cgarcia/rim/webkit/Source/WebCore/editing/Editor.cpp:230
#6  0x7cd315de in WebCore::EventHandler::defaultTextInputEventHandler (this=0x811f928, event=0x99cdb48) at /home/cgarcia/rim/webkit/Source/WebCore/page/EventHandler.cpp:3635
#7  0x7c8e8e68 in WebCore::Node::defaultEventHandler (this=0x99c90e0, event=0x99cdb48) at /home/cgarcia/rim/webkit/Source/WebCore/dom/Node.cpp:2491
#8  0x7c8b625e in WebCore::EventDispatcher::dispatchEventPostProcess (this=0x7cfe960, preDispatchEventHandlerResult=0x0)
    at /home/cgarcia/rim/webkit/Source/WebCore/dom/EventDispatcher.cpp:210
#9  0x7c8b57e8 in WebCore::EventDispatcher::dispatch (this=0x7cfe960) at /home/cgarcia/rim/webkit/Source/WebCore/dom/EventDispatcher.cpp:127
#10 0x7c8b4c8e in WebCore::EventDispatchMediator::dispatchEvent (this=0x99c5b78, dispatcher=0x7cfe960) at /home/cgarcia/rim/webkit/Source/WebCore/dom/EventDispatchMediator.cpp:54
#11 0x7c8b4f84 in WebCore::EventDispatcher::dispatchEvent (node=0x99c90e0, mediator=...) at /home/cgarcia/rim/webkit/Source/WebCore/dom/EventDispatcher.cpp:56
#12 0x7c8e80c6 in WebCore::Node::dispatchEvent (this=0x99c90e0, event=...) at /home/cgarcia/rim/webkit/Source/WebCore/dom/Node.cpp:2344
#13 0x7c8c118a in WebCore::EventTarget::dispatchEvent (this=0x99c90e0, event=..., ec=@0x7cfea8c: 0) at /home/cgarcia/rim/webkit/Source/WebCore/dom/EventTarget.cpp:147
#14 0x7c96f7b0 in WebCore::Editor::pasteAsFragment (this=0x811f7dc, pastingFragment=..., smartReplace=false, matchStyle=false)
    at /home/cgarcia/rim/webkit/Source/WebCore/editing/Editor.cpp:418
#15 0x7c96f9f8 in WebCore::Editor::pasteWithPasteboard (this=0x811f7dc, pasteboard=0x99c5950, allowPlainText=true) at /home/cgarcia/rim/webkit/Source/WebCore/editing/Editor.cpp:440
#16 0x7c97242c in WebCore::Editor::paste (this=0x811f7dc) at /home/cgarcia/rim/webkit/Source/WebCore/editing/Editor.cpp:1093
#17 0x7c980ecc in WebCore::executePaste (frame=0x811f3b0, source=WebCore::CommandFromDOM) at /home/cgarcia/rim/webkit/Source/WebCore/editing/EditorCommand.cpp:919
#18 0x7c98298e in WebCore::Editor::Command::execute (this=0x7cfeb74, parameter=..., triggeringEvent=0x0) at /home/cgarcia/rim/webkit/Source/WebCore/editing/EditorCommand.cpp:1727
#19 0x7c8472fc in WebCore::Document::execCommand (this=0x827b3e8, commandName=..., userInterface=false, value=...) at /home/cgarcia/rim/webkit/Source/WebCore/dom/Document.cpp:4262
#20 0x7d47ca04 in WebCore::jsDocumentPrototypeFunctionExecCommand (exec=0x83000e8) at /home/cgarcia/rim/webkit/WebKitBuild/armle-v7/Debug/DerivedSources/WebCore/JSDocument.cpp:2629

There&apos;s a comment in there:

// Batch requests which are generally created by us on focus, should not exceed this limit. Check that this is in fact of Incremental type.

As the comment says, batch requests are generally created on input field focus, but not only. The Editor also creates Batch requests when replacing selection with pasted text and the pasted text can be longer than the spell checker limit, as it&apos;s happening with this layout test.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>879103</commentid>
    <comment_count>1</comment_count>
      <attachid>199019</attachid>
    <who name="Carlos Garcia Campos">cgarcia</who>
    <bug_when>2013-04-22 05:47:49 -0700</bug_when>
    <thetext>Created attachment 199019
Patch

Simply remove the assert and the comment since it would be even more confusing without the assert.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>879980</commentid>
    <comment_count>2</comment_count>
    <who name="Nima Ghanavatian">nghanavatian</who>
    <bug_when>2013-04-23 11:00:46 -0700</bug_when>
    <thetext>sounds okay to me =)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>880057</commentid>
    <comment_count>3</comment_count>
      <attachid>199019</attachid>
    <who name="Rob Buis">rwlbuis</who>
    <bug_when>2013-04-23 11:44:38 -0700</bug_when>
    <thetext>Comment on attachment 199019
Patch

Ok.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>880065</commentid>
    <comment_count>4</comment_count>
      <attachid>199019</attachid>
    <who name="WebKit Commit Bot">commit-queue</who>
    <bug_when>2013-04-23 12:11:25 -0700</bug_when>
    <thetext>Comment on attachment 199019
Patch

Clearing flags on attachment: 199019

Committed r148978: &lt;http://trac.webkit.org/changeset/148978&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>880066</commentid>
    <comment_count>5</comment_count>
    <who name="WebKit Commit Bot">commit-queue</who>
    <bug_when>2013-04-23 12:11:30 -0700</bug_when>
    <thetext>All reviewed patches have been landed.  Closing bug.</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="1"
              isprivate="0"
          >
            <attachid>199019</attachid>
            <date>2013-04-22 05:47:49 -0700</date>
            <delta_ts>2013-04-23 12:11:25 -0700</delta_ts>
            <desc>Patch</desc>
            <filename>bb-invalid-assert-spellchecker.diff</filename>
            <type>text/plain</type>
            <size>1878</size>
            <attacher name="Carlos Garcia Campos">cgarcia</attacher>
            
              <data encoding="base64">ZGlmZiAtLWdpdCBhL1NvdXJjZS9XZWJLaXQvYmxhY2tiZXJyeS9DaGFuZ2VMb2cgYi9Tb3VyY2Uv
V2ViS2l0L2JsYWNrYmVycnkvQ2hhbmdlTG9nCmluZGV4IGFiYzM2ZDUuLmM3NDZkN2UgMTAwNjQ0
Ci0tLSBhL1NvdXJjZS9XZWJLaXQvYmxhY2tiZXJyeS9DaGFuZ2VMb2cKKysrIGIvU291cmNlL1dl
YktpdC9ibGFja2JlcnJ5L0NoYW5nZUxvZwpAQCAtMSwzICsxLDE4IEBACisyMDEzLTA0LTIyICBD
YXJsb3MgR2FyY2lhIENhbXBvcyAgPGNnYXJjaWFAaWdhbGlhLmNvbT4KKworICAgICAgICBbQmxh
Y2tCZXJyeV0gSW52YWxpZCBhc3NlcnQgaW4gSW5wdXRIYW5kbGVyOjpyZXF1ZXN0Q2hlY2tpbmdP
ZlN0cmluZygpCisgICAgICAgIGh0dHBzOi8vYnVncy53ZWJraXQub3JnL3Nob3dfYnVnLmNnaT9p
ZD0xMTQ5NTIKKworICAgICAgICBSZXZpZXdlZCBieSBOT0JPRFkgKE9PUFMhKS4KKworICAgICAg
ICBEbyBub3QgYXNzdW1lIHRoYXQgQmF0Y2ggcmVxdWVzdHMgYXJlIG9ubHkgY3JlYXRlZCB3aGUg
aW5wdXQgZmllbGQKKyAgICAgICAgaXMgZm9jdXNlZCwgdGhlIEVkaXRvciBjYW4gYWxzbyBjcmVh
dGUgQmF0Y2ggcmVxdWVzdHMgd2hlbiBwYXN0aW5nCisgICAgICAgIGEgc2VsZWN0aW9uLgorCisg
ICAgICAgICogV2ViS2l0U3VwcG9ydC9JbnB1dEhhbmRsZXIuY3BwOgorIC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