[ https://issues.apache.org/jira/browse/FLEX-34934?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15012201#comment-15012201 ]
Harbs commented on FLEX-34934: ------------------------------ I'm not sure how you got this error, but here's a simple way of producing a similar error: <?xml version="1.0" encoding="utf-8"?> <s:WindowedApplication xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:s="library://ns.adobe.com/flex/spark" xmlns:mx="library://ns.adobe.com/flex/mx" initialize="init(event)"> <fx:Script> <![CDATA[ import mx.events.FlexEvent; private var win:NativeWindow; private var timer:Timer; protected function init(event:FlexEvent):void { win = new NativeWindow(new NativeWindowInitOptions()); win.close(); var pt:Point = win.minSize; trace(pt.x); timer = new Timer(1000); timer.addEventListener(TimerEvent.TIMER,onTimer); timer.start(); } private function onTimer(ev:Event):void{ var pt:Point = win.minSize; trace(pt.x); win = new NativeWindow(new NativeWindowInitOptions()); win.close(); } ]]> </fx:Script> <mx:Text text="hi ya'all!"/> </s:WindowedApplication> As you can see, the problem is simply accessing the minSize. To properly fix this issue, there should be a check for win.closed. I'm not sure how the point could be null. > Spark Window - Closed Window > ---------------------------- > > Key: FLEX-34934 > URL: https://issues.apache.org/jira/browse/FLEX-34934 > Project: Apache Flex > Issue Type: Bug > Components: Spark: Window > Affects Versions: Apache Flex 4.10.0, Apache Flex 4.11.0, Apache Flex > 4.12.0, Apache Flex 4.13.0, Apache Flex 4.12.1, Apache Flex 4.14.0, Apache > Flex 4.14.1 > Environment: Adobe AIR. Open Window and before creation complete move > the window. Then crash. > Reporter: Robbyn Gerhardt > Labels: spark, window > Fix For: Apache Flex 4.15.0 > > > Error: Error #3200: Cannot perform operation on closed window. > at Error$/throwError() > at flash.display::NativeWindow/get minSize() > at spark.components::Window/get > minWidth()[/Users/aharui/release4.13.0/frameworks/projects/airspark/src/spark/components/Window.as:903] > at spark.components::Window/set > width()[/Users/aharui/release4.13.0/frameworks/projects/airspark/src/spark/components/Window.as:1018] > at > mx.binding::Binding/defaultDestFunc()[/Users/aharui/release4.13.0/frameworks/projects/framework/src/mx/binding/Binding.as:305] > at Function/http://adobe.com/AS3/2006/builtin::call() > at > mx.binding::Binding/innerExecute()[/Users/aharui/release4.13.0/frameworks/projects/framework/src/mx/binding/Binding.as:513] > at Function/http://adobe.com/AS3/2006/builtin::apply() > at > mx.binding::Binding/wrapFunctionCall()[/Users/aharui/release4.13.0/frameworks/projects/framework/src/mx/binding/Binding.as:418] > at > mx.binding::Binding/execute()[/Users/aharui/release4.13.0/frameworks/projects/framework/src/mx/binding/Binding.as:356] > at > mx.binding::Binding/watcherFired()[/Users/aharui/release4.13.0/frameworks/projects/framework/src/mx/binding/Binding.as:541] > at > mx.binding::Watcher/notifyListeners()[/Users/aharui/release4.13.0/frameworks/projects/framework/src/mx/binding/Watcher.as:319] > at > mx.binding::PropertyWatcher/eventHandler()[/Users/aharui/release4.13.0/frameworks/projects/framework/src/mx/binding/PropertyWatcher.as:385] > at flash.events::EventDispatcher/dispatchEventFunction() > at flash.events::EventDispatcher/dispatchEvent() > at > mx.core::UIComponent/dispatchEvent()[/Users/aharui/release4.13.0/frameworks/projects/framework/src/mx/core/UIComponent.as:13682] > at > mx.core::UIComponent/setActualSize()[/Users/aharui/release4.13.0/frameworks/projects/framework/src/mx/core/UIComponent.as:10236] > at > spark.components::Application/updateBounds()[/Users/aharui/release4.13.0/frameworks/projects/spark/src/spark/components/Application.as:2167] > at > spark.components::Application/resizeHandler()[/Users/aharui/release4.13.0/frameworks/projects/spark/src/spark/components/Application.as:2070] > at flash.events::EventDispatcher/dispatchEventFunction() > at flash.events::EventDispatcher/dispatchEvent() > at > mx.managers::SystemManager/Stage_resizeHandler()[/Users/aharui/release4.13.0/frameworks/projects/framework/src/mx/managers/SystemManager.as:3235] > at flash.display::Stage/set stageWidth() > at > spark.components::WindowedApplication/commitProperties()[/Users/aharui/release4.13.0/frameworks/projects/airspark/src/spark/components/WindowedApplication.as:1747] > at > mx.core::UIComponent/validateProperties()[/Users/aharui/release4.13.0/frameworks/projects/framework/src/mx/core/UIComponent.as:8751] > at > mx.managers::LayoutManager/validateProperties()[/Users/aharui/release4.13.0/frameworks/projects/framework/src/mx/managers/LayoutManager.as:605] > at > mx.managers::LayoutManager/doPhasedInstantiation()[/Users/aharui/release4.13.0/frameworks/projects/framework/src/mx/managers/LayoutManager.as:821] > at > mx.managers::LayoutManager/doPhasedInstantiationCallback()[/Users/aharui/release4.13.0/frameworks/projects/framework/src/mx/managers/LayoutManager.as:1188] -- This message was sent by Atlassian JIRA (v6.3.4#6332)