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

Users crashing due to the program failing to save images #68

Closed
2 tasks done
McSib opened this issue Dec 11, 2022 · 2 comments
Closed
2 tasks done

Users crashing due to the program failing to save images #68

McSib opened this issue Dec 11, 2022 · 2 comments
Assignees
Labels
Bug Something isn't working e621 Client High Priority High Severity Systems malfunctioning or barely working

Comments

@McSib
Copy link
Owner

McSib commented Dec 11, 2022

This a current bug that's been floating around for a while now, and is happening with a few users. What seems to be happening is the downloading starts, and then while downloading, the program crashes when trying to save the image. This issue will be a task list of both issues that discuss this and will be the main update hub for sources of information around it.

@McSib McSib self-assigned this Dec 11, 2022
@McSib McSib added Bug Something isn't working e621 Client High Severity Systems malfunctioning or barely working High Priority labels Dec 11, 2022
@McSib McSib added this to the v1.7.2 Release milestone Dec 11, 2022
@McSib
Copy link
Owner Author

McSib commented Dec 11, 2022

From looking into #58, I'm wondering if the issue is directly tied to an invalid character of some kind. We have code for filtering invalid characters in folder/file names.

mod.rs#L121...L130

    /// Removes invalid characters from directory name.
    fn remove_invalid_chars(&self, dir_name: &str) -> String {
        dir_name
            .chars()
            .map(|e| match e {
                '?' | ':' | '*' | '<' | '>' | '\"' | '|' => '_',
                _ => e,
            })
            .collect()
    }

I suggest this because it looks like there is an empty space at the end of the folder name in the log.

15:51:30 [TRACE] (1) e621_downloader::e621: [src\e621\mod.rs:171] Collection Name:            "freckles_(artist) "
15:51:30 [TRACE] (1) e621_downloader::e621: [src\e621\mod.rs:172] Collection Category:        "General Searches"
15:51:30 [TRACE] (1) e621_downloader::e621: [src\e621\mod.rs:173] Collection Post Length:     "2490"
15:51:30 [TRACE] (1) e621_downloader::e621: [src\e621\mod.rs:177] Static file path for this collection: "downloads/General Searches\freckles_(artist) "

It's possible there could be some undefined behavior because of it.

@McSib
Copy link
Owner Author

McSib commented Dec 12, 2022

This bug has been marked as fixed. It was curious, but the moment I saw a space at the end of the collection name, I had a gut feeling about what might've been happening.

The recent commit and branch merge on the develop branch shows the issue more clearly.

Image

Image

The program had a collection name (which turns into the folder name) with a space at the end. This is an invalid name for folders, and the system will ignore creating it.

@McSib McSib closed this as completed Dec 12, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something isn't working e621 Client High Priority High Severity Systems malfunctioning or barely working
Projects
None yet
Development

No branches or pull requests

1 participant