-
Notifications
You must be signed in to change notification settings - Fork 112
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Command line executable panicks when using ndk-glue / NativeActivity Code #126
Comments
If you are not compiling an Android app - that is inherently forced to use
if you however need access to Android Activity logic, circumvent
|
For what it's worth, even without stacktrace this is relatively easy to debug. The error includes all necessary information: Which is only ever assigned once, when the native activity is set up: To answer your question, nothing calls calls |
@szsoftware Any extra context that we can use to help you resolve this issue? Inclined to close otherwise. |
Hi there! Thanks for the reminder. I will push my investigation on this issue on highest priority, since I'm urging for any developments regarding this issue/battlefield (tectonic on Android). |
Closing due to inactivity. Feel free to reopen if more information is available. |
Dear All, |
If anyone can get a full backtrace of the Tectonic crash that is causing this panic, I think that would still be helpful for solving the reported problem — although my impression is that it's unlikely to represent a bug in this repo. I don't know Android at all, but it sounds like maybe some aspect of Tectonic's dependency tree is turning on stuff that is expecting it to have GUI features, when it doesn't? I feel like maybe we need to add a |
@pkgw That observation is entirely correct. As replied in tectonic-typesetting/tectonic#926 (comment) this is most likely caused by a transitive dependency assuming an Android app - started through We'd have to come up with a more global/accepted solution for this, even though Termux appears to be one of the only/few bits of software that wouldn't want their code to be assuming / defaulting to Android App behaviour. |
Hi there,
following scenario:
An executable compiled with android/termux framework/toolchain panicks with code that points to some Activity logic.
thread 'main' panicked at 'called
Option::unwrap()
on aNone
value', /home/builder/.cargo/registry/src/github.com-1ecc6299db9ec823/ndk-glue-0.2.1/src/lib.rs:42:39Of course there is a NPE since there is no gui application, respectively Activity/Looper involved (the executable is called from adb-shell or via System.exec("myRustExecutable someInput") ).
So several questions: How can I compile the whole thing to hunt down the error, so I can patch that call out?
How can I otherwise omit/circumvent this piece of gui code?
If I only had a full stacktrace, I would look into the calling code, but I have no idea when the ndk calls ndk-glue.
Due to this massive crosscompiling toolchain involved I have no clue how to debug anything.
Thanks for your help!
The text was updated successfully, but these errors were encountered: