-
-
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 opening KOReader on Kindle legacy (K3) #6024
Crash opening KOReader on Kindle legacy (K3) #6024
Comments
Could this be related to Kindle dithering or something @NiLuJe ?
|
Hmm, nope, I'm fairly sure I have a 2020.something running on my end... There was a drive-by build fix for... something during the PB TC switch, though, I'll double-check.... |
Yeah, currently have 2020.01-28 running on the K3, will double-check newer builds ;). |
Huh. Can't reproduce with 2020.03-23 (i.e., latest nightly) on a K3 on FW 3.4.3 setup in en_US. |
Okay, scratch that. It does crash as soon as I hit a folder with an ePub in it ;). |
Strangely enough, only happens in view modes with metadata parsing. Classic mode is fine, and opening the book works just fine... o_O Any ideas, @poire-z? (I'll be trying a debug build to poke at the backtrace). |
No idea. Try a CoverBrowser mode without cover image (Mosaic with text covers, Detailed...no images), to see if its thumbnail related. |
Nope, both of thoses crash, too. So, really metadata parsing :s. |
So, Classic mode > Hold > Book information (where we get the metadata too) ? |
Maddeningly enough, that works ;). (There's no "view cover fullscreen" entry, though). |
Open that EPUB > Book status (which fetches the cover)? |
(I have "Cover image" at the bottom of "Book information" , even in Classic mode.) |
That works, too. I don't, it's basically
:? |
Bad news: it works with xtext disabled :s. |
Hi guys, Let me know if there's anything I can test on my Kindle that might help you. BTW, I forgot to say on the first post but my Kindle has the same config as @NiLuJe "K3 on FW 3.4.3 setup in en_US". |
(Yeah, FWIW, my test folder has one ePub and one PDF :D). |
@poire-z: Weirder, still: it crashes with xtext enabled if there's metadata to populate, but if I do that without xtext, then re-enable xtext, it'll display everything just fine. (With the requisite restarts in between, ofc). o_O. |
Well, backtrace plaese, so we can stop guessing :) |
Didn't we have something similar, suspecting xtext/harfbuzz, and you solve it with switching something related to "atomic" somewhere ? found it: koreader/koreader-base#1046 |
Yep, that was koreader/koreader-base#1046 |
It doesn't crash in a debug build. -_-". (Currently checking what happens with an unstripped release build). |
Oh, fun fact about my earlier "it works on 2020.01-28" comment: that was also a debug build :D (from #1046). |
Hmm, still appears to be HB shenanigans... It's currently failing to parse encrypted AZW, and face-planting with something along the lines of
(That's an LTO build, so, slightly more aggressive optimizations than the build bots. Will check with a tamer build...). |
Gah, debug builds not failing is the worst. We don't use potentially unsafe optimizations, do we? |
Not really, I'm trying a few things, but even just swapping out HB/XText is not enough to make it behave. The only sure-fire way to have it behave I have found so far is to disable xtext :/. |
swapping out HB/XText is not enough != found so far is to disable xtext ? still always crashing (segfault?) at hb_shape_plan_reference ? (an inline function that involves hb_atomic_int_t, that should have been wrapped by simple macros after koreader/koreader-base#1046...) |
(I meant swapping out the release libs for debug libs. Still crashes. Haven't yet tried adding CRe (shim and/or actual lib) to the list). Yep. I also got a slightly different bt once:
But that one was pooossibly because I fudged my unzip command and I used the old 2020.01 debug zip I still had on hand :D. |
Okay, yeah, when I don't use a completely random zip I had laying around, just swapping out libharbuzz for a debug build "works".
|
A plain old no fuss no muss |
Note that Going to try |
-O1 also crashes. -_-". Swapping only HB for an -Og build still does the trick. Will try reverting #1046, for science. |
Might be as easy as forcing (Fine with me, dunno how popular Kindle legacy are among arabic readers that might miss it.) |
Well, given that it currently crashes instantly, nobody's going to be missing anything, really ^^. It'll be 10 years old soon, it's basically a terrible device by today's standards. |
Fun fact: I tried a debug build with koreader/koreader-base#1046 reverted, and I realized that I don't even see the atomics stuff in the backtrace if I simply attach gdb to the process. Letting the kernel create a coredump instead yields a slightly more verbose backtrace, where I do see the atomics stuff... |
Which means that, magic, with 1046 reverted, this also crashes in a fashion eerily similar to the one 1046 worked around...
|
TL;DR: There's something rotten in the state of Denmark. I'll stop banging my head on the wall and just disable xtext there. Might be worth taking a look with the next HB version, but I wouldn't hold my breath. |
atomics stuff, too.
Another option to try would be to compile HB on K5 without all the atomic stuff (HB_NO_MT, or HB_TINY). |
Because apparently stuff blows up in weird and interesting ways for... reasons. Might be relevant on older PB devices, too? Re koreader#5780 Closes koreader#6024
IIRC, HB_NO_MT basically disables atomics and... possibly one other thing. (EDIT: mutexes. Duh.) Granted, it's probably cleaner than my dirty, dirty patch. I'll give it a go. (FYI: K5 is unaffected, they're all running on armv7, like Kobos ;)). |
Hmm, HB_TINY appears to help... Double-checking, and then checking w/ only HB_NO_MT :). |
Hmm, HB_TINY may be sneakily asking GCC/Clang to use |
Yep, confirmed success w/ HB_TINY. Now checking w/ HB_NO_MT and/or HB_NO_MT + -Os |
Success w/ HB_NO_MT :). |
* Ditch thread-safety in HB on LEGACY & PB to avoid weird atomics issues on armv6 koreader/koreader#6024 koreader/koreader#5780 * Don't ship glib on Kindle High kablooey potential, because we pull liblipc, which depends on it and libgthread, so we'd be mixing glib versions between the two... Regression since #1048
Issue
After using previous version for a while (2019.2) I tried to update to the latest version with no luck.
I tested latest stable and nightly (also other 2019 releases), but none works. (Unless I rollback to 2019.02)
Tried clean and dirty install, but it keeps crashing while jumping on the File Browser.
At last but not least, many thanks for your work =)
Steps to reproduce
Clean Install latest KOReader on Kindle 3 (nightly or stable)
Run KOReader from KUAL:
Clean install:
It will display the quickstart, but after closing it and trying to display the file browser it will crash.
Dirty install (or after first try with clean install):
File browser will also crash.
crash.log
crash.log
The text was updated successfully, but these errors were encountered: