Skip navigation
Currently Being Moderated

In Flex Mobile Release Build arguments.callee cause crash

Jun 26, 2012 7:53 AM

Tags: #crash_on_startup #blank_screen #air_sdk #release_build

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?

 
Replies

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