[ https://issues.apache.org/jira/browse/FLEX-33349?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13554209#comment-13554209 ]
João Sérgio Nobre Saleiro commented on FLEX-33349: -------------------------------------------------- Ok, I have now plenty more information to update this issue. The List.as where the null error occurs is the ComboBox inside the itemEditor. So the scenario is the following: 1- A Spark Datagrid has an itemEditor 2- The itemEditor has an (editable) ComboBox binded to ArrayCollection "ac" 3- By default, the selectedItem of the Combobox is null 4- The user can choose an item of the ComboBox, or write a new String 5- When he focus out, the itemEditor calls the save() method that dispatches an event 6- The outside component catches the event, and checks if the user wrote a String. If he did, the String is converted to an Object 7- This new object is added to "ac", and ac.refresh() is explicitely called. 8- This new object is also assigned to the item that the Combobox selectedItem is binded to, so the ComboBox selectedItem also changes 9- The refresh on "ac" forces the call of dataProviderRefreshed() on List.as of the Combobox - but ONLY on the second change (still need to understand this one) 10- In the meantime, a modal popup might appear, asking some stuff to the user. When the modal opens, updateCompleteListenerA is called and that's where all hell breaks loose, due to dataGroup being null in dataGroup.removeEventListen[...] of List.as . In other words, it's a ComboBox inside an itemEditor that triggers a RTE when it's dataProvider is refreshed while a popup is shown for the second time with PopupManager. Weird stuff: a) If, in step 10, the modal DOESN'T reuse the same same instance (it's a new instance everytime addPopup is called), the error doesn't happen b) If, in step 10, I decide not to show the modal, the error can still happen by simply changing the currentState of a another component (it's a simple group with label) that has <transitions>. I'm still investigating and trying to understand this scenario. > TypeError #1009 happening in dataProviderRefreshed() of List.as after a call > to endItemEditorSession() in Spark Datagrid > ------------------------------------------------------------------------------------------------------------------------- > > Key: FLEX-33349 > URL: https://issues.apache.org/jira/browse/FLEX-33349 > Project: Apache Flex > Issue Type: Bug > Components: Spark: DataGrid > Affects Versions: Apache Flex 4.9.0 > Environment: All > Reporter: João Sérgio Nobre Saleiro > Labels: Datagrid, RTE, Spark, itemEditorSession, itemeditor, null > Attachments: transactions.txt > > Original Estimate: 3h > Remaining Estimate: 3h > > a) This RTE is quite hard to reproduce, and I wasn't able to build a simple > scenario to demonstrate it > b) It happens occasionally, in 20-30% of the tries > c) It happens after the user ends an itemEditorSession of a Spark ItemEditor > used in a Spark DataGrid. > d) It's a null error on line 1479 (dataProviderRefreshed) of List.as. > dataGroup is null when the function is called, causing the RTE. > The RTE follows below: > TypeError: Error #1009: Cannot access a property or method of a null object > reference. > at > Function/<anonymous>()[/Users/justinmclean/Documents/ApacheFlexSDK/frameworks/projects/spark/src/spark/components/List.as:1479] > at flash.events::EventDispatcher/dispatchEventFunction() > at flash.events::EventDispatcher/dispatchEvent() > at > mx.core::UIComponent/dispatchEvent()[/Users/justinmclean/Documents/ApacheFlexSDK/frameworks/projects/framework/src/mx/core/UIComponent.as:13160] > at > mx.managers::LayoutManager/doPhasedInstantiation()[/Users/justinmclean/Documents/ApacheFlexSDK/frameworks/projects/framework/src/mx/managers/LayoutManager.as:852] > at > mx.managers::LayoutManager/validateNow()[/Users/justinmclean/Documents/ApacheFlexSDK/frameworks/projects/framework/src/mx/managers/LayoutManager.as:886] > at > mx.core::UIComponent/commitCurrentState()[/Users/justinmclean/Documents/ApacheFlexSDK/frameworks/projects/framework/src/mx/core/UIComponent.as:10513] > at > mx.core::UIComponent/setCurrentState()[/Users/justinmclean/Documents/ApacheFlexSDK/frameworks/projects/framework/src/mx/core/UIComponent.as:10331] > at mx.core::UIComponent/set > currentState()[/Users/justinmclean/Documents/ApacheFlexSDK/frameworks/projects/framework/src/mx/core/UIComponent.as:6433] > at com.boonzi.desktop.core.view.components::BigTooltip/set > displayPopUp()[C:\webfuel\boonzi\trunk\boonzi-desktop\src\com\boonzi\desktop\core\view\components\BigTooltip.mxml:33] > at > mx.binding::Binding/defaultDestFunc()[/Users/justinmclean/Documents/ApacheFlexSDK/frameworks/projects/framework/src/mx/binding/Binding.as:290] > at Function/http://adobe.com/AS3/2006/builtin::call() > at > mx.binding::Binding/innerExecute()[/Users/justinmclean/Documents/ApacheFlexSDK/frameworks/projects/framework/src/mx/binding/Binding.as:493] > at Function/http://adobe.com/AS3/2006/builtin::apply() > at > mx.binding::Binding/wrapFunctionCall()[/Users/justinmclean/Documents/ApacheFlexSDK/frameworks/projects/framework/src/mx/binding/Binding.as:403] > at > mx.binding::Binding/execute()[/Users/justinmclean/Documents/ApacheFlexSDK/frameworks/projects/framework/src/mx/binding/Binding.as:341] > at > mx.binding::Binding/watcherFired()[/Users/justinmclean/Documents/ApacheFlexSDK/frameworks/projects/framework/src/mx/binding/Binding.as:519] > at > mx.binding::Watcher/notifyListeners()[/Users/justinmclean/Documents/ApacheFlexSDK/frameworks/projects/framework/src/mx/binding/Watcher.as:319] > at > mx.binding::PropertyWatcher/eventHandler()[/Users/justinmclean/Documents/ApacheFlexSDK/frameworks/projects/framework/src/mx/binding/PropertyWatcher.as:385] > at flash.events::EventDispatcher/dispatchEventFunction() > at flash.events::EventDispatcher/dispatchEvent() > at > com.boonzi.desktop.transactions.model::TransactionModel/dispatchEvent() > at com.boonzi.desktop.transactions.model::TransactionModel/set > numberOfCategorizedImportedTransactions() > at > com.boonzi.desktop.transactions.view::ImportStatementsView/tryToShowCategoryPopup()[C:\webfuel\boonzi\trunk\boonzi-desktop\src\com\boonzi\desktop\transactions\view\ImportStatementsView.as:1512] > at > com.boonzi.desktop.transactions.view::ImportStatementsView/setCategory()[C:\webfuel\boonzi\trunk\boonzi-desktop\src\com\boonzi\desktop\transactions\view\ImportStatementsView.as:729] > at Function/http://adobe.com/AS3/2006/builtin::apply() > at > org.swizframework.utils.event::EventHandler/handleEvent()[/Users/Chris/Documents/my_projects/swizframework-git/swiz-framework/src/org/swizframework/utils/event/EventHandler.as:124] > at flash.events::EventDispatcher/dispatchEventFunction() > at flash.events::EventDispatcher/dispatchEvent() > at > mx.core::UIComponent/dispatchEvent()[/Users/justinmclean/Documents/ApacheFlexSDK/frameworks/projects/framework/src/mx/core/UIComponent.as:13160] > at > com.boonzi.desktop.skins.mitra.datagrid::ImportStatementsCategoryEditor/save()[C:\webfuel\boonzi\trunk\boonzi-desktop\src\com\boonzi\desktop\skins\mitra\datagrid\ImportStatementsCategoryEditor.mxml:88] > at > com.boonzi.desktop.skins.mitra.datagrid::ImportStatementsCategoryEditor/griditemeditor1_focusOutHandler()[C:\webfuel\boonzi\trunk\boonzi-desktop\src\com\boonzi\desktop\skins\mitra\datagrid\ImportStatementsCategoryEditor.mxml:98] > at > com.boonzi.desktop.skins.mitra.datagrid::ImportStatementsCategoryEditor/___ImportStatementsCategoryEditor_GridItemEditor1_focusOut()[C:\webfuel\boonzi\trunk\boonzi-desktop\src\com\boonzi\desktop\skins\mitra\datagrid\ImportStatementsCategoryEditor.mxml:3] > at flash.display::Stage/set focus() > at > mx.core::UIComponent/setFocus()[/Users/justinmclean/Documents/ApacheFlexSDK/frameworks/projects/framework/src/mx/core/UIComponent.as:9913] > at > spark.components::DataGrid/setFocus()[/Users/justinmclean/Documents/ApacheFlexSDK/frameworks/projects/spark/src/spark/components/DataGrid.as:2354] > at > spark.components.gridClasses::DataGridEditor/http://www.adobe.com/2006/flex/mx/internal::destroyItemEditor()[/Users/justinmclean/Documents/ApacheFlexSDK/frameworks/projects/spark/src/spark/components/gridClasses/DataGridEditor.as:521] > at > spark.components.gridClasses::DataGridEditor/saveItemEditorSession()[/Users/justinmclean/Documents/ApacheFlexSDK/frameworks/projects/spark/src/spark/components/gridClasses/DataGridEditor.as:961] > at > spark.components.gridClasses::DataGridEditor/endEdit()[/Users/justinmclean/Documents/ApacheFlexSDK/frameworks/projects/spark/src/spark/components/gridClasses/DataGridEditor.as:923] > at > spark.components.gridClasses::DataGridEditor/endItemEditorSession()[/Users/justinmclean/Documents/ApacheFlexSDK/frameworks/projects/spark/src/spark/components/gridClasses/DataGridEditor.as:855] > at > spark.components::DataGrid/endItemEditorSession()[/Users/justinmclean/Documents/ApacheFlexSDK/frameworks/projects/spark/src/spark/components/DataGrid.as:3841] > at > spark.components.gridClasses::DataGridEditor/editor_keyFocusChangeHandler()[/Users/justinmclean/Documents/ApacheFlexSDK/frameworks/projects/spark/src/spark/components/gridClasses/DataGridEditor.as:1624] -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira