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

Crash when sorting by folder name #1416

Open
andrej1919 opened this issue Dec 12, 2024 · 1 comment
Open

Crash when sorting by folder name #1416

andrej1919 opened this issue Dec 12, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@andrej1919
Copy link

Bug Description
Czkawka crashes when attempting to sort or group duplicates by directory. (Similar crash can occur when I try to select files by path or with Regex.)
The crash occurs regardless of the dataset size and has been reproduced consistently on my system. The application exits with a critical GTK error and panics.

Steps to reproduce:

  1. Open Czkawka GUI.
  2. Scan directories with duplicates.
  3. Attempt to sort or group the results by directory in the GUI.
  4. Observe that the application crashes immediately.

What I Expected to Happen: The application should sort or group duplicates by directory without any errors or crashes.

What Actually Happened: The application crashes, displaying the following terminal error:

Gtk-CRITICAL **: gtk_list_store_get_value: assertion 'iter_is_valid (iter, list_store)' failed
thread 'main' panicked at ...: Failed to get TreeModel value: ValueTypeMismatchError { actual: <invalid>, requested: gboolean }
**Additional Details:**

Running with RUST_LOG=debug consistently reproduces the issue.
The crash does not occur when listing or sorting duplicates by file size or name—only when sorting by directory.
Cache files were verified to be intact, with no missing or corrupted entries.
Steps Taken:

Verified the issue with a variety of datasets and duplicate groups.
Cleared and rebuilt caches to rule out cache-related issues.
Tested with both cached and non-cached duplicate sets.

Attachments:
czkawka_debug.log

Other Notes:
This issue seems related to the gtk_list_store_get_value function, possibly indicating a mismatch in data type handling within the GUI’s tree model when grouping by directory.
Running the app in debug mode (RUST_LOG=debug) does not avoid the crash.

Debug log

System

  • Czkawka Version: 8.0.0 GUI
  • OS Version: Manjaro Linux 24.2.0 [x86_64 64-bit]
  • Rust Version: 1.83.0 (2024-11-26)
  • Installation Method: Pacman (/usr/bin/czkawka_gui)
@andrej1919 andrej1919 added the bug Something isn't working label Dec 12, 2024
@paskal
Copy link

paskal commented Dec 13, 2024

Same thing with the same app version installed using brew, MacOS.

stacktrace

(czkawka_gui:26248): Gtk-CRITICAL **: 01:25:14.951: gtk_list_store_get_value: assertion 'iter_is_valid (iter, list_store)' failed
thread 'main' panicked at /Users/brew/Library/Caches/Homebrew/cargo_cache/registry/src/index.crates.io-6f17d22bba15001f/gtk4-0.9.2/src/tree_model.rs:49:14:
Failed to get TreeModel value: ValueTypeMismatchError { actual: <invalid>, requested: gboolean }
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
thread 'main' panicked at library/core/src/panicking.rs:221:5:
panic in a function that cannot unwind
stack backtrace:
   0:        0x1018afe1c - <std::sys::backtrace::BacktraceLock::print::DisplayBacktrace as core::fmt::Display>::fmt::h14dcb4794e811c9f
   1:        0x1018c15d4 - core::fmt::write::h49a9cf68bfb4a321
   2:        0x1018b3a84 - std::io::Write::write_fmt::h00e4f1b82d71ad85
   3:        0x10189a7f8 - std::panicking::default_hook::{{closure}}::hda52b8046522f561
   4:        0x10189a434 - std::panicking::default_hook::h9566cb73367aef3e
   5:        0x10189b1b0 - std::panicking::rust_panic_with_hook::hfa41181adbcf532d
   6:        0x1018b08dc - std::panicking::begin_panic_handler::{{closure}}::ha417e66bf9de7acf
   7:        0x1018b0044 - std::sys::backtrace::__rust_end_short_backtrace::hc7b890f013fa9efb
   8:        0x10189a8ec - _rust_begin_unwind
   9:        0x101916bc8 - core::panicking::panic_nounwind_fmt::h7f5cd0de532efc08
  10:        0x101916c40 - core::panicking::panic_nounwind::h2043aceb85e0f9a2
  11:        0x101916d2c - core::panicking::panic_cannot_unwind::hdb655fbd18a7260d
  12:        0x1010164f8 - gtk4::auto::button::ButtonExt::connect_clicked::clicked_trampoline::h5c8db74bd92a930a
  13:        0x1025083b8 - __g_closure_invoke_va
  14:        0x10251e73c - _signal_emit_valist_unlocked
  15:        0x10251e2fc - _g_signal_emit_valist
  16:        0x10251ee68 - _g_signal_emit
  17:        0x102f1d47c - __gtk_marshal_VOID__INT_DOUBLE_DOUBLEv
  18:        0x1025083b8 - __g_closure_invoke_va
  19:        0x10251e73c - _signal_emit_valist_unlocked
  20:        0x10251e2fc - _g_signal_emit_valist
  21:        0x10251ee68 - _g_signal_emit
  22:        0x102fbef9c - _gtk_gesture_click_end
  23:        0x10250b5d0 - _g_cclosure_marshal_VOID__BOXEDv
  24:        0x1025083b8 - __g_closure_invoke_va
  25:        0x10251e73c - _signal_emit_valist_unlocked
  26:        0x10251e2fc - _g_signal_emit_valist
  27:        0x10251ee68 - _g_signal_emit
  28:        0x102fbdb68 - __gtk_gesture_set_recognized
  29:        0x102fbbb94 - __gtk_gesture_check_recognized
  30:        0x102fbd414 - _gtk_gesture_handle_event
  31:        0x102fc0780 - _gtk_gesture_single_handle_event
  32:        0x102f91dbc - _gtk_event_controller_handle_event
  33:        0x1030baad4 - _gtk_widget_run_controllers
  34:        0x1030bad74 - __gtk_widget_captured_event
  35:        0x102ff9cac - _gtk_propagate_event_internal
  36:        0x102ff9654 - _gtk_main_do_event
  37:        0x103020b3c - _surface_event
  38:        0x103212338 - __gdk_marshal_BOOLEAN__POINTERv
  39:        0x10325e7b4 - _gdk_surface_event_marshallerv
  40:        0x1025083b8 - __g_closure_invoke_va
  41:        0x10251e73c - _signal_emit_valist_unlocked
  42:        0x10251e2fc - _g_signal_emit_valist
  43:        0x10251ee68 - _g_signal_emit
  44:        0x10325da74 - _gdk_surface_handle_event
  45:        0x10321bd64 - _gdk_macos_event_source_dispatch
  46:        0x102b15418 - _g_main_context_dispatch_unlocked
  47:        0x102b15760 - _g_main_context_iterate_unlocked
  48:        0x102b157c0 - _g_main_context_iteration
  49:        0x1029b4200 - _g_application_run
  50:        0x10101e57c - gio::application::ApplicationExtManual::run_with_args::h1bf4800ba7ed901d
  51:        0x10101c724 - czkawka_gui::main::h927c8e4e2473e747
  52:        0x100f9765c - std::sys::backtrace::__rust_begin_short_backtrace::hc9444263eebe7cba
  53:        0x1010061b8 - std::rt::lang_start::{{closure}}::h41fc5299486db8e2
  54:        0x1018907a8 - std::rt::lang_start_internal::h31b5cf8a92666908
  55:        0x10101ddf0 - _main
thread caused non-unwinding panic. aborting.
[1]    26248 abort      czkawka_gui

7.0 fails the same. Here is the way I installed it:

wget https://raw.githubusercontent.com/Homebrew/homebrew-core/68842ccd25bad1aeeb67fdf3eff9d9b8af26cd23/Formula/c/czkawka.rb
brew uninstall czkawka
brew install --formula ./czkawka.rb

6.1 the same:

wget https://raw.githubusercontent.com/Homebrew/homebrew-core/586a7a117cc023e1080a260639cd1fa19d4d1f95/Formula/c/czkawka.rb
brew uninstall czkawka
brew install --formula ./czkawka.rb

gtk version:

brew info gtk4
==> gtk4: stable 4.16.7 (bottled)

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