hello_world_android_egui icon indicating copy to clipboard operation
hello_world_android_egui copied to clipboard

immediate crash when executing compiled APK

Open crabdancing opened this issue 1 year ago • 3 comments

You can find the relevant logs here. Note that the test device in question is a Pixel 6a running Graphene OS with Android version 14. I ran the application several times in quick succession, and each time it just immediately closed.

Here is the key relevant snippit:

(std::sys::pal::unix::abort_internal::hf3d69b9b37d787e3+8)
(std::panicking::rust_panic_with_hook::hc29e1a472e6ef851+828)
(std::panicking::begin_panic_handler::_$u7b$$u7b$closure$u7d$$u7d$::h2b4f9210102bef7c+88)
(std::sys::backtrace::__rust_end_short_backtrace::hb348b0483fe29366+8)
(rust_begin_unwind+40)
(core::panicking::panic_nounwind_fmt::hc03c55581afbd5c5+44)
(core::panicking::panic_nounwind::h24a49d684808e46f+56)
(core::slice::raw::from_raw_parts::precondition_check::h5cddddaa92262cf8+244)
(core::slice::raw::from_raw_parts::h1183b85ae4e3715a+48)
(android_activity::activity_impl::glue::WaitableNativeActivityState::new::hb7a700687cb34c43+108)
(android_activity::activity_impl::glue::NativeActivityGlue::new::hc1ca47e24e663f60+40)
(android_activity::activity_impl::glue::ANativeActivity_onCreate::_$u7b$$u7b$closure$u7d$$u7d$::h9a122cea80b781a0+132)
(_$LT$core..panic..unwind_safe..AssertUnwindSafe$LT$F$GT$$u20$as$u20$core..ops..function..FnOnce$LT$$LP$$RP$$GT$$GT$::call_once::h9f37977778ac5cb3+32)
(std::panicking::try::do_call::hb848eb6092f1417c+64)
(__rust_try+24)
(std::panicking::try::h82f979c8ee8005bc+68)
(std::panic::catch_unwind::h75603fcd5a7dedbb+4)
(android_activity::util::abort_on_panic::hcfc06e3581ad3467+32)
(ANativeActivity_onCreate+48)

So the Rust .so is panicking, but I'm not sure why.

crabdancing avatar Jun 19 '24 19:06 crabdancing

Seems like it is https://github.com/rust-mobile/android-activity/issues/153 I got the same error trying apk on both my devices.

I think we should wait until egui will support winit 0.30 which depends on android-activity 0.6 where this bug is fixed.

inferrna avatar Jun 20 '24 18:06 inferrna

That's unfortunate. I guess let me know if you get it working! I have plans to turn this into a template with a fully automatic Nix-based build process.

crabdancing avatar Jun 23 '24 02:06 crabdancing

I created branch develop where the issue seems to be fixed (at least it works on my device). Not in master because it uses egui from git.

inferrna avatar Sep 12 '24 06:09 inferrna

Fixed in master

inferrna avatar Oct 10 '24 16:10 inferrna