Uploaded image for project: 'Apache Flex'
  1. Apache Flex
  2. FLEX-34756

Squiggly RTE when working on a damaged textFlow

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: Squiggly 1.1, Apache Flex 4.14.1
    • Fix Version/s: Apache Flex 4.15.0
    • Component/s: Squiggly
    • Labels:
      None

      Description

      Steps to reproduce:

      1. Run the attached project
      2. Click the "bullet" button

      Error details:
      [Fault] exception, information=TypeError: Error #1009: Cannot access a property or method of a null object reference.
      at com.adobe.linguistics.spelling.framework.ui::SparkHighlighter/drawSquigglyLineForRange()[C:\Users\evolverine\workspace\flex-utilities\Squiggly\main\SpellingFramework\src\com\adobe\linguistics\spelling\framework\ui\SparkHighlighter.as:152]
      at com.adobe.linguistics.spelling.framework.ui::SparkHighlighter/squiggleWord()[C:\Users\evolverine\workspace\flex-utilities\Squiggly\main\SpellingFramework\src\com\adobe\linguistics\spelling\framework\ui\SparkHighlighter.as:130]
      at com.adobe.linguistics.spelling.framework.ui::SparkHighlighter/drawSquiggleAt()[C:\Users\evolverine\workspace\flex-utilities\Squiggly\main\SpellingFramework\src\com\adobe\linguistics\spelling\framework\ui\SparkHighlighter.as:78]
      at com.adobe.linguistics.spelling::SpellUI/spellCheckRange()[C:\Users\evolverine\workspace\flex-utilities\Squiggly\main\SpellingUIEx\src\com\adobe\linguistics\spelling\SpellUI.as:395]
      at com.adobe.linguistics.spelling::SpellUI/doSpellingJob()[C:\Users\evolverine\workspace\flex-utilities\Squiggly\main\SpellingUIEx\src\com\adobe\linguistics\spelling\SpellUI.as:353]
      at com.adobe.linguistics.spelling::SpellUI/handleFocusIn()[C:\Users\evolverine\workspace\flex-utilities\Squiggly\main\SpellingUIEx\src\com\adobe\linguistics\spelling\SpellUI.as:336]
      at flash.display::Stage/set focus()
      at mx.core::UIComponent/setFocus()[C:\Jenkins\workspace\flex-sdk_release-candidate\frameworks\projects\framework\src\mx\core\UIComponent.as:10437]
      at spark.components::RichEditableText/setFocus()[C:\Jenkins\workspace\flex-sdk_release-candidate\frameworks\projects\spark\src\spark\components\RichEditableText.as:3122]
      at Test/bullet_clickHandler()[C:\Users\evolverine\Adobe Flash Builder 4.7\FLEX-34756\src\Test.mxml:59]
      at Test/__bullet_click()[C:\Users\evolverine\Adobe Flash Builder 4.7\FLEX-34756\src\Test.mxml:106]

      Logical summary:

      • squiggly is set to spell check when the focus returns to a text field (see SpellUI.handleFocusIn())
      • after making changes to the text, the RichEditableText's textFlow is damaged and has to be recomposed. This normally happens in the next frame, when RichEditableText.updateDisplayList calls _textContainerManager.updateContainer().
      • BUT if we set focus on the RichEditableText after the text change, squiggly does the spell checking on the damaged textFlow.
      • because of this, it's offered bad indexes in SpellUI.getValidFirstWordIndex() and SpellUI.getValidLastWordIndex(), thus checking on non-existing text.

        Attachments

        1. FLEX-34756.ZIP
          247 kB
          Mihai Chira

          Activity

            People

            • Assignee:
              evolverine Mihai Chira
              Reporter:
              evolverine Mihai Chira
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: