[Bug]: "The source image cannot be decoded" and sidebar thumbnails not shown
Preflight Checklist
- [x] I have searched the issue tracker for a bug report that matches the one I want to file, without success.
OpenComic Version
1.4.1.master.6fe5358
Operating System
Windows 10 Version 22H2 (Build 19045.3324)
Installed via
exe
Steps to reproduce
Open certain files
Expected Behavior
No errors and sidebar thumbnails can be shown.
Actual Behavior
"The source image cannot be decoded" and sidebar thumbnails not shown
Error message
Uncaught (in promise) EncodingError: The source image cannot be decoded.
C:\Program Files\OpenComic\resources\app.asar\scripts\file-manager.js:1094 readCompressed | 7z (cbz) | D:\Komga\Storyarc\SA_D\1.cbz: 34.638916015625 ms
C:\Program Files\OpenComic\resources\app.asar\scripts\file-manager.js:1351 extractCompressed | 7z (cbz) | (2 files) D:\Komga\Storyarc\SA_D\1.cbz: 459.464111328125 ms
Additional Information
Please remove the zip extension of the attached sample file
Sample file
I can't reproduce the issue with the sample file.
Is it still happening? I see the image is displayed on the right side, maybe the error is caused by another file.
I can't reproduce the issue with the sample file.
Is it still happening? I see the image is displayed on the right side, maybe the error is caused by another file.
Try this large file : https://www.filemail.com/d/mgjyaypduvahkbs
C:\Program Files\OpenComic\resources\app.asar\scripts\file-manager.js:1351 extractCompressed | 7z (cbz) | (490 files) D:\Komga\Storyarc\SA_D\霸佔人妻\霸佔人妻 1-8話.cbz: 2411.43603515625 ms
[Violation] Forced reflow while executing JavaScript took 41ms
C:\Program Files\OpenComic\resources\app.asar\node_modules\jquery\dist\jquery.js:4997 [Violation] Added non-passive event listener to a scroll-blocking 'mousewheel' event. Consider marking event handler as 'passive' to make the page more responsive. See https://www.chromestatus.com/feature/5745543795965952
add @ C:\Program Files\OpenComic\resources\app.asar\node_modules\jquery\dist\jquery.js:4997
(anonymous) @ C:\Program Files\OpenComic\resources\app.asar\node_modules\jquery\dist\jquery.js:4897
each @ C:\Program Files\OpenComic\resources\app.asar\node_modules\jquery\dist\jquery.js:383
each @ C:\Program Files\OpenComic\resources\app.asar\node_modules\jquery\dist\jquery.js:205
on @ C:\Program Files\OpenComic\resources\app.asar\node_modules\jquery\dist\jquery.js:4896
on @ C:\Program Files\OpenComic\resources\app.asar\node_modules\jquery\dist\jquery.js:5736
read @ C:\Program Files\OpenComic\resources\app.asar\scripts\reading.js:4952
openComic @ C:\Program Files\OpenComic\resources\app.asar\scripts\dom.js:2709
C:\Program Files\OpenComic\resources\app.asar\node_modules\jquery\dist\jquery.js:4997 [Violation] Added non-passive event listener to a scroll-blocking 'mousewheel' event. Consider marking event handler as 'passive' to make the page more responsive. See https://www.chromestatus.com/feature/5745543795965952
add @ C:\Program Files\OpenComic\resources\app.asar\node_modules\jquery\dist\jquery.js:4997
(anonymous) @ C:\Program Files\OpenComic\resources\app.asar\node_modules\jquery\dist\jquery.js:4897
each @ C:\Program Files\OpenComic\resources\app.asar\node_modules\jquery\dist\jquery.js:383
each @ C:\Program Files\OpenComic\resources\app.asar\node_modules\jquery\dist\jquery.js:205
on @ C:\Program Files\OpenComic\resources\app.asar\node_modules\jquery\dist\jquery.js:4896
on @ C:\Program Files\OpenComic\resources\app.asar\node_modules\jquery\dist\jquery.js:5736
read @ C:\Program Files\OpenComic\resources\app.asar\scripts\reading.js:4964
openComic @ C:\Program Files\OpenComic\resources\app.asar\scripts\dom.js:2709
C:\Program Files\OpenComic\resources\app.asar\node_modules\jquery\dist\jquery.js:4997 [Violation] Added non-passive event listener to a scroll-blocking 'touchmove' event. Consider marking event handler as 'passive' to make the page more responsive. See https://www.chromestatus.com/feature/5745543795965952
add @ C:\Program Files\OpenComic\resources\app.asar\node_modules\jquery\dist\jquery.js:4997
(anonymous) @ C:\Program Files\OpenComic\resources\app.asar\node_modules\jquery\dist\jquery.js:4897
each @ C:\Program Files\OpenComic\resources\app.asar\node_modules\jquery\dist\jquery.js:383
each @ C:\Program Files\OpenComic\resources\app.asar\node_modules\jquery\dist\jquery.js:205
on @ C:\Program Files\OpenComic\resources\app.asar\node_modules\jquery\dist\jquery.js:4896
on @ C:\Program Files\OpenComic\resources\app.asar\node_modules\jquery\dist\jquery.js:5736
read @ C:\Program Files\OpenComic\resources\app.asar\scripts\reading.js:5294
openComic @ C:\Program Files\OpenComic\resources\app.asar\scripts\dom.js:2709
C:\Program Files\OpenComic\resources\app.asar\node_modules\jquery\dist\jquery.js:4944 [Violation] Handling of 'mousewheel' input event was delayed for 156 ms due to main thread being busy. Consider marking event handler as 'passive' to make the page more responsive.
index.html:1 Uncaught (in promise) EncodingError: The source image cannot be decoded.
I still can't reproduce the issue. The only thing I can think of is that the image is not completely written to disk when it is opened.
I have improved the checks that are made when extracting files e3b2cfa252abed8a8432801604132c831b349f47
Build: https://mega.nz/file/vHxz3BpT#7ozuQ6SBseVcI-KcTV9PhFDyI1Q8PaDqPWnDBUitcXc
If it still doesn't work, I recommend trying to clear the cache and temporary files from the OpenComic settings.
I still can't reproduce the issue. The only thing I can think of is that the image is not completely written to disk when it is opened.
I have improved the checks that are made when extracting files e3b2cfa
Build: https://mega.nz/file/vHxz3BpT#7ozuQ6SBseVcI-KcTV9PhFDyI1Q8PaDqPWnDBUitcXc
If it still doesn't work, I recommend trying to clear the cache and temporary files from the OpenComic settings.
Sidebar thumbnails are shown now ! Thanks for your hardworking ! This new build really works.
New version not totally prevent this and "cLear cache for every single new cbz file" solved everything about this. Maybe third-party plugins slowed / stuck sth:
I installed WebP-Codec-for-Windows & Icaros Shell Extensions
Xanashi/Icaros: Official issue tracker and download location for Icaros Shell Extensions
You can test them in a virtual machine with opencomic
These codecs shouldn't affect OpenComic.
If clearing the cache solves the problem, it's most likely because the cache was generated by the previous version of OpenComic and doesn't yet contain the file size reported by 7zip. This size is used to check whether the file has been fully written to disk or not.
You can force a complete cache deletion from the settings. If you continue to have this issue, then it may be something else, or the isFullyWrittenToDisk check might be failing.
https://github.com/ollm/OpenComic/blob/ad1f831710ce7a50b6cf73d7a18dc7fff07d6157/scripts/file-manager.js#L1788-L1803
Closing this, since the fix is now available in v1.6.0