Skip navigation
RedBall23
Currently Being Moderated

Problem using LazyModuleLoadPolicy

Jun 6, 2011 12:46 AM

Hi,

 

I have problem using the LazyModuleLoadPolicy and ModuleMessageInterceptor.

In the context file I defined:

 

<module:LazyModuleLoadPolicyTag objectId="lazyLoadPolicy" type="{SendContactEvent}"/>
<module:ModuleMessageInterceptor type="{SendContactEvent}"/>
 

 

I am using a view stack with auto creation policy.

I dispatch SendContactEvent from module A and in module B I handle the event.

If I don't use the lazy loading everything works fine.

I'm getting the following exceptions:

Dispatch message '[Event type="none" bubbles=false cancelable=false eventPhase=2]' with 3 receiver(s)
Message Target threw Error 
Error: Attempt to call resume on MessageProcessor in illegal state: active
     at org.spicefactory.parsley.core.messaging.impl::DefaultMessageProcessor/illegalState()[/Users/jenshalm/Projects/SpicefactoryProduction/Parsley/parsley-core/org/spicefactory/parsley/core/messaging/impl/DefaultMessageProcessor.as:86]
     at org.spicefactory.parsley.core.messaging.impl::DefaultMessageProcessor/resume()[/Users/jenshalm/Projects/SpicefactoryProduction/Parsley/parsley-core/org/spicefactory/parsley/core/messaging/impl/DefaultMessageProcessor.as:111]
     at com.adobe.cairngorm.module::LazyModuleLoadPolicy/interceptModuleMessage()[C:\devhome\workspaces\Flex\Module\src\com\adobe\cairngorm\module\LazyModuleLoadPolicy.as:52]
     at Function/http://adobe.com/AS3/2006/builtin::apply()
     at org.spicefactory.lib.reflect::Method/invoke()[/Users/jenshalm/Projects/SpicefactoryProduction/Parsley/spicelib-reflect/org/spicefactory/lib/reflect/Method.as:87]
     at org.spicefactory.parsley.processor.messaging.receiver::AbstractMessageHandler/invokeMethod()[/Users/jenshalm/Projects/SpicefactoryProduction/Parsley/parsley-config/org/spicefactory/parsley/processor/messaging/receiver/AbstractMessageHandler.as:173]
     at org.spicefactory.parsley.processor.messaging.receiver::MessageHandler/handleMessage()[/Users/jenshalm/Projects/SpicefactoryProduction/Parsley/parsley-config/org/spicefactory/parsley/processor/messaging/receiver/MessageHandler.as:76]
     at org.spicefactory.parsley.core.messaging.impl::DefaultMessageProcessor/invokeTarget()[/Users/jenshalm/Projects/SpicefactoryProduction/Parsley/parsley-core/org/spicefactory/parsley/core/messaging/impl/DefaultMessageProcessor.as:228]
     at Processor/proceed()[/Users/jenshalm/Projects/SpicefactoryProduction/Parsley/parsley-core/org/spicefactory/parsley/core/messaging/impl/DefaultMessageProcessor.as:342]
     at org.spicefactory.parsley.core.messaging.impl::DefaultMessageProcessor/processReceivers()[/Users/jenshalm/Projects/SpicefactoryProduction/Parsley/parsley-core/org/spicefactory/parsley/core/messaging/impl/DefaultMessageProcessor.as:127]
     at org.spicefactory.parsley.core.messaging.impl::DefaultMessageProcessor/start()[/Users/jenshalm/Projects/SpicefactoryProduction/Parsley/parsley-core/org/spicefactory/parsley/core/messaging/impl/DefaultMessageProcessor.as:164]
     at org.spicefactory.parsley.core.messaging.impl::DefaultMessageRouter/dispatchMessage()[/Users/jenshalm/Projects/SpicefactoryProduction/Parsley/parsley-core/org/spicefactory/parsley/core/messaging/impl/DefaultMessageRouter.as:50]
     at org.spicefactory.parsley.core.scope.impl::DefaultScopeManager/doDispatchMessage()[/Users/jenshalm/Projects/SpicefactoryProduction/Parsley/parsley-core/org/spicefactory/parsley/core/scope/impl/DefaultScopeManager.as:199]
     at org.spicefactory.parsley.core.scope.impl::DefaultScopeManager/dispatchMessage()[/Users/jenshalm/Projects/SpicefactoryProduction/Parsley/parsley-core/org/spicefactory/parsley/core/scope/impl/DefaultScopeManager.as:178]
     at org.spicefactory.parsley.core.messaging.impl::MessageDispatcher/dispatchMessage()[/Users/jenshalm/Projects/SpicefactoryProduction/Parsley/parsley-core/org/spicefactory/parsley/core/messaging/impl/MessageDispatcher.as:54]
     at app::AppStartPM/navigateToGames()[C:\devhome\workspaces\Flex\ModulesTest\src\app\AppStartPM.as:17]
     at app::AppStart/__gamesButton_click()[C:\devhome\workspaces\Flex\ModulesTest\src\app\AppStart.mxml:59]
Select 0 out of 0 error handlers
Unhandled error - continue message processing
Message Target threw Error 
Error: Attempt to call resume on MessageProcessor in illegal state: active
     at org.spicefactory.parsley.core.messaging.impl::DefaultMessageProcessor/illegalState()[/Users/jenshalm/Projects/SpicefactoryProduction/Parsley/parsley-core/org/spicefactory/parsley/core/messaging/impl/DefaultMessageProcessor.as:86]
     at org.spicefactory.parsley.core.messaging.impl::DefaultMessageProcessor/resume()[/Users/jenshalm/Projects/SpicefactoryProduction/Parsley/parsley-core/org/spicefactory/parsley/core/messaging/impl/DefaultMessageProcessor.as:111]
     at com.adobe.cairngorm.module::ModuleMessageDispatcher/interceptModuleMessage()[C:\devhome\workspaces\Flex\Module\src\com\adobe\cairngorm\module\ModuleMessageDispatcher.as:80]
     at Function/http://adobe.com/AS3/2006/builtin::apply()
     at org.spicefactory.lib.reflect::Method/invoke()[/Users/jenshalm/Projects/SpicefactoryProduction/Parsley/spicelib-reflect/org/spicefactory/lib/reflect/Method.as:87]
     at org.spicefactory.parsley.processor.messaging.receiver::AbstractMessageHandler/invokeMethod()[/Users/jenshalm/Projects/SpicefactoryProduction/Parsley/parsley-config/org/spicefactory/parsley/processor/messaging/receiver/AbstractMessageHandler.as:173]
     at org.spicefactory.parsley.processor.messaging.receiver::MessageHandler/handleMessage()[/Users/jenshalm/Projects/SpicefactoryProduction/Parsley/parsley-config/org/spicefactory/parsley/processor/messaging/receiver/MessageHandler.as:76]
     at org.spicefactory.parsley.core.messaging.impl::DefaultMessageProcessor/invokeTarget()[/Users/jenshalm/Projects/SpicefactoryProduction/Parsley/parsley-core/org/spicefactory/parsley/core/messaging/impl/DefaultMessageProcessor.as:228]
     at Processor/proceed()[/Users/jenshalm/Projects/SpicefactoryProduction/Parsley/parsley-core/org/spicefactory/parsley/core/messaging/impl/DefaultMessageProcessor.as:342]
     at org.spicefactory.parsley.core.messaging.impl::DefaultMessageProcessor/processReceivers()[/Users/jenshalm/Projects/SpicefactoryProduction/Parsley/parsley-core/org/spicefactory/parsley/core/messaging/impl/DefaultMessageProcessor.as:127]
     at org.spicefactory.parsley.core.messaging.impl::DefaultMessageProcessor/start()[/Users/jenshalm/Projects/SpicefactoryProduction/Parsley/parsley-core/org/spicefactory/parsley/core/messaging/impl/DefaultMessageProcessor.as:164]
     at org.spicefactory.parsley.core.messaging.impl::DefaultMessageRouter/dispatchMessage()[/Users/jenshalm/Projects/SpicefactoryProduction/Parsley/parsley-core/org/spicefactory/parsley/core/messaging/impl/DefaultMessageRouter.as:50]
     at org.spicefactory.parsley.core.scope.impl::DefaultScopeManager/doDispatchMessage()[/Users/jenshalm/Projects/SpicefactoryProduction/Parsley/parsley-core/org/spicefactory/parsley/core/scope/impl/DefaultScopeManager.as:199]
     at org.spicefactory.parsley.core.scope.impl::DefaultScopeManager/dispatchMessage()[/Users/jenshalm/Projects/SpicefactoryProduction/Parsley/parsley-core/org/spicefactory/parsley/core/scope/impl/DefaultScopeManager.as:178]
     at org.spicefactory.parsley.core.messaging.impl::MessageDispatcher/dispatchMessage()[/Users/jenshalm/Projects/SpicefactoryProduction/Parsley/parsley-core/org/spicefactory/parsley/core/messaging/impl/MessageDispatcher.as:54]
     at app::AppStartPM/navigateToGames()[C:\devhome\workspaces\Flex\ModulesTest\src\app\AppStartPM.as:17]
     at app::AppStart/__gamesButton_click()[C:\devhome\workspaces\Flex\ModulesTest\src\app\AppStart.mxml:59]
Select 0 out of 0 error handlers

 

My lazy module loader defined as follows:

<?xml version="1.0" encoding="utf-8"?>
<mx:Canvas 
    xmlns:fx="http://ns.adobe.com/mxml/2009"
    xmlns:s="library://ns.adobe.com/flex/spark"
    xmlns:mx="library://ns.adobe.com/flex/mx"
    xmlns:module="com.adobe.cairngorm.module.*"
    xmlns:parsley="http://www.spicefactory.org/parsley"
    xmlns:local="*">
 
    <fx:Script>
        <![CDATA[
            import com.adobe.cairngorm.module.ILoadPolicy;
            import com.adobe.cairngorm.module.IModuleManager;
            import com.adobe.cairngorm.module.ModuleViewLoaderSkin;
           
               private var _moduleId:String;
                        private var _moduleManager:IModuleManager;
               private var _lazyLoadPolicy:ILoadPolicy;
 
               [Bindable]
               public function get moduleId():String
               {
                    return _moduleId;
               }
 
               public function set moduleId(value:String):void
               {
                    _moduleId = value;
               }
               
               [Bindable]
               public function get moduleManager():IModuleManager
               {
                    return _moduleManager;
               }
 
               public function set moduleManager(value:IModuleManager):void
               {
                    _moduleManager = value;
               }
 
               
               
               [Bindable]
               public function get lazyLoadPolicy():ILoadPolicy
               {
                    return _lazyLoadPolicy;
               }
               
               [Inject(id="lazyLoadPolicy")]
               public function set lazyLoadPolicy(value:ILoadPolicy):void
               {
                    _lazyLoadPolicy = value;
               }
               
        ]]>
    </fx:Script>
 
    <fx:Declarations>
        <parsley:Configure/>
    </fx:Declarations>
 
    <module:ModuleViewLoader id="moduleLoader"
        left="3" right="3" top="20" bottom="3"
        moduleId="{ moduleId }"
        moduleManager="{ moduleManager }"
        skinClass="com.adobe.cairngorm.module.ModuleViewLoaderSkin"
        visible="{this.visible}"
        loadPolicy="{ lazyLoadPolicy }"/>
</mx:Canvas>
 
 

 

Does anybody has an idea?

 

Thanks!

 
Replies
  • Currently Being Moderated
    Jun 9, 2011 3:46 AM   in reply to RedBall23

    I had the same problem when I used the lazy loading and couldn't solve it..

     

    help!

     
    |
    Mark as:
  • Currently Being Moderated
    Jun 15, 2011 3:44 PM   in reply to popoliton

    Hi guys,

     

    As mentionned in another thread it would really help if one of you could open a jira ticket with a sample application on our bug tracker:

     

    https://bugs.adobe.com/jira/browse/CGM

     

    I'll do what I can to have a look at it this week.

     

    Thx

     
    |
    Mark as:
  • Currently Being Moderated
    Jun 22, 2011 7:24 AM   in reply to RedBall23

    HI Assaf,

     

    We're having a look at the Jira issue, in the meantime please post the sample and description here and I'll create the bug myself.

     

    Thanks

     
    |
    Mark as:
  • Currently Being Moderated
    Jun 23, 2011 5:39 AM   in reply to RedBall23

    Can you PM me your account ID on JIRA, IT reported an issue lately with some account creation.

     
    |
    Mark as:

More Like This

  • Retrieving data ...

Bookmarked By (0)

Answers + Points = Status

  • 10 points awarded for Correct Answers
  • 5 points awarded for Helpful Answers
  • 10,000+ points
  • 1,001-10,000 points
  • 501-1,000 points
  • 5-500 points