Android example crash on launch on Bevy 0.10.0
- Dominant language
- Rust
- Stars
- 48.2k
- Forks
- 4.8k
- Avg merge
- 3d 22h
- Merged PRs (30d)
- 161
Description
## Bevy version
0.10.0
## \[Optional\] Relevant system information
Windows 11 Pro 64bits
Android SDK : I tried multiple (34, 33, 31)
Android NDK : I tried latest and 24
## What you did
I cloned followed the instructions in the android section of bevy examples (set environment variables and launch command on mobile example), the apk is build successfully in debug mode (same issue in release mode) and is transfered to my phone (Oneplus 6)
## What went wrong
After launching the application on my phone, the audio turns on with a nice music, and I see a glimpse of the ui and 3D scene completely stretched, and ten the crash (SIGSEGV) occurs with the following log on adb logcat :
```
Launched with PID 31095
--------- beginning of main
03-07 20:02:54.224 31095 31095 I yengine.exampl: Late-enabling -Xcheck:jni
03-07 20:02:54.249 31095 31095 I yengine.exampl: Unquickening 21 vdex files!
03-07 20:02:54.311 31095 31095 E yengine.exampl: Unknown bits set in runtime_flags: 0x800000
03-07 20:02:54.576 31095 31095 W System : ClassLoader referenced unknown path:
03-07 20:02:54.625 31095 31095 I Perf : Connecting to perf service.
03-07 20:02:54.644 31095 31095 I yengine.exampl: [GL_OOM] ClampGrowthLimit 268435456
03-07 20:02:54.663 31095 31095 D NetworkSecurityConfig: No Network Security Config specified, using platform default
03-07 20:02:54.663 31095 31095 D NetworkSecurityConfig: No Network Security Config specified, using platform default
03-07 20:02:54.839 31095 31095 E Config:Grabber:OnePlusFontConfig: Index 0 requested, with a size of 0
03-07 20:02:54.869 31095 31095 E yengine.exampl: [frame_perf] perfboost open tb_ctl file failed, isApp[1], errno=No such file or directory
03-07 20:02:54.870 31095 31095 E libprocessgroup: set_timerslack_ns write failed: Operation not permitted
03-07 20:02:54.957 31095 31095 E yengine.exampl: Invalid ID 0x00000000.
03-07 20:02:54.957 31095 31095 E yengine.exampl: Invalid ID 0x00000000.
03-07 20:02:54.957 31095 31095 E yengine.exampl: Invalid ID 0x00000000.
03-07 20:02:54.957 31095 31095 E yengine.exampl: Invalid ID 0x00000000.
03-07 20:02:54.957 31095 31095 I chatty : uid=11069(org.bevyengine.example) identical 1 line
03-07 20:02:54.958 31095 31095 E yengine.exampl: Invalid ID 0x00000000.
03-07 20:02:54.958 31095 31095 E yengine.exampl: Invalid ID 0x00000000.
03-07 20:02:54.958 31095 31095 I chatty : uid=11069(org.bevyengine.example) identical 4 lines
03-07 20:02:54.958 31095 31095 E yengine.exampl: Invalid ID 0x00000000.
03-07 20:02:54.958 31095 31095 E yengine.exampl: Invalid ID 0x00000000.
03-07 20:02:54.958 31095 31095 I chatty : uid=11069(org.bevyengine.example) identical 2 lines
03-07 20:02:54.958 31095 31095 E yengine.exampl: Invalid ID 0x00000000.
03-07 20:02:54.958 31095 31095 E yengine.exampl: Invalid ID 0x00000000.
03-07 20:02:54.960 31095 31095 I chatty : uid=11069(org.bevyengine.example) identical 17 lines
03-07 20:02:54.960 31095 31095 E yengine.exampl: Invalid ID 0x00000000.
03-07 20:02:54.960 31095 31095 E yengine.exampl: Invalid ID 0x00000000.
03-07 20:02:54.960 31095 31095 I chatty : uid=11069(org.bevyengine.example) identical 4 lines
03-07 20:02:54.960 31095 31095 E yengine.exampl: Invalid ID 0x00000000.
03-07 20:02:54.999 31095 31095 W linker : Warning: "/data/app/~~GGTIpNiEXsmgkwuRe7Qwbw==/org.bevyengine.example-4azFkzVkM-1OIA4ntzv9hw==/lib/arm64/libc++_shared.so" unused DT entry: unknown processor-specific (type 0x70000001 arg 0x0) (ignoring)
03-07 20:02:55.263 31095 26374 D vulkan : searching for layers in '/data/app/~~GGTIpNiEXsmgkwuRe7Qwbw==/org.bevyengine.example-4azFkzVkM-1OIA4ntzv9hw==/lib/arm64'
03-07 20:02:55.264 31095 26374 D vulkan : searching for layers in '/data/app/~~GGTIpNiEXsmgkwuRe7Qwbw==/org.bevyengine.example-4azFkzVkM-1OIA4ntzv9hw==/base.apk!/lib/arm64-v8a'
03-07 20:02:55.295 31095 26374 I AdrenoVK-0: ===== BEGIN DUMP OF OVERRIDDEN SETTINGS =====
03-07 20:02:55.295 31095 26374 I AdrenoVK-0: ===== END DUMP OF OVERRIDDEN SETTINGS =====
03-07 20:02:55.296 31095 26374 I AdrenoVK-0: QUALCOMM build : 8e5405b, I57aaec3440
03-07 20:02:55.296 31095 26374 I AdrenoVK-0: Build Date : 05/21/21
03-07 20:02:55.296 31095 26374 I AdrenoVK-0: Shader Compiler Version : EV031.32.02.10
03-07 20:02:55.296 31095 26374 I AdrenoVK-0: Local Branch : mybranchebba1dbe-451b-f160-ac81-1458d0b52ae8
03-07 20:02:55.296 31095 26374 I AdrenoVK-0: Remote Branch : quic/gfx-adreno.lnx.1.0.r135-rel
03-07 20:02:55.296 31095 26374 I AdrenoVK-0: Remote Branch : NONE
03-07 20:02:55.296 31095 26374 I AdrenoVK-0: Reconstruct Branch : NOTHING
03-07 20:02:55.296 31095 26374 I AdrenoVK-0: Build Config : S P 10.0.7 AArch64
03-07 20:02:55.296 31095 26374 I AdrenoVK-0: Driver Path : /vendor/lib64/hw/vulkan.adreno.so
03-07 20:02:55.321 31095 26374 I AdrenoGLES-0: QUALCOMM build : 8e5405b, I57aaec3440
03-07 20:02:55.321 31095 26374 I AdrenoGLES-0: Build Date : 05/21/21
03-07 20:02:55.321 31095 26374 I AdrenoGLES-0: OpenGL ES Shader Compiler Version: EV031.32.02.10
03-07 20:02:55.321 31095 26374 I AdrenoGLES-0: Local Branch : mybranchebba1dbe-451b-f160-ac81-1458d0b52ae8
03-07 20:02:55.321 31095 26374 I AdrenoGLES-0: Remote Branch : quic/gfx-adreno.lnx.1.0.r135-rel
03-07 20:02:55.321 31095 26374 I AdrenoGLES-0: Remote Branch : NONE
03-07 20:02:55.321 31095 26374 I AdrenoGLES-0: Reconstruct Branch : NOTHING
03-07 20:02:55.321 31095 26374 I AdrenoGLES-0: Build Config : S P 10.0.7 AArch64
03-07 20:02:55.321 31095 26374 I AdrenoGLES-0: Driver Path : /vendor/lib64/egl/libGLESv2_adreno.so
03-07 20:02:55.322 31095 26374 I AdrenoGLES-0: PFP: 0x016ee190, ME: 0x00000000
03-07 20:02:55.423 31095 26374 I event crates\bevy_render\src\renderer\mod.rs:128: AdapterInfo { name: "Adreno (TM) 630", vendor: 20803, device: 100859905, device_type: IntegratedGpu, driver: "Qualcomm Technologies Inc. Adreno Vulkan Driver", driver_info: "Driver Build: 8e5405b, I57aaec3440, 1621601959\nDate: 05/21/21\nCompiler Version: EV031.32.02.10\nDriver Branch: mybranchebba1dbe-451b-f160-ac81-1458d0b52ae8\n", backend: Vulkan }
03-07 20:02:56.445 31095 26374 I OboeAudio: openStream() OUTPUT -------- OboeVersion1.7.0 --------
03-07 20:02:56.446 31095 26374 D OboeAudio: AAudioLoader(): dlopen(libaaudio.so) returned 0xf251aacec40aff73
03-07 20:02:56.451 31095 26374 I AAudio : AAudioStreamBuilder_openStream() called ----------------------------------------
03-07 20:02:56.451 31095 26374 I AudioStreamBuilder: rate = 44100, channels = 2, format = 5, sharing = SH, dir = OUTPUT
03-07 20:02:56.451 31095 26374 I AudioStreamBuilder: device = 0, sessionId = -1, perfMode = 10, callback: ON with frames = 0
03-07 20:02:56.451 31095 26374 I AudioStreamBuilder: usage = 1, contentType = 2, inputPreset = 6, allowedCapturePolicy = 0
03-07 20:02:56.451 31095 26374 I AudioStreamBuilder: privacy sensitive = false
03-07 20:02:56.451 31095 26374 D AudioStreamBuilder: build() MMAP not used because AAUDIO_PERFORMANCE_MODE_LOW_LATENCY not requested.
03-07 20:02:56.451 31095 26374 D yengine.exampl: PlayerBase::PlayerBase()
03-07 20:02:56.453 31095 26374 D AudioStreamTrack: open(), request notificationFrames = 0, frameCount = 0
03-07 20:02:56.453 31095 26374 D AudioTrack: set(): streamType -1, sampleRate 44100, format 0x5, channelMask 0x3, frameCount 0, flags #2, notificationFrames 0, sessionId 0, transferType 1, uid -1, pid -1
03-07 20:02:56.472 31095 26374 D AudioTrack: Uid 11069 AudioTrack::setVolume left 1.000000 right 1.000000
03-07 20:02:56.472 31095 26374 D AAudioStream: setState(s#1) from 0 to 2
03-07 20:02:56.481 31095 26374 I AAudio : AAudioStreamBuilder_openStream() returns 0 = AAUDIO_OK for s#1 ----------------
03-07 20:02:56.481 31095 26374 D OboeAudio: AudioStreamAAudio.open() format=2, sampleRate=44100, capacity = 1772
03-07 20:02:56.481 31095 26374 D OboeAudio: calculateDefaultDelayBeforeCloseMillis() default = 21
03-07 20:02:56.481 31095 26374 D OboeAudio: AudioStreamAAudio.open: AAudioStream_Open() returned AAUDIO_OK
03-07 20:02:56.481 31095 26374 D AAudio : AAudioStream_requestStart(s#1) called --------------
03-07 20:02:56.481 31095 26374 D AAudioStream: setState(s#1) from 2 to 3
03-07 20:02:56.481 31095 26374 D AudioTrack: ClientUid 11069 AudioTrack::start
03-07 20:02:56.581 31095 26374 D yengine.exampl: PlayerBase::start() from IPlayer
03-07 20:02:56.581 31095 26374 D AAudio : AAudioStream_requestStart(s#1) returned 0 ---------
03-07 20:02:56.581 31095 26339 D AudioStreamLegacy: onAudioDeviceUpdate() devId 3 => 3
03-07 20:02:56.582 31095 26339 D AudioStreamLegacy: onAudioDeviceUpdate() devId 3 => 3
03-07 20:02:56.585 31095 26374 E event crates\bevy_gilrs\src\lib.rs:32: Failed to start Gilrs. Gilrs does not support current platform.
03-07 20:02:56.587 31095 26374 W log event: TODO: forward onStart notification to applicationlog.target = "winit::platform_impl::platform"; log.module_path = "winit::platform_impl::platform"; log.file = "C:\\Users\\vidal\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\winit-0.28.2\\src\\platform_impl\\android\\mod.rs"; log.line = 449;
03-07 20:02:56.607 31095 31095 I OPFD_Manager: Dark? false, OP Force ? false
03-07 20:02:56.607 31095 31095 V ViewRootImpl: The specified message queue synchronization barrier token has not been posted or has already been removed
--------- beginning of perf
03-07 20:02:56.624 31095 31095 I 309 : package:org.bevyengine.example took:1779 calssname:android.app.ActivityThread$H callback:null what:159
03-07 20:02:56.650 31095 26374 I event crates\bevy_winit\src\system.rs:51: Creating new window "Bevy App" (0v0)
03-07 20:02:56.657 31095 26383 I event crates\bevy_diagnostic\src\system_information_diagnostics_plugin.rs:130: SystemInfo { os: "Android 11 ONEPLUS A6003", kernel: "4.9.227-perf+", cpu: "", core_count: "8", memory: "7.5 GiB" }
03-07 20:02:56.674 31095 31095 D DecorView: onWindowFocusChangedFromViewRoot hasFocus: true, DecorView@ab1792b[NativeActivity]
03-07 20:02:56.677 31095 26431 D AAudioStream: setState(s#1) from 3 to 4
03-07 20:02:56.677 31095 31095 D ViewRootImpl[NativeActivity]: windowFocusChanged hasFocus=true inTouchMode=true
03-07 20:02:56.956 31095 26374 I Gralloc4: mapper 4.x is not supported
03-07 20:02:56.957 31095 26374 W Gralloc3: mapper 3.x is not supported
03-07 20:02:56.968 31095 26374 W Gralloc4: allocator 3.x is not supported
03-07 20:02:56.975 31095 26374 W Gralloc3: allocator 3.x is not supported
--------- beginning of crash
03-07 20:02:58.335 31095 26382 F libc : Fatal signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0x8 in tid 26382 (Compute Task Po), pid 31095 (yengine.example)
```
It was stated in 0.10.0 that Android builds should be mostly fine, what am I missing ?
Thank you in advance.
Edit: typos
Contributor guide
Assessment
This issue has not been assessed yet.