Relay crashes when using CreateAllocationAsync() without specifying region

Hi,

Our game crashes on some devices when using await RelayService.Instance.CreateAllocationAsync(maxConnections) without explicitly specifying the region. When we pass in the first region found it works just fine.

var regions = await RelayService.Instance.ListRegionsAsync();
var allocation = await RelayService.Instance.CreateAllocationAsync(maxConnections, regions[0].Id);

Tested Device: Motorola Moto G(6) from 2018
Unity 2021.3.21f1
Relay 1.0.5

crash log

E/CRASH: *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***

E/CRASH: Version '2021.3.21f1 (1b156197d683)', Build type 'Release', Scripting Backend 'il2cpp', CPU 'armeabi-v7a'

E/CRASH: Build fingerprint: 'motorola/aljeter/aljeter:8.0.0/OPP27.91-177/189:user/release-keys'

E/CRASH: Revision: 'p400'

E/CRASH: ABI: 'arm'

E/CRASH: Timestamp: 2023-04-16 17:37:06+0300

E/CRASH: pid: 24699, tid: 24770, name: Job.Worker 0  >>> [game-package] <<<

E/CRASH: uid: 10223

E/CRASH: signal 7 (SIGBUS), code 1 (BUS_ADRALN), fault addr 0x8a235ed1

E/CRASH:     r0  9cac5f3c  r1  8a235ed1  r2  7826dbb0  r3  00003a0a

E/CRASH:     r4  850ff280  r5  00000008  r6  7826db28  r7  0000000b

E/CRASH:     r8  850ff348  r9  850ff3c0  r10 7a27a5d0  r11 850ff348

E/CRASH:     ip  850ff1e8  sp  850ff220  lr  8c67a610  pc  8c67fc1c

E/CRASH: backtrace:

E/CRASH:       #00 pc 0093dc1c  /data/app/[game-package]-LBkMXikfoUZRrObRDmo9CQ==/lib/arm/libil2cpp.so (BuildId: ed369a9ce0e4f8dd3f02a27645b6f917e5db2cbd)

E/CRASH:       #01 pc 0093860c  /data/app/[game-package]-LBkMXikfoUZRrObRDmo9CQ==/lib/arm/libil2cpp.so (BuildId: ed369a9ce0e4f8dd3f02a27645b6f917e5db2cbd)

E/CRASH:       #02 pc 023b534c  /data/app/[game-package]-LBkMXikfoUZRrObRDmo9CQ==/lib/arm/libil2cpp.so (BuildId: ed369a9ce0e4f8dd3f02a27645b6f917e5db2cbd)

E/CRASH:       #03 pc 023b4d30  /data/app/[game-package]-LBkMXikfoUZRrObRDmo9CQ==/lib/arm/libil2cpp.so (BuildId: ed369a9ce0e4f8dd3f02a27645b6f917e5db2cbd)

E/CRASH:       #04 pc 023b4630  /data/app/[game-package]-LBkMXikfoUZRrObRDmo9CQ==/lib/arm/libil2cpp.so (BuildId: ed369a9ce0e4f8dd3f02a27645b6f917e5db2cbd)

E/CRASH:       #05 pc 023b3fa8  /data/app/[game-package]-LBkMXikfoUZRrObRDmo9CQ==/lib/arm/libil2cpp.so (BuildId: ed369a9ce0e4f8dd3f02a27645b6f917e5db2cbd)

E/CRASH:       #06 pc 023b3c1c  /data/app/[game-package]-LBkMXikfoUZRrObRDmo9CQ==/lib/arm/libil2cpp.so (BuildId: ed369a9ce0e4f8dd3f02a27645b6f917e5db2cbd)

E/CRASH:       #07 pc 003624c8  /data/app/[game-package]-LBkMXikfoUZRrObRDmo9CQ==/lib/arm/libil2cpp.so (BuildId: ed369a9ce0e4f8dd3f02a27645b6f917e5db2cbd)

E/CRASH:       #08 pc 00d72404  /data/app/[game-package]-LBkMXikfoUZRrObRDmo9CQ==/lib/arm/libil2cpp.so (BuildId: ed369a9ce0e4f8dd3f02a27645b6f917e5db2cbd)

E/CRASH:       #09 pc 00402bc0  /data/app/[game-package]-LBkMXikfoUZRrObRDmo9CQ==/lib/arm/libil2cpp.so (BuildId: ed369a9ce0e4f8dd3f02a27645b6f917e5db2cbd)

E/CRASH:       #10 pc 00696b00  /data/app/[game-package]-LBkMXikfoUZRrObRDmo9CQ==/lib/arm/libil2cpp.so (BuildId: ed369a9ce0e4f8dd3f02a27645b6f917e5db2cbd)

E/CRASH:       #11 pc 0069695c  /data/app/[game-package]-LBkMXikfoUZRrObRDmo9CQ==/lib/arm/libil2cpp.so (BuildId: ed369a9ce0e4f8dd3f02a27645b6f917e5db2cbd)

E/CRASH:       #12 pc 001ebff9  /data/app/[game-package]-LBkMXikfoUZRrObRDmo9CQ==/lib/arm/libunity.so (BuildId: af1b4d496b1c0d6545b9e6111d75da00006986f3)

E/CRASH:       #13 pc 001f655d  /data/app/[game-package]-LBkMXikfoUZRrObRDmo9CQ==/lib/arm/libunity.so (BuildId: af1b4d496b1c0d6545b9e6111d75da00006986f3)

E/CRASH:       #14 pc 0014b3e1  /data/app/[game-package]-LBkMXikfoUZRrObRDmo9CQ==/lib/arm/libunity.so (BuildId: af1b4d496b1c0d6545b9e6111d75da00006986f3)

E/CRASH:       #15 pc 0014ae21  /data/app/[game-package]-LBkMXikfoUZRrObRDmo9CQ==/lib/arm/libunity.so (BuildId: af1b4d496b1c0d6545b9e6111d75da00006986f3)

E/CRASH:       #16 pc 0014bd8f  /data/app/[game-package]-LBkMXikfoUZRrObRDmo9CQ==/lib/arm/libunity.so (BuildId: af1b4d496b1c0d6545b9e6111d75da00006986f3)

E/CRASH:       #17 pc 0014bf89  /data/app/[game-package]-LBkMXikfoUZRrObRDmo9CQ==/lib/arm/libunity.so (BuildId: af1b4d496b1c0d6545b9e6111d75da00006986f3)

E/CRASH:       #18 pc 0014c0a5  /data/app/[game-package]-LBkMXikfoUZRrObRDmo9CQ==/lib/arm/libunity.so (BuildId: af1b4d496b1c0d6545b9e6111d75da00006986f3)

E/CRASH:       #19 pc 0014c291  /data/app/[game-package]-LBkMXikfoUZRrObRDmo9CQ==/lib/arm/libunity.so (BuildId: af1b4d496b1c0d6545b9e6111d75da00006986f3)

E/CRASH:       #20 pc 0014b93b  /data/app/[game-package]-LBkMXikfoUZRrObRDmo9CQ==/lib/arm/libunity.so (BuildId: af1b4d496b1c0d6545b9e6111d75da00006986f3)

E/CRASH:       #21 pc 001bf7cb  /data/app/[game-package]-LBkMXikfoUZRrObRDmo9CQ==/lib/arm/libunity.so (BuildId: af1b4d496b1c0d6545b9e6111d75da00006986f3)

E/CRASH:       #22 pc 00047db7  /system/lib/libc.so (__pthread_start(void*)+22) (BuildId: c7a08010947eb9591fd12fce7c0f9986)

E/CRASH:       #23 pc 0001b0a5  /system/lib/libc.so (__start_thread+32) (BuildId: c7a08010947eb9591fd12fce7c0f9986)

W/Unity: Internal: JobTempAlloc has allocations that are more than 4 frames old - this is not allowed and likely a leak

E/CRASH: Forwarding signal 7

A/libc: Fatal signal 7 (SIGBUS), code 1, fault addr 0x8a235ed1 in tid 24770 (Job.Worker 0)

I/Choreographer: Skipped 129 frames!  The application may be doing too much work on its main thread.

Any update on this? Is there at least any way to manually pick the best server location?

Hey C-Gabriel, we are aware of a bug in the QoS package that can cause a crash on some devices and are working on a fix.

ListRegionsAsync can be used to manually pick the server location as a workaround, see the description field: Class Region | Relay | 1.0.1-pre.6

Hi, good to hear you’re aware of it. Thanks for the update and info :slight_smile:

1 Like

Hey C-Gabriel, please update the QoS package to 1.2.1 in the project’s manifest.json, this should fix the issue.

1 Like

Thanks unity-ptrottier, it works well now. for anyone wondering, the package is com.unity.services.qos - we had to add it manually as it wasn’t in our manifest.json

1 Like