Android launch failing - endless splash screen launch

This is new behavior with 4.21 and very odd.

I’ve tested on two computers. On each one the app launched fine on the first deploy to my device from that computer, and then fails on all subsequent launches.

The behavior is to show the splash screen, then a frame of my OS background screen (which is the animated globe backdrop), then animate back to my splash screen and then keep that cycle going.

In the logcat output I can see that it looks like UE4 is requesting the screen saver but this may just be in response to a signaI and I can’t see why this is happening. An example is below but the log file contains several variations on this.

12-20 08:51:42.210 27991-27991/com.MatchyMaximus.Matchoo D/UE4: ==================================> Inside onStart function in GameActivity
12-20 08:51:42.211 27991-27991/com.MatchyMaximus.Matchoo V/threaded_app: Resume: 0xee39c580
12-20 08:51:42.211 27991-28026/com.MatchyMaximus.Matchoo V/threaded_app: activityState=11
12-20 08:51:42.212 27991-28026/com.MatchyMaximus.Matchoo D/UE4: Case APP_CMD_RESUME
    LogAndroidEvents: EnqueueAppEvent : 7, 0, tid = 28026
12-20 08:51:42.212 27991-27991/com.MatchyMaximus.Matchoo D/UE4: ==============> [JAVA] AndroidThunkJava_KeepScreenOn(false) - Enabled screen saver
    Registering sensor listeners

I’m using Android SDK 26.

link text

Worth mentioning that I’ve uninstalled the App manually and that changes nothing - I’ve also deleted intermediate and saved directories in my project directory (but not yet in the engine) and that didn’t help restore the behavior of the initial launch after a completely fresh engine + project install on a machine work.

I do have a slightly modified engine, the change is small but I can’t run my project without it, though thinking about it I can test the launch process so I’ll try building against a vanilla 4.21 when I get a chance.

I reverted my change and still no launch.

4.20 works fine.

Sadly on 4.20 I have visibility issues (Android only and seemingly 4.20 only).

Running 4.21 in Android Studio it looks like this is a permissions issue:

02-18 11:26:31.422 16331-16331/com.MatchyMaximus.Matchoo E/PermissionFragment: Cannot launch PermissionFragment:Can not perform this action after onSaveInstanceState
    java.lang.IllegalStateException: Can not perform this action after onSaveInstanceState
        at android.app.FragmentManagerImpl.checkStateLoss(FragmentManager.java:1877)
        at android.app.FragmentManagerImpl.enqueueAction(FragmentManager.java:1900)
        at android.app.BackStackRecord.commitInternal(BackStackRecord.java:688)
        at android.app.BackStackRecord.commit(BackStackRecord.java:646)
        at com.google.vr.sdk.samples.permission.PermissionFragment.getInstance(PermissionFragment.java:29)
        at com.google.vr.sdk.samples.permission.PermissionHelper$1.run(PermissionHelper.java:62)
        at android.os.Handler.handleCallback(Handler.java:873)
        at android.os.Handler.dispatchMessage(Handler.java:99)
        at android.os.Looper.loop(Looper.java:193)
        at android.app.ActivityThread.main(ActivityThread.java:6680)
        at java.lang.reflect.Method.invoke(Native Method)
        at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:493)
        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:858)

The especially odd thing was once again with a fresh build (new Engine source from git, etc) I get into the app the first time and then it fails on subsequent builds.

Also - if I step through App initialization - the crash doesn’t happen. Perhaps a timing/threading issue on startup?

Seems that the app cycles the splash screen animation N times before running where N is mostly between 2 and 10. Used to be infinite when I originally reported this problem. Biggest change I can think of is I’ve disabled a bunch of plugins I wasn’t using (ARCore etc).

I am having endless restart during the startup movies. Have you solved your problem? I’m on 4.23