airsdk / Adobe-Runtime-Support

Report, track and discuss issues in Adobe AIR. Monitored by Adobe - and HARMAN - and maintained by the AIR community.
200 stars 11 forks source link

Critical, AIR 51.1.1.3: On Samsung Galaxy S10, S20, S23 (at least) bottom part of the screen is cut off #3442

Open sjabberwocky opened 1 week ago

sjabberwocky commented 1 week ago

After updating our game to AIR 51.1.1.3, players are reporting that at least on the Samsung Galaxy S10, S20, S23, the bottom part of the screen is cut off.

Previous build was based on AIR 50.2.3.5.

At the moment I cannot reproduce this problem locally as I do not have a Samsung Galaxy, but players have sent me screenshots with this problem.

On other devices it seems to work fine. @ajwfrost Please, take a look on this issue, cause it not possible to return to Android SDK 33 anymore. If you send me a transfer link I could send you aab file.

This is from Samsung Galaxy S20 Ultra: Screenshot_20240831_202910_Ancient Planet

And this one from Samsung Galaxy S10: Screenshot_20240829-102910_Ancient Planet

ajwfrost commented 1 week ago

Hi @sjabberwocky

Upload link: https://transfer.harman.com/requests/hSXQu9xvejCaPIy4Tghiy7

But just looking at it .. what is the aspect ratio of the display on these handsets? And what is the 'max aspect ratio' set in your descriptor file? (Default I think is 3.4).

thanks

sjabberwocky commented 1 week ago

But just looking at it .. what is the aspect ratio of the display on these handsets?

It should be 19:9.

And what is the 'max aspect ratio' set in your descriptor file?

<meta-data android:name="android.max_aspect" android:value="2.5"/>

One of my test devices is Motorola One Action with aspect ration 21:9 and it works fine.

Uploaded latest build, thanks!

ajwfrost commented 1 week ago

Checking this on a Samsung S20 and the bottom 134 or so pixels are black. 1080x2400 resolution so 2.22 aspect ratio, your setting there should be okay.

Have you tried it with a fullScreen setting of true though?

Presumably this was working with an earlier version of the AIR SDK so can you confirm what version that was, we can then try to see what might have changed here to change the behaviour..

sjabberwocky commented 1 week ago

Have you tried it with a fullScreen setting of true though?

I use @marchbold's Application ANE for screen handling. AIR doesn't handle cutouts when I first started using it. If I remember correctly. Application ANE works fine only with fullScreen setting of false.

https://docs.airnativeextensions.com/docs/application/display/ I use ApplicationDisplayModes.IMMERSIVE and LayoutMode.CUTOUT_SHORT_EDGES.

Presumably this was working with an earlier version of the AIR SDK so can you confirm what version that was, we can then try to see what might have changed here to change the behaviour..

The latest stable release is based on AIR 50.2.3.5.

ajwfrost commented 1 week ago

Ah so I wonder if the "short edges" thing is interfering with the new setting we added for the AIR SDK to handle that ... can you try adding to your app descriptor file:

<android>
    <displayCutoutMode>shortEdges</displayCutoutMode>
</android>

https://airsdk.dev/docs/building/application-descriptor-files/elements/android#displaycutoutmode

sjabberwocky commented 1 week ago

@ajwfrost I sent you an updated version of the game via your transfer link with this line in the descriptor, could you test it on your Samsung S20?

ajwfrost commented 1 week ago

Thanks -> but didn't seem to make a difference, I still get the bottom of the screen missing. Looks just the same as your "S10" screenshot above, with it cutting off under the pause button.

I'll see if we can break this apart and add in some debugging to see what's happening, or else provide a debug version of the runtime classes for you to try with...

thanks

bobrokrol commented 1 week ago

Is it starling? Check if you correctly resize Starling stage and viewport

my code in Event.RESIZE handler that works with latest SDK:

_starling.stage.stageWidth =  stage.fullScreenWidth;
_starling.stage.stageHeight = stage.fullScreenHeight;

 const viewPort:Rectangle = this._starling.viewPort;
 viewPort.width = _starling.stage.stageWidth;
 viewPort.height = _starling.stage.stageHeight;    
 this._starling.viewPort = viewPort;

it works in both fullscreen and non fullscreen mode for me. There is always problem with stage.stageWidth / stageHeight from version to version and from device to device

sjabberwocky commented 1 week ago

@bobrokrol I do not handle Event.RESIZE, I get display size from Application ANE and initialize screen size once at constructor of Main class and it works for 10 years until now.

marchbold commented 1 week ago

@sjabberwocky Have you confirmed the sizes the Application ANE are returning are correct on that device?

sjabberwocky commented 1 week ago

@marchbold I do not have Samsung Galaxy test device, probably I should buy one.

marchbold commented 1 week ago

Ah it's tough keeping up with them all! I'll check what we have here.

ajwfrost commented 1 week ago

@sjabberwocky we've just been trying to make some updates to the AIR/Adobe classes within your application in order to add some logging to determine what's happening, but it's then failing to start up.. I don't quite know why/how, but I wondered if there's some protection against this kind of thing? If it's possible to get an APK that is built just as apk-debug and without anything like that, it would be helpful (looks like a Firebase-related issue, mention of 'okio'? even just replacing one .so file with a new version is causing the app to fail to run..)

Or even better if you're able to strip out everything and create a really simple/basic test case that exhibits the problem, that we could package from a SWF plus APM file or similar?

We can test on the physical Samsung S20 here, where I see the problem happening, plus on any device from AWS Device Farm..

thanks

sjabberwocky commented 1 week ago

@ajwfrost I’ll prepare simple test app for tomorrow. Thanks for your help, I really appreciate it!

sjabberwocky commented 5 days ago

@ajwfrost I am sending you an IDEA project with a test app via your transfer link. Hope it helps you find and fix this problem.