-
-
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
Crash on opening EPUB, HTML or RTF file #10679
Crash on opening EPUB, HTML or RTF file #10679
Comments
Nothing in logcat? |
Where's the build from? |
@benoit-pierre the build is form OTA (unstable channel) |
Is that an ARM or ARM64 device? |
Processor: Aarch64 Processor rev 2 (aarch64) |
I'm going to assume ARM64, out of curiosity, does this build work? |
I can reproduce a crash on loading
|
I'd check with this patch. |
Will do, thanks! (might be in a few hours) |
FWIR, crash would only happen on some EPUB with release builds with LTO, fixed with the above patch. |
@benoit-pierre yes, your build works. (I had to uninstall the old version to install it, otherwise I got error W PackageManager: Package org.koreader.launcher signatures do not match previously installed version; ignoring!) |
Great, hopefully it's because of the aforementioned patch, and not one of the other gazillion changes!:P |
I'm pretty sure the crash was reproducible with the emulator when compiling with clang too, just compile a release build. |
Additionally, I've dropped the mcode reserve hack in luajit-launcher's version of luajit, as I would only get crashes when enabling it. But that was with a newer NDK, and I've not re-checked with NDK23 (that patch is it still disabled in my meson branch). |
Okay, so far, debug build works, so I'm going to try an unstripped release build w/ debug symbols first, for science! |
Far too late, but I can confirm a crash on EPUB. This morning I'd only tried a PDF. Whoops. :-) |
Okay, got a trace ;). I'll test the patch after dinner.
|
Thanks to @ilyats for staying on the bleeding edge and reporting back bugs 👍 |
[…]
This does indeed look like the problem fixed by benoit-pierre@ac500b3. |
^ What was happening with the existing code ? And how your patch shuffling and union'ing everything lstring_chunk solves that issue ? (I did not understand what all this was about when I glanced at your big patch months ago, so it's the occasion for asking :) |
The original code breaks strict aliasing. |
OK, I've just read a bit about it, a bit over my head but I somehow understand the idea. But I won't go try to understand where this bad thing happen in lvstring :) (unless there's an obvious place you can point to ?) |
Yup, that does the trick ;). |
Enabling the debug patch, things look okay so far over here ;). e.g., something like
And on exit
i.e., the target mmap failing, falling back to the reserve, and recycling that ad nauseam. As for what would be going wrong with a different compiler, I could possibly see the linker doing something funky with the reserve array in terms of where it ends up in the binary, so that would be something to look into, but the actual layout of the mappings shouldn't be affected (much) by the compiler/linker, I think? One cannot exclude a stupid issue with the code/logic, though, I did write it after all ;p. |
http://build.koreader.rocks/download/nightly/v2023.06.1-13-ge1ed3a71_2023-07-12/koreader-android-arm-v2023.06.1-13-ge1ed3a71_2023-07-12.apk seems to crash for me ftr Edit: same on x86, but apologies for reporting it here since it's actually unrelated to crengine. |
Hijacking this probably unrelated "crash" issue because I don't know which PR may have caused that.
Dunno if libsharpyuv.so.0 is not build, or just missed being included in the zip? |
My guess would be something related to koreader/koreader-base@290639e but I don't have time to check atm. |
Though I can quickly confirm libsharpyuv.so.0.0.1 exists in the new libwebp build and presumably simply isn't copied. |
OK, a quick rebuild of the updated version of libwebp for arm and copy of libsharpyuv.so.0 to my Kobo makes it work. |
PS I left it implicit since I hadn't investigated but this was also the problem I alluded to above wrt Android. |
Should we remove the nightlies & ota (and which?) ? Dunno how people doing auto updates will recover from updating and not able to start & update to next :/ |
Maybe not a bad idea for the latest. |
I wanted to test Style Tweak notifications with -13, and it crashed upon start on Android, trying to open epub. |
I nuked the nightly zsync files so you'll get a 404 asking for an update to the dev channel. I'll leave the rest wrt libwebp to @NiLuJe or potentially myself in some 5 hours. |
Sharing my kobo-libsharpyuv.so.zip to have its content put in koreader/libs/ for poor Kobo users who would get stuck. |
Newer versions depend on the internal libsharpyuv, ship it. Fix koreader/koreader#10679 (comment)
Newer versions depend on the internal libsharpyuv, ship it. Fix koreader/koreader#10679 (comment)
Issue
Latest build seems to crash whenever trying open an EPUB, HTML or RTF file. PDF and DJVU files can be read without any problems. Sometimes there appears Android message '"KOReader keeps crashing'" with options "App info" "Close app" "Freeze this app", other times Koreader closes quietly. No crash logs produced.
Steps to reproduce
Open an EPUB, HTML or RTF file
The text was updated successfully, but these errors were encountered: