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]: cbz with corrupted image inside freezes app #204

Open
1 task done
dajotim937 opened this issue Feb 17, 2024 · 11 comments
Open
1 task done

[Bug]: cbz with corrupted image inside freezes app #204

dajotim937 opened this issue Feb 17, 2024 · 11 comments
Assignees
Labels

Comments

@dajotim937
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.1.0 (well, I'm using your custom test build for me)

Operating System

Win10, 22H2, build 19045

Steps to reproduce

  1. Add cbz with corrupted image
  2. Open OpenComic

Expected Behavior

Probably like Honeyview that shows all images except broken one.

Actual Behavior

App freezes

Error message

No response

Additional Information

No response

Sample file

No response

@dajotim937 dajotim937 added the bug label Feb 17, 2024
@ollm ollm self-assigned this Mar 25, 2024
@ollm
Copy link
Owner

ollm commented Mar 25, 2024

Can you send me the CBZ file that is causing the bug? oleguer.llopart.mora@gmail.com

@dajotim937
Copy link
Author

Done.

@ollm
Copy link
Owner

ollm commented Mar 27, 2024

I have fixed the freezing problem when opening corrupt cbz files 05eefb3, but I have not been able to partially read the contents of the file that you have sent me, at least with unzipper, I could try to try a different node package, since I have tried with different applications and some of them partially open the file.

Build with fix: https://mega.nz/file/zXglnC7R#YnHNrUcUOLOAbTSUBPHwo9GwRjt-vB88cL3yJ6GsXiY

If you can check if the following error has also been fixed #194 (comment)

@dajotim937
Copy link
Author

I could try to try a different node package, since I have tried with different applications and some of them partially open the file.

From what I saw, Honeyview and 7zip both can see 28 normal images+1 corrupted.
I tested with cbz I sent to you and tried recreate situation from #194 (comment) and so far there is no app freeze and\or error messages. For situation from comment there is usually long\infinite loading, sometimes it shows that it can't unzip file.

@ollm
Copy link
Owner

ollm commented Mar 27, 2024

Thanks for mentioning that it works in 7zip.

I have changed the default extraction for zip files to 7z d07feac and now all 28 images are extracted +1 corrupted, it also slightly increases performance in extracion zip files in general.

Build: https://mega.nz/file/rSQjxDZC#KhQjUtQHk6KpZc7xvndzShe9uCsSDx4cEsj218HFYlU

@ollm
Copy link
Owner

ollm commented Mar 27, 2024

Something I forgot to mention is that you may have to delete the cache, since OpenComic will use the previously generated cache when reading the file.

@dajotim937
Copy link
Author

I usually just create new folder with testN, where N = 1,2,3.... It do the trick with cache.
With cbz file, yeah it shows 28+1 images. And there is error notification about wrong CRC, however I think it should shows every time when corrupted cbz is opened, not only first time.

@ollm ollm closed this as completed Mar 29, 2024
@dajotim937
Copy link
Author

While there is notification when you open file, there is also notification every time when you open folder with cbz files, when one cbz is corrupted. The issue is that the message is Error when unzipping: unknown error. when you didn't open corrupted file yet and Error when unzipping: CRC failed : **.jpg when you opened file once(which means there is cache of file). And when you open folder with cbz files you can't understand which file is corrupted, but notification is showed just when you opened folder, not file.

2024-03-29_19-57-14.mp4

@ollm
Copy link
Owner

ollm commented Mar 31, 2024

I've improved a little how this is handled, note that once a compressed file has been extracted, the next times it will be accessed from the cache/tmp, currently I save the last error message in the cache to continue showing it, but it does not always work as expected.

Extract corrupt file show first error message: b95de2c
Separate compressed error messages of different files 3d77bb3

Build: https://mega.nz/file/nbQUlDIJ#iVhuBj0ES_H4VUCR0Kl36l980bmSBkYmKKmNpt0anpA

@dajotim937
Copy link
Author

dajotim937 commented Apr 4, 2024

but it does not always work as expected.

Current situation for me: error is not shown anymore if I open folder. However, I have one corrupted cbz, but error is shown for every cbz in folder (UPD: first time it has been shown presumably for every cbz, after clearing cache and tmp it's shown for some unrelated uncorrupted cbz, but isn't for others), and for corrupted cbz (which contains corrupted image) error is shown 2 times.

@ollm
Copy link
Owner

ollm commented Apr 5, 2024

I'm going to reopen this, since I've only tested it with the corrupt file and not alongside other files.

@ollm ollm reopened this Apr 5, 2024
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