History | Log In     View a printable version of the current page.  
Issue Details (XML | Word | Printable)

Key: PSL-286
Type: Bug Bug
Status: Closed Closed
Resolution: Duplicate
Priority: Major Major
Assignee: Jens Halm
Reporter: Jim
Votes: 0
Watchers: 1
Operations

If you were logged in you would be able to see more operations.
Parsley - Spicelib

Cannot reopen window containing a module

Created: 17/Nov/09 06:34 PM   Updated: 09/Jun/10 09:13 AM
Component/s: Parsley Flex Support
Affects Version/s: 2.1.0
Fix Version/s: 2.1.1

Environment:
Flash Builder 4 beta 2 buiding an AIR project
Mac OS 10.6.2
Parsley flex 2.1
Issue Links:
Duplicate
 


 Description  « Hide
Summary:
Opening a window containing a module, closing the window, and then reopening the window results in an exception. I do not know that this is a bug in Parsley. It could be a developer bug. Feel free to evaluate whether this project is a good example project to show off parsley: I couldn't find many examples of this sort and would like to share this.

Files:

Project file is at this location:
git clone git://github.com/jpravetz/f4b-examples.git

Steps:

The example test-shell is my bare bones example of using Parsley 2.1 with Flash Builder 4 (FB4). There are three modules loaded. I am having trouble with the third module, which is loaded into a window.
1. Build and launch test-shell
2. (optional) Type some messages. These send out an event that everyone monitors.
3. Click 'Open Module3 Window'
4. Close window
5. Click 'Open Module3 Window'

Result:

An exception, with the following stack trace:

Error: One or more errors processing CompositeContextBuilder:
 Error processing [object ActionScriptObjectDefinitionBuilder]: One or more errors in ActionScriptObjectDefinitionBuilder:
 One or more errors processing test.module3::Module3Context:
 Error building object definition for [Property _Module3Context_Module3PanelPM1 in class test.module3::Module3Context]: Error #1009: Cannot access a property or method of a null object reference.
at org.spicefactory.parsley.core.builder.impl::DefaultCompositeContextBuilder/handleErrors()[I:\Spicefactory\Parsley\parsley-core\org\spicefactory\parsley\core\builder\impl\DefaultCompositeContextBuilder.as:210]
at org.spicefactory.parsley.core.builder.impl::DefaultCompositeContextBuilder/invokeNextBuilder()[I:\Spicefactory\Parsley\parsley-core\org\spicefactory\parsley\core\builder\impl\DefaultCompositeContextBuilder.as:170]
at org.spicefactory.parsley.core.builder.impl::DefaultCompositeContextBuilder/invokeNextBuilder()[I:\Spicefactory\Parsley\parsley-core\org\spicefactory\parsley\core\builder\impl\DefaultCompositeContextBuilder.as:199]
at org.spicefactory.parsley.core.builder.impl::DefaultCompositeContextBuilder/build()[I:\Spicefactory\Parsley\parsley-core\org\spicefactory\parsley\core\builder\impl\DefaultCompositeContextBuilder.as:159]
at org.spicefactory.parsley.flex::FlexContextBuilder$/buildAll()[I:\Spicefactory\Parsley\parsley-flex\org\spicefactory\parsley\flex\FlexContextBuilder.as:77]
at org.spicefactory.parsley.flex::FlexContextBuilder$/build()[I:\Spicefactory\Parsley\parsley-flex\org\spicefactory\parsley\flex\FlexContextBuilder.as:59]
at test.module3::Module3Module/___Module3Module_Module1_preinitialize()[/Users/jpravetz/dev/epdoc/f4b-examples/test-shell/src/test/module3/Module3Module.mxml:10]
at flash.events::EventDispatcher/dispatchEventFunction()
at flash.events::EventDispatcher/dispatchEvent()
at mx.core::UIComponent/dispatchEvent()[E:\dev\gumbo_beta2\frameworks\projects\framework\src\mx\core\UIComponent.as:11749]
at mx.core::UIComponent/initialize()[E:\dev\gumbo_beta2\frameworks\projects\framework\src\mx\core\UIComponent.as:6871]
at mx.core::Container/initialize()[E:\dev\gumbo_beta2\frameworks\projects\framework\src\mx\core\Container.as:3090]
at test.module3::Module3Module/initialize()
at mx.core::UIComponent/http://www.adobe.com/2006/flex/mx/internal::childAdded()[E:\dev\gumbo_beta2\frameworks\projects\framework\src\mx\core\UIComponent.as:6766]
at mx.core::Container/http://www.adobe.com/2006/flex/mx/internal::childAdded()[E:\dev\gumbo_beta2\frameworks\projects\framework\src\mx\core\Container.as:3915]
at mx.core::Container/addChildAt()[E:\dev\gumbo_beta2\frameworks\projects\framework\src\mx\core\Container.as:2578]
at mx.core::Container/addChild()[E:\dev\gumbo_beta2\frameworks\projects\framework\src\mx\core\Container.as:2496]
at mx.modules::ModuleLoader/moduleReadyHandler()[E:\dev\gumbo_beta2\frameworks\projects\framework\src\mx\modules\ModuleLoader.as:430]
at flash.events::EventDispatcher/dispatchEventFunction()
at flash.events::EventDispatcher/dispatchEvent()
at ModuleInfoProxy/load()[E:\dev\gumbo_beta2\frameworks\projects\framework\src\mx\modules\ModuleManager.as:1111]
at Flex4ModuleInfoBase/load()[I:\Spicefactory\Parsley\parsley-flex\org\spicefactory\parsley\flex\modules\FlexModuleSupport.as:119]
at mx.modules::ModuleLoader/loadModule()[E:\dev\gumbo_beta2\frameworks\projects\framework\src\mx\modules\ModuleLoader.as:357]
at test.shell::Module3Window/init()[/Users/jpravetz/dev/epdoc/f4b-examples/test-shell/src/test/shell/Module3Window.mxml:16]
at test.shell::Module3Window/___Module3Window_Window1_creationComplete()[/Users/jpravetz/dev/epdoc/f4b-examples/test-shell/src/test/shell/Module3Window.mxml:6]
at flash.events::EventDispatcher/dispatchEventFunction()
at flash.events::EventDispatcher/dispatchEvent()
at mx.core::UIComponent/dispatchEvent()[E:\dev\gumbo_beta2\frameworks\projects\framework\src\mx\core\UIComponent.as:11749]
at mx.core::UIComponent/set initialized()[E:\dev\gumbo_beta2\frameworks\projects\framework\src\mx\core\UIComponent.as:1525]
at mx.managers::LayoutManager/doPhasedInstantiation()[E:\dev\gumbo_beta2\frameworks\projects\framework\src\mx\managers\LayoutManager.as:759]
at mx.managers::LayoutManager/doPhasedInstantiationCallback()[E:\dev\gumbo_beta2\frameworks\projects\framework\src\mx\managers\LayoutManager.as:1069]


 All   Comments   Change History      Sort Order:
Jim - 17/Nov/09 06:38 PM
If you don't want to use git, the http address is:
http://github.com/jpravetz/f4b-examples

Jens Halm - 17/Nov/09 07:29 PM
Thanks for the sample project. Will look into it soon, hopefully within this week.

Jim - 20/Nov/09 01:49 AM - edited
The project on github has been updated as follows, making it a better example project:
Moved global data from being in a singleton to being a managed IOC object.
Added logging.
Introduced a new problem: DataMonitor receives two messages when a message is dispatched. Not sure why? Oh, because I was adding DataMonitor to the context file and dispatching a configureIOC event (at least I think that's why).

The bug still remains with trying to reopen the window.

Jens Halm - 23/Nov/09 01:33 PM - edited
Duplicate of PSL-290.
As a temporary workaround (until the other issue is fixed) you can unload the module when the window gets closed. Reloading it should work fine then.