-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
KOReader v2021.01 crashes on Boox Carta+ #7193
Comments
Nightmode is enabled? If so, c.f., the tail end of #7187 ;). if not, still going to need actual logs ^^. |
pinging @plague-doctor ^^ |
|
@plague-doctor: thanks! is that Android 4.0/4.1? |
Android 4.2.2 (kernel: 3.0.36+) |
Cool! Now It shouldn't hurt force-loading on init, using |
@plague-doctor: https://www.dropbox.com/s/ust0rylaejkuqay/koreader-android-arm-v2020.12-129-ga5768c74_2021-01-24.apk?dl=0 Uninstall APK before installing this one, as signatures are different. Please report if it works or not (I hope it works, if not it will be pain 😭) Anyways, remember to uninstall the APK before installing again from github, for the same reason. |
LuaJIT also requires libm, in case that matters for what you're trying ;). |
@pazos: Would https://github.com/KeepSafe/ReLinker help in this context? (e.g., libluajit is currently a DT_NEEDED in libluajit-launcher, and that's broken only on the most broken of broken Android linkers ^^). |
nope - doesn't work:
|
the diff: diff --git a/app/src/main/java/org/koreader/launcher/MainActivity.kt b/app/src/main/java/org/koreader/launcher/MainActivity.kt
index 768f2ed..0310025 100644
--- a/app/src/main/java/org/koreader/launcher/MainActivity.kt
+++ b/app/src/main/java/org/koreader/launcher/MainActivity.kt
@@ -65,7 +65,9 @@ class MainActivity : NativeActivity(), JNILuaInterface,
}
}
-
+ init {
+ System.loadLibrary("luajit-launcher")
+ }
companion object {
private const val TAG_MAIN = "MainActivity" That happens before starting native code, so when https://android.googlesource.com/platform/frameworks/base.git/+/master/core/java/android/app/NativeActivity.java#170 happens the |
Yeah, that's definitely broken on some early, early Android linkers (either because of the dependency resolving issue, or, in the specific case of embedding an interpreted language or something fancy, because DT_NEEDED entries are not loaded in the global scope). |
Well, the error is different. Probably is a matter of trying diff --git a/app/src/main/java/org/koreader/launcher/MainActivity.kt b/app/src/main/java/org/koreader/launcher/MainActivity.kt
index 768f2ed..aa56169 100644
--- a/app/src/main/java/org/koreader/launcher/MainActivity.kt
+++ b/app/src/main/java/org/koreader/launcher/MainActivity.kt
@@ -65,7 +65,10 @@ class MainActivity : NativeActivity(), JNILuaInterface,
}
}
-
+ init {
+ System.loadLibrary("luajit")
+ System.loadLibrary("luajit-launcher")
+ } Or, yep use ReLinker as NiLuJe said. But I would try first to load luajit direclty and see if that works. libm is part of the public API? In that case is part of the classloader and shouldn't be a problem to load it. |
Yeah, libm is also in the DT_NEEDED of both luajit-launcher & luajit, so, one would hope it "works", but, who knows ^^. (At which point you can just add |
Thanks to dropbox binary diffing here's the new test build: https://www.dropbox.com/s/ust0rylaejkuqay/koreader-android-arm-v2020.12-129-ga5768c74_2021-01-24.apk?dl=0 I do hope that, at least, it took 2 seconds to upload :p |
👍 This version works fine :-) |
Great!!! For the sake of completeness, does this version works too? https://www.dropbox.com/s/ust0rylaejkuqay/koreader-android-arm-v2020.12-129-ga5768c74_2021-01-24.apk?dl=0 diff --git a/app/src/main/java/org/koreader/launcher/MainActivity.kt b/app/src/main/java/org/koreader/launcher/MainActivity.kt
index 768f2ed..e3becb6 100644
--- a/app/src/main/java/org/koreader/launcher/MainActivity.kt
+++ b/app/src/main/java/org/koreader/launcher/MainActivity.kt
@@ -65,7 +65,9 @@ class MainActivity : NativeActivity(), JNILuaInterface,
}
}
-
+ init {
+ System.loadLibrary("luajit")
+ }
companion object {
private const val TAG_MAIN = "MainActivity" Thanks for all your testing! |
@plague-doctor ^^ 🥇 |
Sorry for a delay. Yep, this one works fine too. 🎉 |
* Bump base koreader/koreader-base#1293 koreader/koreader-base#1294 Fix #7187 * Bump android-luajit-launcher koreader/android-luajit-launcher#289 koreader/android-luajit-launcher#292 Fix #7193
Issue
KOReader crashes when starting.
Steps to reproduce
Version koreader-android-arm-v2020.12 works with no problem.
The text was updated successfully, but these errors were encountered: