feathersui-starling icon indicating copy to clipboard operation
feathersui-starling copied to clipboard

Error #1009 on Scroller/focusOutHandler

Open cgascons opened this issue 3 years ago • 2 comments

Hi, we are getting quite a few of these. This is the stack trace we were able to track from our players:

TypeError: Error #1009
at feathers.controls::Scroller/focusOutHandler()
at starling.events::EventDispatcher/invokeEvent()
at starling.events::EventDispatcher/dispatchEvent()
at starling.display::DisplayObject/dispatchEvent()
at starling.events::EventDispatcher/dispatchEventWith()
at feathers.core::DefaultFocusManager/set focus()
at feathers.core::DefaultFocusManager/topLevelContainer_touchHandler()
at starling.events::EventDispatcher/invokeEvent()
at starling.events::TouchEvent/dispatch()
at starling.events::Touch/dispatchEvent()
at starling.events::TouchProcessor/processTouches()
at starling.events::TouchProcessor/advanceTime()
at starling.core::Starling/advanceTime()
at starling.core::Starling/nextFrame()
at starling.core::Starling/onEnterFrame()

I'm not quite sure on how to replicate it, according to your code, Scroller's focusOutHandler function is quite simple and I believe only the fact that the player doesn't have a valid Stage would be able to cause this issue, right? Is there any way a safe check can be added here to avoid this issue?

cgascons avatar Jan 07 '21 09:01 cgascons

While you could add a check if the stage is null, it means that those listeners will not be removed. Luckily, I added those listeners as a weak reference, so it shouldn't cause a memory leak. Still, it's concerning. What you describe should not happen.

joshtynjala avatar Jan 07 '21 17:01 joshtynjala

I understand, it's definitely weird. This started happening since I last updated Feathers to the latest version, the previous version I had was: 3.1.2, I know, it was quite old so I took the chance and updated both Starling and Feathers to their latest versions.

cgascons avatar Jan 08 '21 09:01 cgascons