Flex+Air hangup when built as release

creynders's Avatar

creynders

29 Jan, 2013 01:01 PM

I've encountered a really weird bug with a project I'm working on.
It utilizes RL 1.5, Flex 4.5, Air 2.6 and everything works great when I export for debugging.
However when I export for release it hangs very early on in the bootstrapping sequence. Using Alerts I could pinpoint the location where it starts going wrong. I reduced my StartupCommand to absolute minimum:

override public function execute():void
{
        Alert.show( 'StartupCommand 1' );
        commandMap.execute( TestCommand );
        Alert.show( 'StartupCommand 2' );
}

The first Alert is shown, but the second not and the TestCommand (which consists of nothing else but an Alert) is not executed.
However, if I instantiate the TestCommand manually and call its execute method, then all 3 Alerts are shown.
I've also tried using macrobot, but the problem persists.

I'm stumped. I have no idea where to begin and since it's a release build, no error messages or traces appear.
Anybody else encounter this before?

  1. Support Staff 1 Posted by Ondina D.F. on 29 Jan, 2013 01:54 PM

    Ondina D.F.'s Avatar

    Hi Camille,
    I’ve just tried your command in an older project: rl 1 – source code (don’t know the version) , air 3.2, Flex 4.6.
    It did exactly what you’ve described as a realese build.
    I added the infamous :

    -keep-as3-metadata+=Inject

    -keep-as3-metadata+=PostConstruct

    to the compiler arguments and after that it worked (showing all 3 alerts) as a release too.

    But you’re not compiling against the source, are you?

    Ondina

  2. Support Staff 2 Posted by creynders on 29 Jan, 2013 02:12 PM

    creynders's Avatar

    grumble

    Thanks Ondina, I just figured it out, a minute before your answer.

    OMG, I can't believe I fell for the -keep-as3-metadata compiler argument trap!
    I've done this 1000's of times ... :)

  3. Support Staff 3 Posted by Ondina D.F. on 29 Jan, 2013 02:32 PM

    Ondina D.F.'s Avatar

    Hehe, I knew you’d say that. It seems it’s an insidious trap, since even the best programmers, like yourself, can fall into it :) I wouldn’t worry, if I were you. I wish I had your skills.

    Cheers,
    Ondina

  4. Ondina D.F. closed this discussion on 30 Jan, 2013 03:03 PM.

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