Skip to main content
Inspiring
June 26, 2012
Question

In Flex Mobile Release Build arguments.callee cause crash

  • June 26, 2012
  • 13 replies
  • 2463 views

This is my code in a simpler way:

In my main MXML:

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

My AppData Class

package {

    public class AppData {

        private static var instance:AppData;

        public function AppData(caller:Function) {

            super();

            if (caller != AppData.getInstance)

                throw new Error("This class is a Singleton and can not be instantiated: Use the .getInstance() method!!");

        }

        public static function getInstance():AppData {

            if (!instance)

                instance = new AppData(arguments.callee);

            return instance;

        }

    }

}

arguments.callee cause a crash in the Release Build (just stop to splash screen), not in the Debug Version.

It is possible to log this kind of error?

This topic has been closed for replies.

13 replies

chris.campbell
Legend
June 26, 2012

Are you getting a crash or is the app hanging at the splash screen?  Can you run this under ADL from the command line to see if an exception is being thrown?

Inspiring
June 27, 2012

Hi Chris,

the app hanging at the splash screen!

I don't know the sintax for run under ADL from command line.

I can try if u tell me. Im using a Mac.

Thanks a lot.

June 27, 2012

Hi Matt,

A similar issue was encountered with the 3.3 beta 2 build, which is fixed in the AIR 3.3 GM. Can you just check the AIR SDK version you are using. You can check the adt version using the following command from your Flex SDK directory:

bin/adt -version