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

Unknown bug in scanner code causing scan to go on forever. #7

Closed
DuraMorte opened this issue Feb 28, 2020 · 3 comments
Closed

Unknown bug in scanner code causing scan to go on forever. #7

DuraMorte opened this issue Feb 28, 2020 · 3 comments
Labels
bug Something isn't working

Comments

@DuraMorte
Copy link

When scanning a particular folder full of .cbz files, the scanner binds up.

The files do not have consistent names; some look like this:

xxx - Volume_01_[xxx].cbz

And some look like this:

xxx - Volume_27.cbz

The error thrown in terminal looks like this:
Unhandled exception in spawn: Couldn't find directory end signature in the last 65KB (Zip::Error)
from ???
from ???
from ???
from ???
from ???
from ???

Anything I should try, short of renaming everything?

@DuraMorte DuraMorte added the bug Something isn't working label Feb 28, 2020
@DuraMorte
Copy link
Author

Renamed all files to look identical to my second example. No change.

@hkalexling
Copy link
Member

hkalexling commented Feb 28, 2020

It is not a naming problem, and I think the culprit here is that one of the .cbz files is corrupted.

Basically a .cbz file is just a zip archive containing some images, and all Mango (and any cbz reader) does is unzip the file in memory and read the content. When the file is corrupted or is not a valid zip file, it cannot be unzipped.

Can you try to unzip the files using external tools like unzip if you are using Unix? If you see an error message like the one below, it means the file is corrupted (see this).

End-of-central-directory signature not found. Either this file is not
a zipfile, or it constitutes one disk of a multi-part archive. In the
latter case the central directory and zipfile comment will be found on
the last disk(s) of this archive.

You can also check the file type using the file command. If it's a valid zip archive, you should see something like this:

$ file Ch.126.2\ .cbz
Ch.126.2 .cbz: Zip archive data, at least v2.0 to extract

But I agree that the scanning process should not hang even when a corrupted file is present. In version 0.2.0 that I am working on, Mango would ignore any corrupted and invalid zip files when scanning the library. I will make a minor release soon to address this and a few other issues.

@hkalexling
Copy link
Member

In v0.1.2, Mango would ignore the invalid files and log a warning message. Feel free to reopen this issue if needed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants