When using the Google Play Games v2 library in Unreal Engine 5, a crash

Please select what you are reporting on:

Creative

What Type of Bug are you experiencing?

Other

Summary

When using the Google Play Games v2 library in Unreal Engine 5, a crash occurs when running the app.

Steps to Reproduce

  1. Run the app by applying the Google Play Games v2 library
  2. Google Play Games account linking prompt window displayed
    (show here: Sign-in for Android Games  |  Play Games Services  |  Google for Developers)
  3. touch cancel or background
  4. ANR crash (Only UE5, not UE4)

Expected Result

After splash screen appears, enter game initial screen

Observed Result

It seems that Unreal Engine 5 game activity does not handle keyboard dispatch properly.

Platform(s)

Android

Greetings @diskerdisker

Welcome back to the Unreal Engine Community Forum. Thanks for reporting on this! Do you have a copy of the crash report I could take a look at? Thanks!

[2024-07-02 16:54:45.783 946-6336 Activit|attachment](upload://pAfbowZcfNALwq3vMYne56kolQQ.783 946-63) (22.4 KB)
2024-07-02 16:54:45.783 946-6336 ActivityManager system_server E ANR in com.com2us.hivesdk.normal.freefull.google.global.android.common (com.com2us.hivesdk.normal.freefull.google.global.android.common/com.epicgames.unreal.GameActivity)
PID: 5899
Reason: Input dispatching timed out (e244ca8 com.com2us.hivesdk.normal.freefull.google.global.android.common/com.epicgames.unreal.GameActivity (server) is not responding. Waited 10001ms for FocusEvent(hasFocus=true))
Parent: com.com2us.hivesdk.normal.freefull.google.global.android.common/com.epicgames.unreal.GameActivity
Frozen: false
Load: 13.94 / 13.26 / 12.47
------ Current CPU Core Info ------
- offline :
- online : 0-7
- AP Temp = 419
0 1 2 3 4 5 6 7
------------------------------------------------------------------------------------------------------------------
scaling_cur_freq 1053000 1053000 1053000 1053000 1586000 1586000 520000 520000
scaling_governor schedutil schedutil schedutil schedutil schedutil schedutil schedutil schedutil
scaling_max_freq 1950000 1950000 1950000 1950000 2314000 2314000 2730000 2730000
------------------------------------------------------------------------------------------------------------------
CPU usage from 0ms to 6642ms later (2024-07-02 16:54:39.050 to 2024-07-02 16:54:45.693):
34% 946/system_server: 15% user + 18% kernel / faults: 6121 minor 8 major
15% 5899/com.com2us.hivesdk.normal.freefull.google.global.android.common: 10% user + 4.6% kernel / faults: 2722 minor
8.5% 30008/com.samsung.android.game.gos: 6.5% user + 1.9% kernel / faults: 920 minor
7.7% 16031/com.google.android.gms.persistent: 4.4% user + 3.2% kernel / faults: 2268 minor 6 major
6.4% 3998/com.samsung.android.honeyboard: 3.1% user + 3.2% kernel / faults: 3547 minor 72 major
0.4% 791/media.codec: 0.2% user + 0.1% kernel / faults: 4690 minor 2 major
5.3% 1376/com.android.systemui: 3.5% user + 1.7% kernel / faults: 3025 minor 65 major
5.3% 3200/com.sec.android.diagmonagent: 3.2% user + 2% kernel / faults: 3994 minor 12 major
0.9% 810/media.swcodec: 0.3% user + 0.5% kernel / faults: 3350 minor
3.9% 226/sugov:0: 0% user + 3.9% kernel
3.7% 228/sugov:6: 0% user + 3.7% kernel
2.9% 2628/adbd: 1.3% user + 1.6% kernel / faults: 257 minor
0.5% 764/media.extractor: 0.1% user + 0.3% kernel / faults: 2495 minor
2.2% 227/sugov:4: 0% user + 2.2% kernel
0.3% 1798/com.sec.imsservice: 0.2% user + 0.1% kernel / faults: 2867 minor
1.6% 1348/com.android.phone: 0.8% user + 0.7% kernel / faults: 2093 minor 10 major
1.6% 1600/com.android.networkstack.process: 1% user + 0.5% kernel / faults: 1977 minor
1.6% 3330/com.sec.android.sdhms: 1% user + 0.5% kernel / faults: 1288 minor
1.4% 23741/kworker/u17:0: 0% user + 1.4% kernel
1.2% 409/logd: 0.6% user + 0.6% kernel / faults: 34 minor
0.1% 1748/com.sec.sve: 0% user + 0% kernel / faults: 2046 minor
1.1% 1785/com.android.nfc: 0.7% user + 0.4% kernel / faults: 2056 minor
1.1% 30613/kworker/u16:3: 0% user + 1.1% kernel
1% 385/ueventd: 0.9% user + 0.1% kernel / faults: 4 minor
1% 790/wificond: 0.1% user + 0.8% kernel
0% 1430/com.android.cellbroadcastservice: 0% user + 0% kernel / faults: 2485 minor 104 major
1% 5580/process-tracker: 0.2% user + 0.7% kernel
1% 19652/com.google.android.apps.youtube.music: 0.7% user + 0.2% kernel / faults: 28 minor 1 major
0.8% 623/surfaceflinger: 0.1% user + 0.7% kernel / faults: 47 minor
0% 1814/com.android.se: 0% user + 0% kernel / faults: 2570 minor 106 major
0% 1829/com.skt.skaf.OA00412131: 0% user + 0% kernel / faults: 2134 minor
0.8% 3241/com.samsung.sec.android.teegris.tui_service: 0.7% user + 0.1% kernel / faults: 2000 minor
0.8% 4664/process-tracker: 0.1% user + 0.7% kernel / faults: 1 minor
0.8% 5733/com.android.bluetooth: 0% user + 0.8% kernel / faults: 172 minor
0.7% 436/jbd2/sda31-8: 0% user + 0.7% kernel
2024-07-02 16:54:45.783 946-6336 ActivityManager system_server E 0% 499/tombstoned: 0% user + 0% kernel / faults: 43 minor
0.7% 533/netd: 0.1% user + 0.5% kernel / faults: 94 minor
0% 3357/com.sktelecom.smartcard.SmartcardService: 0% user + 0% kernel / faults: 2470 minor 104 major
0.7% 5567/logcat: 0% user + 0.7% kernel
0.7% 27834/kworker/u16:1: 0% user + 0.7% kernel
0.6% 20/ksoftirqd/1: 0% user + 0.6% kernel
0.5% 534/zygote64: 0% user + 0.5% kernel / faults: 21 minor
0.5% 555/android.hardware.memtrack@1.0-service: 0.4% user + 0.1% kernel
0.5% 30035/kworker/u17:3: 0% user + 0.5% kernel
0.4% 8/rcu_preempt: 0% user + 0.4% kernel
0.4% 564/vendor.samsung.hardware.hyper-service: 0.1% user + 0.2% kernel / faults: 15 minor
0.4% 614/audioserver: 0.4% user + 0% kernel / faults: 87 minor
0.4% 1304/wpa_supplicant: 0.1% user + 0.2% kernel
0.4% 3968/kworker/u17:2: 0% user + 0.4% kernel
0.4% 30078/kworker/0:0H: 0% user + 0.4% kernel
0.3% 1/init: 0.1% user + 0.1% kernel / faults: 30 minor
0.3% 9/rcu_sched: 0% user + 0.3% kernel
0% 423/vold: 0% user + 0% kernel / faults: 164 minor 4 major
0.3% 470/keystore2: 0.1% user + 0.1% kernel / faults: 85 minor
0.2% 532/statsd: 0.1% user + 0.1% kernel / faults: 214 minor
0% 535/zygote: 0% user + 0% kernel / faults: 52 minor
0.2% 563/android.hardware.wifi@1.0-service: 0% user + 0.2% kernel
0% 626/dsms: 0% user + 0% kernel / faults: 79 minor
0.2% 762/installd: 0.1% user + 0.1% kernel / faults: 83 minor
0% 767/media.metrics: 0% user + 0% kernel / faults: 346 minor 47 major
0.2% 792/argosd: 0.1% user + 0.1% kernel
0% 803/rild: 0% user + 0% kernel / faults: 3 minor
0.2% 19020/com.gworks.oneapp.naverworks:oneApplication: 0.1% user + 0.1% kernel / faults: 1 minor
0.2% 24317/kworker/0:1: 0% user + 0.2% kernel
0.2% 24483/kworker/u18:3: 0% user + 0.2% kernel
0.2% 31651/kworker/1:0: 0% user + 0.2% kernel
0.1% 7/ksoftirqd/0: 0% user + 0.1% kernel
0% 11/migration/0: 0% user + 0% kernel
0.1% 34/ksoftirqd/3: 0% user + 0.1% kernel
0% 41/ksoftirqd/4: 0% user + 0% kernel
0% 55/ksoftirqd/6: 0% user + 0% kernel
0% 304/com.microsoft.appmanager: 0% user + 0% kernel / faults: 101 minor
0.1% 378/dhd_rpm_state_t: 0% user + 0.1% kernel
0.1% 411/servicemanager: 0.1% user + 0% kernel
0% 448/jbd2/sda7-8: 0% user + 0% kernel
0.1% 455/iod: 0% user + 0.1% kernel
0.1% 557/android.hardware.sensors@2.0-service.multihal: 0% user + 0.1% kernel
0% 705/drmserver: 0% user + 0% kernel / faults: 120 minor 33 major
0.1% 727/cameraserver: 0% user + 0.1% kernel / faults: 100 minor
0% 768/mediaserver: 0% user + 0% kernel / faults: 102 minor
0.1% 801/lhd: 0% user + 0.1% kernel
0% 802/gpsd: 0% user + 0% kernel / faults: 34 minor
0.1% 1703/kworker/3:1: 0% user + 0.1% kernel
0% 1944/com.google.android.ext.services: 0% user + 0% kernel / faults: 61 minor 8 major
0.1% 5104/android.process.media: 0.1% user + 0% kernel / faults: 4 minor 1 major
0.1% 8258/com.samsung.android.app.cocktailbarservice: 0% user + 0.1% kernel / faults: 6 minor 1 major
0.1% 15808/com.google.android.gms: 0.1% user + 0% kernel / faults: 17 minor
0.1% 17336/com.samsung.accessory.atticmgr: 0% user + 0.1% kernel / faults: 3 minor
0.1% 29917/kworker/2:0H: 0% user + 0.1% kernel
0% 29936/kworker/0:2H: 0% user + 0% kernel
0.1% 30482/com.skt.skaf.OA00199800: 0.1% user + 0% kernel / faults: 14 minor 1 major
0.1% 31650/kworker/2:0: 0% user + 0.1% kernel
+0% 6337/kworker/1:1H: 0% user + 0% kernel
20% TOTAL: 9.3% user + 10% kernel + 0.2% iowait + 0.4% softirq
CPU usage from 54ms to 538ms later (2024-07-02 16:54:39.105 to 2024-07-02 16:54:39.588):
58% 946/system_server: 12% user + 46% kernel / faults: 947 minor
46% 6336/AnrConsumer: 7.3% user + 39% kernel
4.8% 1252/SemWifiServiceD: 4.8% user + 0% kernel
2.4% 946/system_server: 0% user + 2.4% kernel
2.4% 1181/WifiHandlerThre: 2.4% user + 0% kernel
2.4% 1524/Binder:946_8: 0% user + 2.4% kernel
12% 5899/com.com2us.hivesdk.normal.freefull.google.global.android.common: 9.3% user + 3.1% kernel
2024-07-02 16:54:45.783 946-6336 ActivityManager system_server E 3.1% 6277/RenderThread 0: 0% user + 3.1% kernel
3.1% 6308/Firebase-Fireba: 0% user + 3.1% kernel
6.3% 226/sugov:0: 0% user + 6.3% kernel
11% 30008/com.samsung.android.game.gos: 7.6% user + 3.8% kernel
11% 5969/Thread-45: 7.6% user + 3.8% kernel
4.2% 228/sugov:6: 0% user + 4.2% kernel
2% 41/ksoftirqd/4: 0% user + 2% kernel
2% 55/ksoftirqd/6: 0% user + 2% kernel
2.1% 227/sugov:4: 0% user + 2.1% kernel
2.2% 563/android.hardware.wifi@1.0-service: 0% user + 2.2% kernel
2.2% 563/wifi@1.0-servic: 0% user + 2.2% kernel
2.2% 564/vendor.samsung.hardware.hyper-service: 0% user + 2.2% kernel
2.4% 790/wificond: 0% user + 2.4% kernel
2.4% 790/wificond: 0% user + 2.4% kernel
2.9% 3998/com.samsung.android.honeyboard: 2.9% user + 0% kernel
3% 4664/process-tracker: 0% user + 3% kernel
3% 5580/process-tracker: 3% user + 0% kernel
3.2% 16031/com.google.android.gms.persistent: 0% user + 3.2% kernel / faults: 12 minor
3.2% 30221/mdns-multicast-: 0% user + 3.2% kernel
13% TOTAL: 3.4% user + 9.9% kernel + 0.2% softirq

@FrostyJas

Thank you for checking out my post. Here is the Android Logcat report.
When re-running, it does not issue.

You’re welcome! Are you running any plugins(Specifically Ads plugins) with this build?

@FrostyJas

Yes, I’m mobile game sdk developer, and My service includes various plugins.
(It is not an Unreal plugin, but various dependencies are configured through gradle. It includes advertising modules such as Google, Facebook, firebase, AppsFlyer, etc.)

However, we are not doing any processing when the app starts. We’ve had no issues with various versions of the Unity Engine and Unreal Engine 4. Due to the prompt UI that is exposed only when starting an app in the Google Play Games v2 library, after starting the Unreal Engine 5 sample, there is a freezing case without entering the next main activity. (Input Dispatcher is not processed properly, and ANR appears to occur due to waiting for more than 10 seconds)

I haven’t tested it yet, but it seems like the same thing will happen if you add the Google Games v2 library to the basic Unreal Engine 5 sample.

Oh, I see! Have you tried running it with plugins disabled to see if it still occurs by chance? (Process of elimination to a degree)

1 Like

@FrostyJas

It doesn’t happen. It appears to be entirely due to the automatic login behavior when starting the app in Google Games v2 Library.