qarmin / czkawka

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

The program crashes when processing photos with incomplete filenames (e.g., ".jpeg", ".png", and likely others, untested). #1246

Open LtCzr opened 3 months ago

LtCzr commented 3 months ago

Bug Description The program crashes when processing photos with incomplete filenames (e.g., ".jpeg", ".png", and likely others, untested).

Steps to reproduce:

  1. Create a folder and place an image
  2. remove the name but keep the photo type. (e.g Photo.png -> .png)
  3. Run Czkawka similar images at any similarity, I chose 10.
  4. Program should stop hashing at halfway and freeze.
  5. Any attempt to close or stop the program will cause it to crash and turn off.
While attempting to analyze a sizable folder, the process consistently froze at approximately the halfway point. After trial and error, I identified a file labeled ".jpeg" as the culprit. Upon further experimentation, I observed that renaming other files with incomplete labels like ".png" also replicated the crash.


![image - 2024-03-11T034113 291 (1)](https://github.com/qarmin/czkawka/assets/155133088/39d95d6d-e022-43f0-a0fa-c80ca9e4edf2)
![image - 2024-03-11T034115 797 (1)](https://github.com/qarmin/czkawka/assets/155133088/ae229a55-58e2-4b01-a0ba-e03bb1969062)

**System**

- Czkawka/Krokiet version: <!--  e.g. 7.0.0 cli/gui -->
- OS version: Windows 10 
- Installation method: <github zip file-->

<!-- If you use flatpak, please include the result of `flatpak info com.github.qarmin.czkawka`. -->
qarmin commented 3 months ago

Crash is fixed with master branch, latest binaries can be downloaded here - https://github.com/qarmin/czkawka/actions/runs/8241346135 The only problem now is that files without name are not visible in results