AIR 3.6 & 3.7 Loading Remote SWF Crashes iOS on Property Read
I have been trying out the feature in AIR SDK 3.6 that allows you to load local swf files with ABC. This is working fine. However, I am getting a crash on an iOS AOT build when I load a remote swf that does NOT have ABC and I try to read any property on that remote asset. I have never had this problem with AIR 3.4. The problem persists on AIR 3.7
Below is a simple example to reproduce the problem. The crash will occur immediately when it attempts to trace the "currentLabels" property of the loaded content. I believe the property itself to be arbitrary --- the same crash will occur when reading any property. In fact, you can even set a breakpoint before that line and in the Flash Builder debugger, if you try to expand the content's properties the app will crash.
package
{
import flash.display.Loader;
import flash.display.MovieClip;
import flash.display.Sprite;
import flash.display.StageAlign;
import flash.display.StageScaleMode;
import flash.events.Event;
import flash.events.ProgressEvent;
import flash.net.URLRequest;
import flash.system.ApplicationDomain;
import flash.system.LoaderContext;
public class MobileAppTest extends Sprite
{
private const path:String = "https://s3.amazonaws.com/wowzers-dev/mobile/client/";
private var files:Array = ["art/common/LoadingScreen.swf"];
public function MobileAppTest()
{
super();
stage.align = StageAlign.TOP_LEFT;
stage.scaleMode = StageScaleMode.NO_SCALE;
loadNext();
}
private function loadNext():void {
var loader:Loader = new Loader();
var req:URLRequest = new URLRequest(path + files[0]);
trace("\n>>> loading: " + req.url);
loader.contentLoaderInfo.addEventListener(ProgressEvent.PROGRESS, onLoadProgress);
loader.contentLoaderInfo.addEventListener(Event.COMPLETE, onLoadComplete);
var context:LoaderContext = new LoaderContext(false, ApplicationDomain.currentDomain, null);
loader.load(req, context);
}
private function onLoadProgress(evt:ProgressEvent):void {
trace(evt.bytesLoaded + " out of " + evt.bytesTotal);
}
private function onLoadComplete(evt:Event):void {
trace("<<< onLoadComplete " + evt.currentTarget.contentType);
trace("=== currentLabels: " + evt.currentTarget.content.currentLabels);
}
}
}
Am I doing something wrong? Is this a known issue that will be fixed?
So far I have tested this on an iPad 3 with iOS 6.1.3.
Thank you.
