airsdk / Adobe-Runtime-Support

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

App not refreshing/rendering when returning to foreground (rendermode = direct and runtimeInBackgroundThread=true) #3414

Open jigtrap opened 2 months ago

jigtrap commented 2 months ago

1.Problem Description: App not refreshing/rendering when returning to foreground when rendermode = 'direct' and runtimeInBackgroundThread='true'

  1. Environment AIR SDK = 51.1.1.3 OS=Android TargetSdk=34

3.Description When sending app to background and then bringing back to foreground, screen goes black.

4.How to reproduce: You can reproduce it sending the app to background and then activating the app again. Tested devices; Xiaomi Redmi 9A, Samsumg Galaxy S22

  1. Known Workarounds: Setting rendermode to 'cpu' or Setting runtimeInBackgroundThread=false

Thanks in advance. Aldo

2jfw commented 2 months ago

On Android (v10, Sony XZ2, AIR SDK 51.1.1.3), I'm encountering similar issues when opening an image with file.openWithDefaultApplication();. runtimeInBackgroundThread is also on.

Sometimes it works without any issue but often I will get a Context Loss (Starling). Also, my observation was that using stage.displayState StageDisplayState.FULL_SCREEN_INTERACTIVE will work way better when returning to the application with no context loss.

When not in fullscreen mode and returning to the application from the image preview (opened by openWithDefaultApplication) I do most of the time have the app then poke out-of-bounds on the top and bottom for ~20 pixels (likely the same pixels in difference as if the app was in fullscreen mode), indicating stage was resized by the opened image preview but not sized back.

jigtrap commented 2 months ago

@ajwfrost , hello, could you have a lookt at it?,

We need to use 'direct' instead of 'cpu', because it renders faster.

And we can't use runtimeinbackground=false, because App Startup Time increases a lot.

Thanks in advance.