1 Reply Latest reply on Sep 7, 2011 9:58 PM by Flex harUI

    RichEditableText throws runtime error, then stops working

    daperson0

      I have a rather snazzy chat program that works virutally all the time.

      However, sometimes, usually when the chat window is scaled very small, the RichEditableText component being used for input produces this stack trace:

      TypeError: Error #1009: Cannot access a property or method of a null object reference.
              at flashx.textLayout.container::ContainerController/mouseDownHandler()[C:\Vellum\branches\v2 \2.0\dev\output\openSource\textLayout\src\flashx\textLayout\container\ContainerController. as:2066]
              at flashx.textLayout.container::TextContainerManager/mouseDownHandler()[C:\Vellum\branches\v 2\2.0\dev\output\openSource\textLayout\src\flashx\textLayout\container\TextContainerManage r.as:1939]
              at spark.components.supportClasses::RichEditableTextContainerManager/mouseDownHandler()[E:\d ev\4.5.1\frameworks\projects\spark\src\spark\components\supportClasses\RichEditableTextCon tainerManage$
              at flashx.textLayout.container::ContainerController/http://ns.adobe.com/textLayout/internal/2008::requiredMouseDownHandler()[C:\Vellum\branche s\v2\2.0\dev\output\openSource\textLayout\src\flashx$
              at flash.events::EventDispatcher/dispatchEventFunction()
              at flash.events::EventDispatcher/dispatchEvent()
              at mx.managers::SystemManager/mouseEventHandler()[E:\dev\4.5.1\frameworks\projects\framework \src\mx\managers\SystemManager.as:2924]

      Sometimes, also, it produces this one:

      TypeError: Error #1009: Cannot access a property or method of a null object reference.
              at flashx.textLayout.edit::ElementRange$/createElementRange()[C:\Vellum\branches\v2\2.0\dev\ output\openSource\textLayout\src\flashx\textLayout\edit\ElementRange.as:351]
              at spark.components.supportClasses::RichEditableTextContainerManager/http://www.adobe.com/2006/flex/mx/internal::getCommonParagraphFormat()[E:\dev\4.5.1\framew orks\projects\spark\src\spark\compo$
              at spark.components::RichEditableText/getFormatOfRange()[E:\dev\4.5.1\frameworks\projects\sp ark\src\spark\components\RichEditableText.as:3456]
              at spark.components::TextArea/getFormatOfRange()[E:\dev\4.5.1\frameworks\projects\spark\src\ spark\components\TextArea.as:672]
              at CustomEditor/editor_selectionChangeHandler()[/home/chris/Flex/Flex3/ES5 Client/src/CustomEditor.mxml:29]
              at CustomEditor/__editor_selectionChange()[/home/chris/Flex/Flex3/ES5 Client/src/CustomEditor.mxml:160]
              at flash.events::EventDispatcher/dispatchEventFunction()
              at flash.events::EventDispatcher/dispatchEvent()
              at mx.core::UIComponent/dispatchEvent()[E:\dev\4.5.1\frameworks\projects\framework\src\mx\co re\UIComponent.as:13128]
              at spark.components.supportClasses::SkinnableTextBase/textDisplay_selectionChangeHandler()[E :\dev\4.5.1\frameworks\projects\spark\src\spark\components\supportClasses\SkinnableTextBas e.as:2245]
              at flash.events::EventDispatcher/dispatchEventFunction()
              at flash.events::EventDispatcher/dispatchEvent()
              at mx.core::UIComponent/dispatchEvent()[E:\dev\4.5.1\frameworks\projects\framework\src\mx\co re\UIComponent.as:13128]
              at spark.components::RichEditableText/textContainerManager_selectionChangeHandler()[E:\dev\4 .5.1\frameworks\projects\spark\src\spark\components\RichEditableText.as:4626]
              at flash.events::EventDispatcher/dispatchEventFunction()
              at flash.events::EventDispatcher/dispatchEvent()
              at flashx.textLayout.container::TextContainerManager/dispatchEvent()[C:\Vellum\branches\v2\2 .0\dev\output\openSource\textLayout\src\flashx\textLayout\container\TextContainerManager.a s:1553]
              at flash.events::EventDispatcher/dispatchEventFunction()
              at flash.events::EventDispatcher/dispatchEvent()
              at flashx.textLayout.elements::TextFlow/dispatchEvent()[C:\Vellum\branches\v2\2.0\dev\output \openSource\textLayout\src\flashx\textLayout\elements\TextFlow.as:859]
              at flashx.textLayout.edit::SelectionManager/http://ns.adobe.com/textLayout/internal/2008::selectionChanged()[C:\Vellum\branches\v2\2.0 \dev\output\openSource\textLayout\src\flashx\textLayout\edit$
              at flashx.textLayout.edit::EditManager/http://ns.adobe.com/textLayout/internal/2008::selectionChanged()[C:\Vellum\branches\v2\2.0 \dev\output\openSource\textLayout\src\flashx\textLayout\edit\Edit$
              at flashx.textLayout.edit::SelectionManager/selectRange()[C:\Vellum\branches\v2\2.0\dev\outp ut\openSource\textLayout\src\flashx\textLayout\edit\SelectionManager.as:600]
              at flashx.textLayout.edit::SelectionManager/http://ns.adobe.com/textLayout/internal/2008::setNewSelectionPoint()[C:\Vellum\branches\v2 \2.0\dev\output\openSource\textLayout\src\flashx\textLayout\$
              at flashx.textLayout.edit::SelectionManager/http://ns.adobe.com/textLayout/internal/2008::handleMouseEventForSelection()[C:\Vellum\bra nches\v2\2.0\dev\output\openSource\textLayout\src\flashx\tex$
              at flashx.textLayout.edit::SelectionManager/mouseDownHandler()[C:\Vellum\branches\v2\2.0\dev \output\openSource\textLayout\src\flashx\textLayout\edit\SelectionManager.as:1256]
              at flashx.textLayout.edit::EditManager/mouseDownHandler()[C:\Vellum\branches\v2\2.0\dev\outp ut\openSource\textLayout\src\flashx\textLayout\edit\EditManager.as:478]
              at flashx.textLayout.container::ContainerController/mouseDownHandler()[C:\Vellum\branches\v2 \2.0\dev\output\openSource\textLayout\src\flashx\textLayout\container\ContainerController. as:2063]
              at flashx.textLayout.container::TextContainerManager/mouseDownHandler()[C:\Vellum\branches\v 2\2.0\dev\output\openSource\textLayout\src\flashx\textLayout\container\TextContainerManage r.as:1939]
              at spark.components.supportClasses::RichEditableTextContainerManager/mouseDownHandler()[E:\d ev\4.5.1\frameworks\projects\spark\src\spark\components\supportClasses\RichEditableTextCon tainerManage$
              at flashx.textLayout.container::ContainerController/http://ns.adobe.com/textLayout/internal/2008::requiredMouseDownHandler()[C:\Vellum\branche s\v2\2.0\dev\output\openSource\textLayout\src\flashx$
              at flash.events::EventDispatcher/dispatchEventFunction()
              at flash.events::EventDispatcher/dispatchEvent()
              at mx.managers::SystemManager/mouseEventHandler()[E:\dev\4.5.1\frameworks\projects\framework \src\mx\managers\SystemManager.as:2924]

       

      I am at a loss. This looks like the Flex 4.5 SDK itself is to blame.

       

      Ideas?