IOS + AIR SDK 15 + Robotlegs 2.2.1 : error during instanciation Framework

tonic's Avatar

tonic

23 Sep, 2014 09:16 AM

Hi,

I work on mobile application using Flex SDK 4.13 with Air SDK 15, and Robotlegs 2.2.1.

When I test application on IOS, there is a error throw by Robotlegs during instanciation (debug mode on device), and the framework not working after that.

This is the stack trace :

[code]
TypeError: Error #2007: Parameter listener must be non-null.
at flash.events::EventDispatcher/removeEventListener()
at Function/<anonymous>()[/Users/shaun/dev/projects/robotlegs/robotlegs-framework/src/robotlegs/bender/framework/impl/Lifecycle.as:405]
at Function/<anonymous>()
at flash.events::EventDispatcher/dispatchEvent()
at robotlegs.bender.framework.impl::Lifecycle/dispatchEvent()[/Users/shaun/dev/projects/robotlegs/robotlegs-framework/src/robotlegs/bender/framework/impl/Lifecycle.as:309]
at robotlegs.bender.framework.impl::LifecycleTransition/dispatch()[/Users/shaun/dev/projects/robotlegs/robotlegs-framework/src/robotlegs/bender/framework/impl/LifecycleTransition.as:212]
at Function/<anonymous>()[/Users/shaun/dev/projects/robotlegs/robotlegs-framework/src/robotlegs/bender/framework/impl/LifecycleTransition.as:177]
at Function/<anonymous>()
at global/robotlegs.bender.framework.impl::safelyCallBack()[/Users/shaun/dev/projects/robotlegs/robotlegs-framework/src/robotlegs/bender/framework/impl/safelyCallBack.as:43]
at MessageRunner/next()[/Users/shaun/dev/projects/robotlegs/robotlegs-framework/src/robotlegs/bender/framework/impl/MessageDispatcher.as:187]
at MessageRunner/run()[/Users/shaun/dev/projects/robotlegs/robotlegs-framework/src/robotlegs/bender/framework/impl/MessageDispatcher.as:135]
at robotlegs.bender.framework.impl::MessageDispatcher/dispatchMessage()[/Users/shaun/dev/projects/robotlegs/robotlegs-framework/src/robotlegs/bender/framework/impl/MessageDispatcher.as:87]
at robotlegs.bender.framework.impl::LifecycleTransition/enter()[/Users/shaun/dev/projects/robotlegs/robotlegs-framework/src/robotlegs/bender/framework/impl/LifecycleTransition.as:191]
at robotlegs.bender.framework.impl::Lifecycle/initialize()[/Users/shaun/dev/projects/robotlegs/robotlegs-framework/src/robotlegs/bender/framework/impl/Lifecycle.as:149]
at robotlegs.bender.framework.impl::Context/initialize()[/Users/shaun/dev/projects/robotlegs/robotlegs-framework/src/robotlegs/bender/framework/impl/Context.as:159]
at robotlegs.bender.framework.impl::Context/initialize()
at robotlegs.bender.extensions.contextView::StageSyncExtension/initializeContext()[/Users/shaun/dev/projects/robotlegs/robotlegs-framework/src/robotlegs/bender/extensions/contextView/StageSyncExtension.as:84]
at robotlegs.bender.extensions.contextView::StageSyncExtension/onAddedToStage()[/Users/shaun/dev/projects/robotlegs/robotlegs-framework/src/robotlegs/bender/extensions/contextView/StageSyncExtension.as:78]
at robotlegs.bender.extensions.contextView::StageSyncExtension/onAddedToStage()
at flash.display::DisplayObjectContainer/addChildAt()
at mx.managers::SystemManager/preloader_preloaderDoneHandler()[/Users/aharui/release4.13.0/frameworks/projects/framework/src/mx/managers/SystemManager.as:2672]
at mx.managers::SystemManager/preloader_preloaderDoneHandler()
at mx.preloaders::Preloader/displayClassCompleteHandler()[/Users/aharui/release4.13.0/frameworks/projects/framework/src/mx/preloaders/Preloader.as:612]
at mx.preloaders::Preloader/displayClassCompleteHandler()
at spark.preloaders::SplashScreen/dispatchComplete()[/Users/aharui/release4.13.0/frameworks/projects/mobilecomponents/src/spark/preloaders/SplashScreen.as:553]
at spark.preloaders::SplashScreen/preloader_initCompleteHandler()[/Users/aharui/release4.13.0/frameworks/projects/mobilecomponents/src/spark/preloaders/SplashScreen.as:522]
at spark.preloaders::SplashScreen/preloader_initCompleteHandler()
at mx.preloaders::Preloader/dispatchAppEndEvent()[/Users/aharui/release4.13.0/frameworks/projects/framework/src/mx/preloaders/Preloader.as:390]
at mx.preloaders::Preloader/appCreationCompleteHandler()[/Users/aharui/release4.13.0/frameworks/projects/framework/src/mx/preloaders/Preloader.as:620]
at mx.preloaders::Preloader/appCreationCompleteHandler()
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/set initialized()[/Users/aharui/release4.13.0/frameworks/projects/framework/src/mx/core/UIComponent.as:1839]
at mx.core::UIComponent/set initialized()
at mx.managers::LayoutManager/doPhasedInstantiation()[/Users/aharui/release4.13.0/frameworks/projects/framework/src/mx/managers/LayoutManager.as:850]
at mx.managers::LayoutManager/doPhasedInstantiationCallback()[/Users/aharui/release4.13.0/frameworks/projects/framework/src/mx/managers/LayoutManager.as:1188]
at mx.managers::LayoutManager/doPhasedInstantiationCallback()
[/code]

When I check the code on the framework on the line 405 :
[code]
private function createSyncLifecycleListener(handler:Function, once:Boolean = false):Function
{
// When and After handlers can not be asynchronous
if (handler.length > 1)
{
throw new LifecycleError(LifecycleError.SYNC_HANDLER_ARG_MISMATCH);
}

// A handler that accepts 1 argument is provided with the event type
if (handler.length == 1)
{
return function(event:LifecycleEvent):void {
once && IEventDispatcher(event.target)
.removeEventListener(event.type, arguments.callee);
handler(event.type);
};
}

// Or, just call the handler
return function(event:LifecycleEvent):void {
once && IEventDispatcher(event.target)
.removeEventListener(event.type, arguments.callee);
handler();
};
}
[/code]

It seems that 'arguments.callee' define the callback function is null.

Where come from 'arguments' property ?

The framework work well with Air SDK 14.0, error appears with Air SDK 15.0.

Thanks fro your help.

  1. 1 Posted by tonic on 23 Sep, 2014 09:45 AM

    tonic's Avatar

    [EDIT]
    I understand where come from 'arguments' property (the function caller), but the callee is null.

    http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/arguments.html#callee
    [/EDIT]

    Thanks for your help.

  2. 2 Posted by tonic on 23 Sep, 2014 12:39 PM

    tonic's Avatar

    Its seems that the problem is due to a problem in the new SDK Air 15.0, and build for IOS.

    I posted question in the adobe Air forum :

    https://forums.adobe.com/thread/1582880

    For the moment, I override a list of class in the Robotlegs forum to test 'arguments.callee' properties before remove listener.

  3. Support Staff 3 Posted by Ondina D.F. on 24 Sep, 2014 09:16 AM

    Ondina D.F.'s Avatar

    Hi Anthony,

    I've seen Govinda's response on Adobe's forum. It seems you'll have to wait for the next AIR SDK release. My guess is that the next release will be next month.
    Let us know whether the new SDK solves your issue or not.

    Ondina

  4. 4 Posted by tonic on 29 Oct, 2014 10:16 AM

    tonic's Avatar

    Hi everybody, just a message to see that the last Labs Air SDK solve this probem.

    http://labs.adobe.com/downloads/air.html

    Thanks for your help ;)

  5. Support Staff 5 Posted by Ondina D.F. on 29 Oct, 2014 11:41 AM

    Ondina D.F.'s Avatar

    There's nothing to thank us for. After all, we couldn't help you ( with a new AIR release) ;)

    Thanks for the feedback! It might help others who run into the same issue.

  6. Ondina D.F. closed this discussion on 29 Oct, 2014 11:41 AM.

Comments are currently closed for this discussion. You can start a new one.

Keyboard shortcuts

Generic

? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac