Skip to content
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

[Bug]: Infinite Loading when opening PNG images in a folder #315

Open
1 task done
SeanTheExtraGuy opened this issue Jan 6, 2025 · 5 comments
Open
1 task done
Assignees
Labels
Milestone

Comments

@SeanTheExtraGuy
Copy link

Preflight Checklist

  • I have searched the issue tracker for a bug report that matches the one I want to file, without success.

OpenComic Version

1.3.1

Operating System

Windows 11 (23H2)

Installed via

Portable and Install Version

Steps to reproduce

  1. Open a folder (in my case a manga or doujin) that has pngs as the pages. The thumbnails load in the folder view.
  2. Click on the first image or any page in the folder
  3. Doesn't load and just infinitely cycles. Thumbnails on the left load, but not the main image display
    Screenshot 2024-12-29 194125

Expected Behavior

Opens the image set like any other with whatever page layout settings I choose.

Actual Behavior

Loads infinitely, no matter what settings I change either through the main settings or even page layout

Error message

None

Additional Information

This seems to happen with PNGs, though not all folders are affected. I can also set the cover image for that folder without issue. These files open fine in image viewer/editor programs and display correctly in windows explorer.
Clearing cache didn't seem to do anything.

Sample file

No response

@ollm ollm self-assigned this Jan 6, 2025
@ollm ollm added this to the v1.3.2 milestone Jan 6, 2025
@ollm
Copy link
Owner

ollm commented Jan 6, 2025

Can you check if there are any errors in the console? (Debug > Toogle DevTools)

It seems to be related to #268

@SeanTheExtraGuy
Copy link
Author

The first error line is at the begining when I start the program
Screenshot 2025-01-08 003015

But opening a folder that has the infinite load bug looks like it's the same issue with "failed to retrieve track metadata"
Screenshot 2025-01-08 001128
Screenshot 2025-01-08 001408
Screenshot 2025-01-08 001845

The second and third image was after zooming in and out the view on the main screen and I somehow managed to discover how to fix the infinite loading but only for like the first few pages as the rest just end up blank, and trying it on another known png image folder that wouldn't load I can't reproduce it now.

Also zooming/scolling in and out of either loaded and displayed or unloaded and blank like the third image, or infinitely loading pages produces these errors. As of right now it's up to 2071 errors...

@ollm
Copy link
Owner

ollm commented Jan 7, 2025

The first error line is at the begining when I start the program

This error is not very important (zstd binary appears to be missing in OpenComic portable windows build), zstd is used to compress some cache files so that they take up less space (json files), if for some reason zstd does not load correctly, OpenComic works just the same but without compressing the cache files.

Also zooming/scolling in and out of either loaded and displayed or unloaded and blank like the third image, or infinitely loading pages produces these errors. As of right now it's up to 2071 errors.

When zooming in the image is re-rendered at the new size, from the error message it seems that chromium is failing to get the image metadata, I'm not sure if it's because the image already has some problem or it occurs after resizing the image in OpenComic to the new size (Using sharp library).

Try disabling image interpolation, to see if the problem is with sharp or with the image itself.

Captura de pantalla 2025-01-07 161907

Also If you can send me any of the manga folders that have the problem to my email so that I can test it locally.
oleguer.llopart.mora@gmail.com

@SeanTheExtraGuy
Copy link
Author

Yeah that seemes to have fixed it. I left those settings at default I'm pretty sure. But they're disabled now and the images in all the known folders that wouldn't work are loading like they should!

Thanks!

@ollm
Copy link
Owner

ollm commented Jan 7, 2025

The default setting is with interpolation enabled (lanczos3, only during downscaling) because it provides better quality compared to when it is disabled (Chromium).

If disabling interpolation resolves the issue, it is most likely that the problem is related to sharp library, sharp is also used for thumbnail generation, the only difference is that in thumbnails the original ICC color profile of the image is not maintained, so this is most likely the cause of the problem.

If possible, please send me some folders or images to reproduce the error locally. This will allow me to investigate the issue further and either resolve it or report it in the sharp repository if it turns out to be a bug in the library.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants