null2264 / yokai

Free and open source manga reader for Android
Apache License 2.0
362 stars 7 forks source link

Split double pages layout causes non double page image to not be loaded the first time #91

Closed sun-wise-man closed 3 weeks ago

sun-wise-man commented 3 weeks ago

Steps to reproduce

  1. Set layout to split double page
  2. Open manga
  3. Page that qualifies as double pages will get split and can be displayed. But page that doesn't qualify will show an error.
  4. Navigate the chapter, previously error page/image now can display an image and no longer show an error.

Expected behavior

Non double page image get shown the first time.

Actual behavior

Page that qualifies as double pages will get split and can be shown. But page that doesn't qualify will show an error for the first time.

https://github.com/null2264/yokai/assets/67572372/edbc2b2b-e4a2-4bd8-a255-d2d882aa0475

Crash logs

I think this is what's causing the error

06-10 12:59:59.826 30070 30310 E SubsamplingScaleImageView: java.lang.IllegalStateException: Image decoder failed to initialize and get image size
06-10 12:59:59.826 30070 30310 E SubsamplingScaleImageView:     at com.davemorrissey.labs.subscaleview.decoder.Decoder.init(Unknown Source:88)
06-10 12:59:59.826 30070 30310 E SubsamplingScaleImageView:     at com.davemorrissey.labs.subscaleview.SubsamplingScaleImageView$TilesInitTask.doInBackground(SourceFile:2)
06-10 12:59:59.826 30070 30310 E SubsamplingScaleImageView:     at com.davemorrissey.labs.subscaleview.SubsamplingScaleImageView$TilesInitTask.doInBackground(SourceFile:1)
06-10 12:59:59.826 30070 30310 E SubsamplingScaleImageView:     at android.os.AsyncTask$3.call(AsyncTask.java:394)
06-10 12:59:59.826 30070 30310 E SubsamplingScaleImageView:     at java.util.concurrent.FutureTask.run(FutureTask.java:264)
06-10 12:59:59.826 30070 30310 E SubsamplingScaleImageView:     at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
06-10 12:59:59.826 30070 30310 E SubsamplingScaleImageView:     at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:644)
06-10 12:59:59.826 30070 30310 E SubsamplingScaleImageView:     at java.lang.Thread.run(Thread.java:1012)

Yōkai version

1.8.3.4

Android version

Android 14

Device

Samsung M23

Other details

No response

Acknowledgements