foobnix / LibreraReader

Book Reader for Android
http://librera.mobi
Other
2.91k stars 309 forks source link

[bug] Crash when switching away from librerareader and back #1282

Open 5225225 opened 4 months ago

5225225 commented 4 months ago

This appears to happen with any book type, but I can reproduce it easily with a .txt book with just the content hello, so I doubt this is anything to do with the content.

It happens when I use the "switch app" button, the window for the app turns transparent and when i switch back, I get taken to my launcher, the app closed

Attached is the crash.txt in Librera after wiping my profile and clearing app data, then triggering the crash, but the relevant exception seems to be

java.lang.IllegalArgumentException: Unsupported pixel format
    at android.graphics.pdf.PdfRenderer$Page.render(PdfRenderer.java:397)
    at com.foobnix.tts.TTSEngine$$ExternalSyntheticApiModelOutline0.m(Unknown Source:0)
    at com.foobnix.sys.ImageExtractor.coverPDFNative(ImageExtractor.java:251)
    at com.foobnix.sys.ImageExtractor.proccessCoverPage(ImageExtractor.java:349)
    at com.foobnix.sys.ImageExtractor.getStreamInner(ImageExtractor.java:687)
    at com.foobnix.sys.ImageExtractor.getStream(ImageExtractor.java:586)
    at com.foobnix.sys.LibreraAppGlideModule$1$1.loadData(LibreraAppGlideModule.java:64)
    at com.bumptech.glide.load.engine.SourceGenerator.startNextLoad(SourceGenerator.java:95)
    at com.bumptech.glide.load.engine.SourceGenerator.startNext(SourceGenerator.java:88)
    at com.bumptech.glide.load.engine.DecodeJob.runGenerators(DecodeJob.java:311)
    at com.bumptech.glide.load.engine.DecodeJob.runWrapped(DecodeJob.java:280)
    at com.bumptech.glide.load.engine.DecodeJob.run(DecodeJob.java:235)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:644)
    at com.bumptech.glide.load.engine.executor.GlideExecutor$DefaultThreadFactory$1.run(GlideExecutor.java:424)
    at java.lang.Thread.run(Thread.java:1012)
    at com.bumptech.glide.load.engine.executor.GlideExecutor$DefaultPriorityThreadFactory$1.run(GlideExecutor.java:383)

crash.txt

I'm running the latest version from fdroid, 8.9.175-fdroid (1.24.1-fdroid). This happens with a completely fresh install. My device is a Pixel 6a (fully up to date with security/google play updates at the time of writing).