qarmin / czkawka

Multi functional app to find duplicates, empty folders, similar images etc.
Other
18.36k stars 604 forks source link

czkawka_gui crashing on "Remove outdated results from cache." #1243

Open TheRouletteBoi opened 3 months ago

TheRouletteBoi commented 3 months ago

Bug Description The app crashes when trying to clear cache. SCR-20240309-hhf

Steps to reproduce: In the GUI go to Settings -> Duplicates Tab -> Click on Remove outdated results from cache. Then Click Ok.

Terminal output (optional):

➜  release git:(master) ✗ ./czkawka_gui
12:12:09.379 [INFO] czkawka_core::common: App version: 7.0.0, release mode, rust 1.76.0 (2024-02-04), os Mac OS 14.3.1 [aarch64 64-bit], 10 cpu/threads
12:12:09.796 [INFO] czkawka_gui: Set thread number to 10
memory allocation of 8534124685102572903 bytes failed
[1]    9353 abort      ./czkawka_gui

System

My Cache Folder

image

Cache File Sizes

image
qarmin commented 3 months ago

How you created this cache files? Looks that they are not compatible with current version, so I think that you just renamed old cache files e.g. cache_duplicates_Blake3_60.bin to new name cache_duplicates_Blake3_70.bin.

This is why the numbering exists to prevent this type of error - if a cache is compatible with a new version, its version is not changed (e.g. 7.0 uses suffix 70 and 7.1 will also use the same).

TheRouletteBoi commented 3 months ago

How you created this cache files? Looks that they are not compatible with current version, so I think that you just renamed old cache files e.g. cache_duplicates_Blake3_60.bin to new name cache_duplicates_Blake3_70.bin.

This is why the numbering exists to prevent this type of error - if a cache is compatible with a new version, its version is not changed (e.g. 7.0 uses suffix 70 and 7.1 will also use the same).

the cache was self generated by the gui app. I have not touched it at all

flansuse commented 1 month ago

I have the same issue, and it errors out with this message before crashing:

memory allocation of 8245933057892429617 bytes failed
zsh: IOT instruction (core dumped)  czkawka-gui
  1. This is from an EMPTY new czkawka cache directory.
  2. Then doing a single scan on a small folder.
  3. Then trying to clear the cache from old entries.

Czkawka GUI 7.0.0, Arch Linux

TheRouletteBoi commented 1 month ago

To solve this I had to delete all the files in my cache folder. I think the bug has something to do with the blake3 hashing because that was th only setting I had changed prior to the crashing.

flansuse commented 1 month ago

My previous comment shows this did not resolve the issue.

I started with an empty cache folder. If the folder is empty, and I click "remove outdated results", nothing happens. No crash.

If I run even a SINGLE scan on a folder, which generates hashes, and THEN I click "remove outdated entries", the program crashes.

So starting all over from a fresh cache doesn't solve this.

It doesn't matter if I start all over with Blake3 or XXH3 as the hash method.