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

strange bug that program appear to be hang after scan completed or stopped #1229

Closed
chchia opened this issue Feb 27, 2024 · 2 comments · Fixed by #1230
Closed

strange bug that program appear to be hang after scan completed or stopped #1229

chchia opened this issue Feb 27, 2024 · 2 comments · Fixed by #1230
Labels
bug Something isn't working

Comments

@chchia
Copy link

chchia commented Feb 27, 2024

Bug Description
latest github source, build following the guide. (i had been doing this since long time ago and it was always working correctly until recently).
during hashing stage, if user stop the hashing, or even hashing completed, for large library, the program will appear like hang, but you can still move the czkawka dialog box.

Steps to reproduce:

just scan images for large library, and then stop.
image
i had been stuck in this interface for more than 12 hours, htop show there is no activity, no high CPU usage nor IO usage.

image

    Finished release [optimized] target(s) in 0.21s
     Running `target/release/czkawka_gui`
16:43:58.849 [INFO] czkawka_core::common: App version: 7.0.0, release mode, rust 1.76.0 (2024-02-04), os Ubuntu 23.10 [x86_64 64-bit], 6 cpu/threads

(czkawka_gui:4566): Gtk-WARNING **: 16:43:58.880: No IM module matching GTK_IM_MODULE=fcitx found
16:43:59.180 [INFO] czkawka_gui: Set thread number to 6

(czkawka_gui:4566): IBUS-WARNING **: 16:43:59.229: Unable to connect to ibus: Could not connect: Connection refused
16:44:05.600 [INFO] czkawka_core::similar_images: find_similar_images
thread '<unnamed>' panicked at czkawka_core/src/similar_images.rs:393:21:
internal error: entered unreachable code
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

System

  • Czkawka/Krokiet version: 7.0.0
  • OS version: Ubuntu 23.10 (was ok before)
  • Installation method: compilation from latest source

i was thinking that maybe my Linux OS corrupted, so i installed a fresh new Ubuntu.

then i think maybe my database corrupted, i deleted the database in .cache/czkawka folder.

but still the result is same.

@chchia chchia added the bug Something isn't working label Feb 27, 2024
@qarmin
Copy link
Owner

qarmin commented Feb 27, 2024

Crash happens in this code

match file_entry.image_type {
ImageType::Normal | ImageType::Heic => {
if let Ok(image_result) = panic::catch_unwind(|| image::open(&file_entry.path)) {
if let Ok(image2) = image_result {
img = image2;
} else {
return;
}
} else {
let message = create_crash_message("Image-rs", &file_entry.path.to_string_lossy(), "https://github.com/image-rs/image/issues");
println!("{message}");
return;
}
}
ImageType::Raw => {
img = match get_dynamic_image_from_raw_image(&file_entry.path) {
Some(t) => t,
None => return,
};
}
_ => {
unreachable!();
}
}
}

and is caused by using here image with unknown extension - this situation should never happens, because images with known extensions should be used in this code, but somehow happened.

@chchia
Copy link
Author

chchia commented Feb 27, 2024

great, since you had traced the issue, i believe you will be able to fix it soon, thanks!

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

Successfully merging a pull request may close this issue.

2 participants