Tag Archive for 'Error'

Tired of people using stage in constructor?

Recently someone in ruFlash user group asked if it’s possible to get rid of errors when loading a SWF which thinks it is the only SWF in the world and there totally must be stage available in its constructor. As you already understood such SWFs fail with Null Access errors.

TypeError: Error #1009: Cannot access a property or method of a null object reference.

This task looks like a great exercise for my epic Scala skills I got trying to understand famous Joa‘s code.

Thanks to apparat and Scala I managed to code a small app which rewrites SWF files and moves all constructor code to a private method which is later subscribed to ADDED_TO_STAGE event.

usage: java -jar initInjector.jar [-c] <from.swf> [to.swf]“)
-c — check for references to stage in constructor
If [to.swf] is not specified resulting SWF is saved to <from.swf>

The 0.1 version fails to move exceptions though. Trying to grasp that bytecode exceptions magic atm.

Here’s the application: initInjector.zip

Not even Adobe is perfect

Error: Error #2154: The NetStream Object is invalid.  This may be due to a failed NetConnection.
at flash.net::NetStream/get info()
at com.wreckbmedia.adobeTV.flash.view::TvPlayer/startBWTest()
at com.wreckbmedia.adobeTV.flash.view::TvPlayer/go()
at flash.events::EventDispatcher/dispatchEventFunction()
at flash.events::EventDispatcher/dispatchEvent()
at org.openvideoplayer.media::MediaPlayer/onPlayheadTimer()
at flash.utils::Timer/_timerDispatch()
at flash.utils::Timer/tick()

Process terminated without establishing connection to debugger

I had to fix my old AIR application, so I found the source, downloaded and set up AIR SDK, but when I tried to compile it I got an error saying “Process terminated without establishing connection to debugger…”. Thanks the Internet and blog.empiregpservices.com, where I found out that I should just change runtime version in application config.

<application xmlns="http://ns.adobe.com/air/application/1.1">

change to

<application xmlns="http://ns.adobe.com/air/application/1.5">

And now it works.