fredrik-hammar / egui-android-demo

My attempt at getting latest version of the egui demo to work on Android
8 stars 3 forks source link

app crash #20

Open Junffzz opened 3 months ago

Junffzz commented 3 months ago

thread '' panicked at library/core/src/panicking.rs:156:5: 2024-05-22 16:57:38.637 20684-20704 RustStdoutStderr com.example.egui_android_demo I unsafe precondition(s) violated: slice::from_raw_parts requires the pointer to be aligned and non-null, and the total size of the slice not to exceed isize::MAX 2024-05-22 16:57:38.637 20684-20704 RustStdoutStderr com.example.egui_android_demo I note: run with RUST_BACKTRACE=1 environment variable to display a backtrace 2024-05-22 16:57:38.637 20684-20704 RustStdoutStderr com.example.egui_android_demo I thread caused non-unwinding panic. aborting.

fredrik-hammar commented 3 months ago

platform: xiaomi mobile, android 14

after build apk,install the app.while open the app,it crash.

Copying the note from #19 here.

fredrik-hammar commented 3 months ago

Thank you for reporting. I don't think I can help you much as it looks like the error happens before this line where RUST_BACKTRACE is set.

https://github.com/fredrik-hammar/egui-android-demo/blob/475a03665a6a7ac10c250cb3595d71949db31dab/src/lib.rs#L11

I don't know how xbuild, winit sets up the call to android_main.

fredrik-hammar commented 2 months ago

This is happening to me as well now. On older versions as well. I wonder if it's due to an Android update.