Using PushButton Engine with Flex4

May 15th, 2010 by Christian Leave a reply »

I recently upgraded to Flex4 SDK. Before that everything worked fine. After that, I had some compiler errors, and a quick research brought to me that I had to add

-static-link-runtime-shared-libraries=true

to the additional compiler options. Doing some more in depth research, I discovered that this isn’t neccessary with a newer version of FlashDevelop – and I can confirm: it’s true =)
After the update procedure, everything compiled fine in debug mode. In release mode, it compiled too, but I got a runtime error: “VerifyError: Error #1024: Stack underflow occurred”. Again, investigating this error on the web, I stumbled over http://bugs.adobe.com/jira/browse/ASC-2266. The piece of code causing this, looked like so:

conn = new LocalConnection();
conn.client = this;
conn.allowDomain('*');
try {
	conn.connect("_SchemaConnection");
} catch (error:ArgumentError) {
	trace("Can't connect to _SchemaConnection");
}

So as you can see, it’s not the same as in the link above. I started commenting out line by line, and then I discovered, that it was the trace call. Replacing it with a Logger call finally fixed the error:

Logger.print(this, "Can't connect to _SchemaConnection");

I guess we’ll just put that on the unsolved mysteries stack ;)

3 comments

  1. Jorshasaur says:

    I myself got an error today about a “Resource not being castable to an XMLResource” today, and the fix was adding “-static-link-runtime-shared-libraries=true” to my compile options too. Who would have thought that had anything to do with the compiler?

  2. Christian says:

    Strange… cool that you found the error!
    If I get weird errors, I try to ask google first, but mostly, I’m that into trying to discover it myself, such that I forget to do so ;)

  3. Ken Patel says:

    I just got the same thing with a trace statement within the ‘default’ case of a switch statement.

Leave a Reply