Open hardcoremore opened 4 years ago
One thing I have noticed is that loader info load complete event will never be triggered:
this.loaderInfo.addEventListener(Event.COMPLETE, this.loaderInfoLoadCompleteEventHandler);
Hi - are you using ADL for this, or is it with a bundled application? Any chance you could send us the application for us to test against?
Or Scout logs could be handy as an alternative?
Thanks
Hi Andrew,
I am using Flash Builder 4.7 to run the application like I always did. I haven't changed anything. How can I know if I am using ADL or not?
I will open Scout now to see if it shows anything.
I have also tried to add these events:
this.loaderInfo.addEventListener(IOErrorEvent.IO_ERROR, loaderInfoIoError); this.loaderInfo.addEventListener(Event.OPEN, loaderInfoOpenHandler);
But nothing is triggered.
When I trace this:
trace(this.loaderInfo.bytesLoaded, this.loaderInfo.bytesTotal);
before adding event for loader info load complete I get this:
20853764 20853764
So it looks like everything is loaded when I try to add Event.COMPLETE event which was not the case before. This is why event callback never fires.
I am adding this event in the constructor of the main class, so there is no other place I can put it where it will be called sooner so I don't miss the event.
this.loaderInfo.addEventListener(Event.COMPLETE, this.loaderInfoLoadCompleteEventHandler);
It looks like everything is loaded instantly and loaderInfo Event.COMPLETE never gets the chance to be called and event can not be caught inside app.
I have also now tried with new empty AIR project and adding this event in constructor of main class:
this.loaderInfo.addEventListener(Event.COMPLETE, this.loaderInfoLoadCompleteEventHandler);
and I can not catch this event. Try creating simple app and try to catch event for when loaderInfo dispatch Event.COMPLETE.
Okay so I think we have a couple of issues:
When launching via Flash Builder, it's not picking up the fact that you've got a license file. We've checked how FB works and it does launch this via the ADL executable, but for some reason it's not then working out the license status. We'll check on this..
The presence of the splash screen is changing the behaviour of the content loader info events. We had ensured that the splash screen happened at the start before any AS3 processing of the main SWF had happened, so this is an interesting timing issue.. we can check this and see whether it's possible to defer the event (as a short-term fix; long-term we perhaps need to shift the splash screen earlier in the process still..)
Will try to get you a workaround for the first issue here which should at least unblock you for now..
thanks
Awesome, thanks Andrew.
I have done some more testing and found out that ADL is crashing every time without any exceptions or errors when I try to run app. I have replaced adding event for loaderInfo with this:
this.addEventListener(Event.ADDED_TO_STAGE, loaderInfoLoadCompleteEventHandler);
to bypass issue with splash screen and try to run and debug my game, but air simulator window crashes (closes) every time after splash screen is completed with displaying.
Hello, I have noticed similar crashes (100% reproducible) on my side with at least the two latest versions (AIR 33.1.1.50 & AIR 33.1.0.43) via ADL on Windows. The crash occurs few seconds (time is variable) after completion of the assets loading (through Starling's Assets Manager) when the game starts to actually show up.
I have no idea where this comes from. Debug console output doesn't tell me anything & Adobe Scout with advance-telemetry neither.
That's not good!! Okay so a quick summary of where we're at:
Running ADL from Flash Builder not picking up the license file -> we hadn't thought to check this case I'm afraid, we've found the problem and it needs a code change, apparently we don't have a workaround.
Capturing the loader info events: this appears to be a timing issue where the splash screen is deferring all of the creation of the main SWF file, but the actual 'loader complete' event is still being dispatched earlier on, once the SWF is primed and ready to go. So this is related to where we inject the splash screen.. We may need to revisit this in more detail, but for now we are able to dispatch the expected events at the expected time once the splash screen has disappeared, so this part will work now.
Crashes .. earlier ones (with 33.1.0.37 anyway) were the result of us not setting up the code context for execution of the splash screen: it worked for our basic SWFs used as test cases, but when particularly additional tags were in the SWF it started failing. We're not sure of the issues for these crashes though and aren't seeing them with our test cases: would it be possible for you to zip up your content and email it to us and we can try running it through a debug build to see what goes wrong?
I keep on thinking, we need to develop a "proper" game that we can use as a real-world test case for all this rather than lots of smaller individual test files.. Anyway - if we can get that crash resolved then all of these issues can go into a quick patch release early next week.. Thank you for the feedback!
Andrew,
Thanks for quick response. As a test project, I think that you can at least try to run and compile and test with feathers ui components demo app. It should cover alot of stuff since includes GPU assets, textures, starling feathers etc. Will that work with latest sdk?
I just checked the latest version, and have the splash screen issue as well in Intelij. I have a license but it starts with splash (which zooms in forever) then it goes to white screen.
OS: Windows 10 SDK: Flex 16.1 with AIR33.1.1.50
Quick summary from my side:
Andrew I think app is crashing when it tries to load ATF textures in async mode.
So this function in Starling
override public function uploadAtfData(data:ByteArray, offset:int = 0, async:* = null):void
{
var isAsync:Boolean = async is Function || async === true;
if (async is Function)
{
_textureReadyCallback = async as Function;
base.addEventListener(Event.TEXTURE_READY, onTextureReady);
}
potBase.uploadCompressedTextureFromByteArray(data, offset, isAsync);
setDataUploaded();
}
in ConcretePotTexture class. Event.TEXTURE_READY is never fired so onTextureReady callback is never called. I am trying to load ETC2 textures with various sizes 4096x4096 with transparency but without JXR!
Can you test if loading ATF ETC2 textures work on your side?
Hmm... not having a problem loading ETC2 textures and displaying them here. Have also tried playing with the keyboard, and running through the Starling and the Features UI components demos. Curious...
Any chance of sending us a test case, or attaching a SWF here that is crashing for you?
thanks
I have figured out why is crashing for me. It crashes when I start worker. I am using this worker for sound. This is how I load worker:
public function initSoundWorker():void
{
var workerLoader:Loader = new Loader();
var loaderContext:LoaderContext = new LoaderContext(false, ApplicationDomain.currentDomain);
workerLoader.contentLoaderInfo.addEventListener(flash.events.Event.COMPLETE, _onSoundWorkerLoadComplete);
workerLoader.load(new URLRequest("ShapesInMotionSound.swf"), loaderContext);
}
protected function _onSoundWorkerLoadComplete(event:flash.events.Event):void
{
var workerBytes:ByteArray = event.target.bytes;
SIM_SOUND_WORKER = WorkerDomain.current.createWorker(workerBytes);
SOUND_WORKER_MUTEX = new Mutex();
SIM_SOUND_WORKER.setSharedProperty("mutex", SOUND_WORKER_MUTEX);
SOUND_WORKER_CONDITION = new Condition(SOUND_WORKER_MUTEX);
SIM_SOUND_WORKER.setSharedProperty("condition", SOUND_WORKER_CONDITION);
SIM_SOUND_WORKER.start();
}
The ShapesInMotionSound.swf is inside src folder of a project. I am using to play sounds so it has embeded mp3 files. But I also tried with empty worker and crashes also.
The strange thing is that it loads worker just fine but when I start it that is when it crashes.
This line cause it to crash: SIM_SOUND_WORKER.start();
Regards,
Caslav
@ajwfrost On my side, I managed to debug the ADL process through the Windows Process Explorer
and I get the following error:
Exception thrown at 0x57F2CCC3 (Adobe AIR.dll) in adl.exe: 0xC0000005: Access violation reading location 0x000000A0.
I will try to provide you a SWF as soon as I can if this doesn't help you enough.
Thanks guys! Looks useful.. @Adolio are you able to see the Windows Event Logs to check on that error report, we need the loading address for the DLL (or the relative address of the crash). Looks like a null pointer dereferenced though which may give a few clues, there aren’t that many code changes between these release versions!!
So we have a fix for the Worker issue. @Adolio are you also using Workers or is your issue definitely something else..?!
Thanks
Concerning mine, I dont use any workers in my apps.
@ajwfrost Good news for the Worker issue but unfortunately no workers are used on my side.
Plus, I don't see any event in the Windows' Event Viewer
when the crash occurs. But with the Process Monitor
app I get this for the last operations before the crash:
I'm not sure how I can provide you the loading address for the DLL... Could you give me the tools / steps to provide you that information? Thanks
@Adolio Thanks for that. Earlier you mentioned getting a log:
Exception thrown at 0x57F2CCC3 (Adobe AIR.dll) in adl.exe: 0xC0000005: Access violation reading location 0x000000A0.
If you've got a similar crash location, and are also able to see this in the Process Monitor, then you can get the loaded module details from Process Monitor: double-click on an event to bring up "Event Properties" and then go to the "Process" tab, where it lists all the modules and their load addresses.
Are you guys all using Starling, or at least Stage3D? and if so, do you know what the driver details are? I'm wondering if it's related to one specific version of Direct3D or similar...
I am using Starling and of course Stage 3D and Direct X 11
@ajwfrost I have sent you the full Process Monitor
log file by email (yahoo.co.uk). Unfortunately I cannot debug the process to match the log with the exception (the "Debug" capability is not available on my laptop in the Process Explorer
... !?). I can surely provide you that on Monday.
Same as @hardcoremore, Starling version: 2.5.1 (DirectX11 (Enhanced))
@Adolio Can you please run this test project that crashes adl on my machine to confirm if it is the same crash :)
If crash does not happen try to increase NUMBER_OF_IMAGES in dfpck/AIR33_1_1_50_Crash class.
@hardcoremore The pre-built swf version doesn't crash on my side. No crash neither while compiling from the sources with various values of NUMBER_OF_IMAGES
. I'm not sure that everything is alright because I don't see anything on-screen - just a black window.
So I think we've found a couple of issues so far: 1) if the splash screen was displayed, the 'complete' event wasn't being dispatched for the root movie's loader object 2) if the splash screen was displayed, there could be a crash which appears to be GC-related..
We need to solve the issue with the splash screen displaying for licensed customers - tracking this down currently, with help and support from hardcoremore!
thanks
You should definitely see pool balls animating :)
Is method startExample called inside AIR33_1_1_50_Crash class when you run it?
@ajwfrost Just a note, we are also seeing this issue with the loaderInfo
Event.COMPLETE
not being dispatched on iOS.
We have used this to initiate many of our apps over the years:
loaderInfo.addEventListener(Event.COMPLETE, loaderInfo_completeHandler);
function loaderInfo_completeHandler(event:Event):void
{
// Start up app here
}
@hardcoremore The black screen was caused by what @ajwfrost discovered - the root movie's loader object never dispatches the complete
event (splash screen is indeed shown). If I by-pass the loading the application, the crash occurs. We are getting closer and closer... 😀
@ajwfrost I managed to have the crash & start addresses.
Exception thrown at 0x0FF62FC1 (Adobe AIR.dll) in adl.exe: 0xC0000005: Access violation reading location 0x3FB41674.
ADL.dll start address: 0x2906b0
Binary (@hardcoremore's project without root movie's loader): bin-debug.zip
Note: I discovered that adding a delay make the crash harder to reproduce (it takes way more time to occur after the delay):
In TestGPUMemoryLeak.as:
public class TestGPUMemoryLeak extends Sprite
{
protected var starlingInstance:Starling;
protected var starlingRoot:AIR33_1_1_50_Crash;
protected var testAtlas:StarlingAssets;
public function TestGPUMemoryLeak()
{
// support autoOrients
stage.align = StageAlign.TOP_LEFT;
stage.scaleMode = StageScaleMode.NO_SCALE;
sfwLoadComplete(null);
//this.loaderInfo.addEventListener(flash.events.Event.COMPLETE, sfwLoadComplete);
}
protected function sfwLoadComplete(event:flash.events.Event):void
{
starlingInstance = new Starling(AIR33_1_1_50_Crash, stage);
starlingInstance.addEventListener(starling.events.Event.ROOT_CREATED, onStarlingLoadComplete);
starlingInstance.skipUnchangedFrames = false;
starlingInstance.simulateMultitouch = false;
starlingInstance.start();
Starling.current.showStats = true;
Starling.current.showStatsAt('center', 'bottom', 4);
}
protected function onStarlingLoadComplete(event:starling.events.Event):void
{
starlingRoot = event.data as AIR33_1_1_50_Crash;
testAtlas = new TestTextureAtlas();
testAtlas.addEventListener(starling.events.Event.COMPLETE, onAtlasLoadComplete);
testAtlas.load();
}
protected function onAtlasLoadComplete(event:flash.events.Event):void
{
Starling.juggler.delayCall(delayComplete, 10.0);
}
protected function delayComplete():void
{
starlingRoot.atlas = testAtlas;
starlingRoot.startExample();
}
}
I have related issue: https://github.com/Gamua/Adobe-Runtime-Support/issues/249
Starting Worker
cause crash crash for all platforms with latest AIR 33.1.0.50. Even when HARMAN AIR license file used.
@Adolio thanks for that! that crash address is way outside of the library's built-in functions though which means it's in a data area.. which means it's then very likely to be the GC-related problem that we found yesterday with @hardcoremore's app - we have a fix for this, will push this out soon.
I think the only outstanding thing (!) is that we aren't correctly identifying the installation of the SDK as commercially licensed when run via Flash Builder. @hardcoremore thanks for your input, for some reason the call to check the license status is just failing to run at all (hence the '1' return value) but we do appear to have direct access to the license file, so we can check this within the runtime itself...
Will kick off the next release process today so that we can get these fixes to you later in the week..
Ok so after further investigation, it looks like my issue is different. I managed to get it working on an empty project, but in other projects, I get this error:
param count mismatch
virt params=2 optional=1 flash.geom::Transform/getRelativeMatrix3D()
over params=1 optional=0 flash.geom::Transform/getRelativeMatrix3D()
VerifyError: Error #1053: Illegal override of Transform in mx.geom.Transform.
at spark.primitives.supportClasses::GraphicElement/validateProperties()[D:\flex_sdk\Sources\flex-sdk\frameworks\projects\spark\src\spark\primitives\supportClasses\GraphicElement.as:3546]
at spark.components::Group/validateProperties()[D:\flex_sdk\Sources\flex-sdk\frameworks\projects\spark\src\spark\components\Group.as:938]
at mx.managers::LayoutManager/validateProperties()[D:\flex_sdk\Sources\flex-sdk\frameworks\projects\framework\src\mx\managers\LayoutManager.as:601]
at mx.managers::LayoutManager/doPhasedInstantiation()[D:\flex_sdk\Sources\flex-sdk\frameworks\projects\framework\src\mx\managers\LayoutManager.as:787]
at mx.managers::LayoutManager/doPhasedInstantiationCallback()[D:\flex_sdk\Sources\flex-sdk\frameworks\projects\framework\src\mx\managers\LayoutManager.as:1191]
To my understanding this is an issue with Flex after the update of geometry APIs?
Okay so yes there was a Flex issue, apologies for that! We have reverted the APIs and changed how the object pooling is provided. Am wondering whether Friday lunchtime is the best time to push out a release, but there you have it ... it's up on the website now, should resolve the Flex issue plus these other recent instabilities, black screens etc...
I am seeing an issue with projects on Windows and macOS with 33.1.1.63 when using ANEs
running from adl
Event.ACTIVATE
never seems to trigger
ie
this.addEventListener(Event.ACTIVATE, onActivated);
I use this to ensure stage
is not null
and reference NativeApplication.nativeApplication.activeWindow
If I minimise the app and maximise it again onActivated
is triggered on Windows but not on macOS Catalina.
After the Free Tier Harman splash animation I sometimes get the following:
[Fault] exception, information=VerifyError: Error #1014: Class com.tuarua.webview::WebViewEvent could not be found. java.lang.IndexOutOfBoundsException: Index 0 out of bounds for length 0 at java.base/jdk.internal.util.Preconditions.outOfBounds(Preconditions.java:64) at java.base/jdk.internal.util.Preconditions.outOfBoundsCheckIndex(Preconditions.java:70) at java.base/jdk.internal.util.Preconditions.checkIndex(Preconditions.java:248) at java.base/java.util.Objects.checkIndex(Objects.java:372) at java.base/java.util.ArrayList.get(ArrayList.java:458) ….
The Class may differ but is always a Class from one of the ANEs.
No problems observed when using AIR 33.0.2.281
This is a complex AIR desktop project which can be used for testing. https://github.com/tuarua/WebViewANE/tree/master/example-desktop-complete
This is a basic one: https://github.com/tuarua/WebViewANE/tree/master/example-desktop-as3
We also see a Harman splash screen while using air sdk 33.1.1.63 even though we got a valid license file which works in air 33.0.2.338
@gosgame can you please clarify whether this is Windows or Mac, and whether this is with ADL or when using the -bundle package?
@tuarua thanks for the report and the test projects, we're investigating and will try to push though a fix asap..
@ajwfrost I just tested it on Windows by running the swf in standalone mode. The swf is created by Visual Code.
@gosgame We'll have to send you a build with some extra debug as that mechanism uses the normal ADL binary and works for us here...
Hi @gosgame . Are you able to take the zip from the below attachment and extract the Adobe AIR.dll file into your SDK folder:
runtimes\air\win\Adobe AIR\Versions\1.0\
Then when you run it from VS Code, you should see a set of dialog boxes pop up:
1) "Checking for existence of license"
2) "path\to\sdk\bin\adl.exe"
3) "path\to\sdk\bin..\lib\adt.lic"
4) "Opened license file"
5) "Dev 36 Key 58 Lic 1"
6) "Delta 2"
and then it should launch without the splash screen.
If any of the messages diverge from the above, please let us know what they say!
thanks Adobe AIR.zip
@gosgame just wondering if you were able to run using the modified version above so that we can figure out why you're seeing the splash screen ..? thanks
@ajwfrost I can confirm that for me also splash screen is visible with 33.1.1.63. It was not visible with Adobe AIR.dll you sent me before.
I have run again with dll you sent above. Here are the resulting screenshots:
Thanks @hardcoremore that's really useful! Are you also able to run the ADT tool from that Flash Builder folder, with the "-license" parameter:
adt.bat -license
and let us know what that result is?
many thanks
Hi @ajwfrost, when I run adt.bat it says license is present and valid.
Thanks @hardcoremore ! We will check on this..
@hardcoremore Sorry to ask another favour but is it possible that you could email us the "adt.lic" file that you've currently got in that Flash Builder SDK folder, per the "License Path" dialog box? We're trying to work out how it's possible to have ADT saying one thing but the runtime code saying another... and can't reproduce this discrepancy with any of the test files/conditions here... Please email to adobe.support at harman.com - if you put "FAO Andrew Frost" in the subject, one of the guys will forward it to me..
Many thanks
No problems @ajwfrost . I have just sent the license file that I am using.
Regards,
Caslav
@gosgame are you able to run the "adt -license" command and let us know what this says? and if it says everything is fine, can you re-try launching the app via Flash Builder?
It looks like ADT includes more logic than the runtime check so we will need to update the runtime to do the same extra checks on the license validity...
Thanks for the support hardcoremore!
Hi Andrew,
I have just downloaded latest AIR SDK and it still does not work.
When i run application It only displays splash screen and after that there is just a black screen.
I am also seeing splash screen every time even though I have paid licence and I have copied adt.lic file into lib folder of the sdk.
I am using Windows 10 1903 and latest AIR SDK. I am using sfw version 44 and 33.1 as a namespace.
NONE of this issues were present on AIR SDK 33.1.0.16 Beta, so what is the problem?