1 Reply Latest reply on May 31, 2012 3:18 PM by GrendelDeveloper

    Scroller causing crash (Error #1009)

    GrendelDeveloper Level 1

      Ok, this is an odd error which I'm guessing is a flex bug:


      TypeError: Error #1009: Cannot access a property or method of a null object reference.

          at flashx.textLayout.container::ContainerController/getScrollDelta()

          at flashx.textLayout.container::TextContainerManager/getScrollDelta()

          at spark.components::RichEditableText/getVerticalScrollPositionDelta()

          at spark.components::VScrollBar/http://www.adobe.com/2006/flex/mx/internal::mouseWheelHandler()

          at flash.events::EventDispatcher/dispatchEventFunction()

          at flash.events::EventDispatcher/dispatchEvent()

          at mx.managers::SystemManager/mouseWheelHandler()


      I get this error when I paste text into a text area that has Squiggly enabled.  When you paste text, you get an extra carriage return at the end regardless if your originally highlighted text had one.  I have found that if the text you are pasting is exactly the right length to fill your text area vertically WITHOUT activating the scroller, but the carriage return at the end (a byproduct of pasting) causes the length of your pasted text to truly go beyond the boundaries of the scoller (thereby activating the vertical scroller), then this causes the flash player to timeout.  If you hit continue on the debugger you get the 1009 error above. 


      HOWEVER, if you have a single line more, then this is no longer an issue.  It seems to only be an issue if the pasted text's carriage return "activates" the scroller. 


      You can also reproduce this by pasting text that is one line less than mentioned above, complete with carriage return that is one line shy of causing the vertical scroller.  Then go to the top of the text and hit ENTER to force the pasted carriage return to activate the scroller.  It seems to only be an issue with the carriage return caused by pasting.  Reproducing this by hitting ENTER doesn't seem to cause the same issue. 


      Any thoughts?