Skip to main content
paleozogt
Participating Frequently
Jul 21, 2011 3:47 PM UTC
Question

valid AS3 will crash iPhone app on startup

Steps to reproduce:

1. Add this code to a Flex Mobile Project:

        public class Foo extends EventDispatcher {
             public override function addEventListener(type:String,  listener:Function, useCapture:Boolean=false, priority:int=0,  useWeakReference:Boolean=false):void {
                 var thisFunc:Function= arguments.callee;
                 super.addEventListener(type, listener, useCapture, priority, useWeakReference);
             }
         }

2. Refer to the class Foo somewhere in the application, for example the creation complete handler of MainHomeView.mxml:

        protected function view1_creationCompleteHandler(event:FlexEvent):void {
             var foo:Foo;
         }

3. Debug this on an iOS device using the 'Standard' packaging method.  Also, you could export a Release build for iOS.

When the iOS app launches, it will crash before running any code  written by the programmer-- just the *presence* of this code in the app  causes it to crash (!).  I'm attaching a crash log.

I've filed a bug for this here: https://bugs.adobe.com/jira/browse/FB-32130

This topic is closed to new replies. Start a new post to keep the conversation going.

5 replies

Participating Frequently
Jul 22, 2011 12:42 PM UTC

Hi,

Thanks for reporting the bug. Could you tell us the runtime version you are trying the code with?

Regards,

Sanika

Translate
paleozogt
paleozogtAuthor
Participating Frequently
Jul 22, 2011 4:04 PM UTC

Since its packaged for iOS, there is no runtime per se.  It's built with AirSDK 2.7 and/or Flash Builder 4.5.1, so whatever runtime those use.

Translate
Inspiring
Jun 24, 2012 4:52 PM UTC

Hi,

im using Flash Builder 4.6  in a mobile project.

Hhis cause a crash, can't see  nothing than the splash screen:

public static function getInstance():ApplicationData {

            if (!ApplicationData.instance){

                ApplicationData.instance = new ApplicationData(arguments.callee);

            }           

            return ApplicationData.instance;

}

private var applicationData:ApplicationData = ApplicationData.getInstance();

Is there any solution?

Thanks

Translate