Open NikosLaskaridis opened 1 year ago
Curiously, this sounds like the same as https://github.com/airsdk/Adobe-Runtime-Support/discussions/1856 which was fixed in 33.1.1.856. But this change seems to have broken the set-up for you ..
Are you sending out these calls concurrently i.e. is the "500 calls" figure where there are 500 concurrent calls, or have some of them completed before newer ones are made, but after a total of around 500 then there's an issue?
It would be great if you're able to create a simpler test case for this that we can use to check the behaviour and see why there are error codes that are starting to be returned... in the meantime, you can always take the "adt.jar" from a recent version of the AIR SDK, and copy that over the top of an earlier one - for iOS only (it will break Android builds) this would mean it sets the latest Xcode/iOS SDK flags.. (alternatively I guess, take the runtime library file (or lib/aot/lib folder) from the older SDK and copy that over the top of a new one?)
thanks
Thank you for your quick response.
Are you sending out these calls concurrently i.e. is the "500 calls" figure where there are 500 concurrent calls, or have some of them completed before newer ones are made, but after a total of around 500 then there's an issue?
It's the second, most of them are completed before new ones are made. Imagine a map that is made of small (256x256 pixels, about 10kb each) bitmap tiles: when opening the app it will ask for, let's say, 30 tiles and while panning and zooming it will keep asking for more, depending on the speed the user is panning/zooming the map. If the user is moving fast or the device has a big screen that needs more tiles then we get the errors. In the meantime we managed to find another workaround: we used the old SDK (the one with no issues) and included the last iOS SDK using -platformsdk (in our case this could work only on a Mac). We will create and send a simpler test case. And indeed it looks like case #1856 (although it's happening on iOS and not MacOS). If so, is there something we can change in our code to eliminate the errors? Again, thank you very much for the quick response and the hints.
I include a simple test case that makes a bunch of calls. It works fine on Windows and Android, but on iOS it starts returning errors after a while:
import flash.display.Bitmap; import flash.display.Loader; import flash.display.LoaderInfo; import flash.events.Event; import flash.events.EventDispatcher; import flash.events.IOErrorEvent; import flash.events.ProgressEvent; import flash.events.TimerEvent; import flash.net.URLRequest; import flash.system.LoaderContext; import flash.utils.Timer; import flash.utils.setTimeout;
var countCorrect:int=0; var countErrors:int=0; var clipcontainer; var ccount_txt:TextField = new TextField(); var ecount_txt:TextField = new TextField();
placeTestElements(); callSomeRandomLoaders();
function placeTestElements() { clipcontainer=new Sprite(); clipcontainer.x=40; clipcontainer.y=120; addChild(clipcontainer);
var myFormat:TextFormat = new TextFormat(); myFormat.size = 26;
ccount_txt.x=40; ccount_txt.y=40; ccount_txt.width = 300; ccount_txt.height = 40; ccount_txt.defaultTextFormat = myFormat; addChild(ccount_txt);
ecount_txt.x=40; ecount_txt.y=80; ecount_txt.width = 300; ecount_txt.height = 40; ecount_txt.defaultTextFormat = myFormat; addChild(ecount_txt); }
function callSomeRandomLoaders() { var i:int; for (i=1;i<=2000;i++) { setTimeout(randomLoader,i*25); } }
function randomLoader() { var tileLoader:Loader = new Loader(); var tmpx:int; var tmpy:int; tmpx=randomNumber(0,255); tmpy=randomNumber(0,255);
var url:String="https://tile.openstreetmap.org/8/"+tmpx+"/"+tmpy+".png"; var request:URLRequest=new URLRequest(url); tileLoader.load(request); tileLoader.contentLoaderInfo.addEventListener(Event.COMPLETE, onLoadEnd, false, 0, true); tileLoader.contentLoaderInfo.addEventListener(IOErrorEvent.IO_ERROR, onLoadError, false, 0, true); }
function onLoadEnd(event:Event):void { trace("Loaded ok"); var loader:Loader = (event.target as LoaderInfo).loader; var testBitmap:Bitmap = loader.content as Bitmap; countCorrect++; ccount_txt.text="Correct: "+String(countCorrect); clipcontainer.addChild(testBitmap); }
function onLoadError(event:IOErrorEvent):void { trace("Error"); countErrors++; ecount_txt.text="Errors: "+String(countErrors); }
function randomNumber(low:Number=0, high:Number=1):Number { return Math.floor(Math.random() * (1+high-low)) + low; }
We have developed an app for iOS and Android that uses raster map tiles and projects data over them. We (and our clients) have noticed that after an update we did there is a network bottleneck in the iOS version: after a certain number of loader calls we are getting errors instead of data. Because of the nature of the app it's possible to have a large number of calls for these tiles (and data overlayed on top of them) when the user is panning and zooming on the map.
Up until SDK AIR 33.1.1.795 everything worked great: the app could handle a large number of network calls without issues. After updating to 50.x.x.x and above (and also in 33.1.1.929), there is a bottleneck: After about 500 calls we were getting errors and it should take some time for the app to start functioning again. This is happening only on iOS: Android and Windows work fine, same with SDK versions 33.1.1.795 and older, that can handle thousands of network calls.
The url of the calls doesn't make any difference, we have tested our own server data, google tiles, OSM tiles and more, in every case there is a bottleneck and the system stops working after about 500 calls.
A workaround could be to use the AIR 33.1.1.795 SDK, but it's not accepted by Apple since it uses an older iOS SDK.
Please advise.