[ https://issues.apache.org/jira/browse/FLEX-33349?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13553994#comment-13553994 ]
João Sérgio Nobre Saleiro commented on FLEX-33349: -------------------------------------------------- The more I dig, the weirder it gets. I was able (I think) to avoid the RTE, but I don't really understand why and most importantly, the cause. Also, while the null error is happening in List.as, I'm now not really sure if this is related to Spark Datagrid. When the error happens, "this" points to "global", and nothing on the stack trace tells me which instance created updateCompleteListenerA - so it might not be the Datagrid. Here's how I was able to avoid the RTE: a) As I said above, ending the itemEditor session makes the parent component show a popup. The error happens the second time the popup shows. b) Knowing this, I put a breakpoint before the showing the popup, for the second time c) When the code reaches: PopUpManager.addPopUp(autoFillTransactionConfirmationView, this, true); , the error happens d) autoFillTransactionConfirmationView is created on the first run, and reused on the second run. So I've tried NOT reusing it. In other words, on the second run, and creating a new instance of autoFillTransactionConfirmationView e) guess what: no error! To make things even more confusing... before "fixing" the code, I've discovered something that doesn't make any sense at all: if, on the second change, I edit any other itemEditor that triggers the popup (that reuses the instance of autoFillTransactionConfirmationView), the error doesn't happen. It only happens when I edit the same itemEditor twice! While I think the above workaround is working, I'm not 100% comfortable with not understanding what's happening here... My brain hurts... > 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