Satty icon indicating copy to clipboard operation
Satty copied to clipboard

Closes when putting too many blurs at the same spot (like a small line).

Open zedonix opened this issue 7 months ago • 9 comments

grim -g "$(slurp -o -r -c '#ff0000ff')" -t ppm - | satty --filename - --fullscreen --output-filename ~/Pictures/Screenshots/satty-$(date '+%Y%m%d-%H:%M:%S').png thread 'main' panicked at /build/.cargo/registry/src/index.crates.io-6f17d22bba15001f/imgref-1.11.0/src/lib.rs:353:14: range end index 18446744073709550320 out of range for slice of length 0 note: run with RUST_BACKTRACE=1 environment variable to display a backtrace thread 'main' panicked at core/src/panicking.rs:221:5: panic in a function that cannot unwind stack backtrace: 0: 0x5e7ee37b2bf2 - 1: 0x5e7ee37d9cf3 - 2: 0x5e7ee37afcbf - 3: 0x5e7ee37b2aa2 - 4: 0x5e7ee37b3ba4 - 5: 0x5e7ee37b39e6 - 6: 0x5e7ee37b41b2 - 7: 0x5e7ee37b4006 - 8: 0x5e7ee37b30b9 - 9: 0x5e7ee37b3c9c - 10: 0x5e7ee35545ad - 11: 0x5e7ee3554642 - 12: 0x5e7ee3554766 - 13: 0x5e7ee358fa08 - 14: 0x7953fe4f2abe - 15: 0x7953feac7e5c - 16: 0x7953feac7f72 - g_signal_emit_valist 17: 0x7953feac8034 - g_signal_emit 18: 0x7953fe20b091 - 19: 0x7953fe3540aa - 20: 0x7953fe354668 - 21: 0x7953fe354d6e - gtk_widget_snapshot_child 22: 0x7953fe34234f - 23: 0x7953fe3540aa - 24: 0x7953fe354668 - 25: 0x7953fe354d6e - gtk_widget_snapshot_child 26: 0x7953fe272725 - 27: 0x7953fe3540aa - 28: 0x7953fe354668 - 29: 0x7953fe354d6e - gtk_widget_snapshot_child 30: 0x7953fe34234f - 31: 0x7953fe3544a5 - 32: 0x7953fe354668 - 33: 0x7953fe354c2e - 34: 0x7953fe360139 - 35: 0x7953fe4f2892 - 36: 0x7953feac7e5c - 37: 0x7953feac7f72 - g_signal_emit_valist 38: 0x7953feac8034 - g_signal_emit 39: 0x7953fe590518 - 40: 0x7953feac7e5c - 41: 0x7953feac7f72 - g_signal_emit_valist 42: 0x7953feac8034 - g_signal_emit 43: 0x7953fe578350 - 44: 0x7953fd9fa68a - 45: 0x7953fd9f91e4 - 46: 0x7953fda5ce97 - 47: 0x7953fd9f8615 - g_main_context_iteration 48: 0x7953fdbd27d6 - g_application_run 49: 0x5e7ee35f242c - 50: 0x5e7ee359cd99 - 51: 0x5e7ee3585430 - 52: 0x5e7ee35fea83 - 53: 0x5e7ee35b949d - 54: 0x5e7ee37a745e - 55: 0x5e7ee3586b75 - 56: 0x7953fd6da6b5 - 57: 0x7953fd6da769 - __libc_start_main 58: 0x5e7ee3554d75 - 59: 0x0 - thread caused non-unwinding panic. aborting. Aborted (core dumped)

zedonix avatar May 12 '25 15:05 zedonix

Can't reproduce. But I do have a few questions. :wink:

  • Which commit or release are you using?
  • How many is "too many"? (ballpark)
  • And would it be possible to provide a screen recording, e.g. with wf-recorder? Perhaps it's very specific, and my repro attempt is totally wrong

Thanks!

RobertMueller2 avatar May 12 '25 16:05 RobertMueller2

https://youtu.be/zBwCcTKhrno

pacman -Q satty satty 0.18.1-1

I cant find a specific number it just happenes, sometimes quick sometimes 2-3 sec later.

my fastfetch if it helps - piyush@archlinux

OS: Arch Linux x86_64 Kernel: Linux 6.14.6-arch1-1 Uptime: 36 mins Packages: 785 (pacman) Shell: bash 5.2.37 Display (S19F350): 1366x768 @ 60 Hz in 19" [External] WM: Sway 1.10.1 (Wayland) Cursor: Adwaita Terminal: foot 1.22.3 Terminal Font: Iosevka (12pt) CPU: Intel(R) Core(TM) i5-2400 (4) @ 3.10 GHz GPU: Intel 2nd Generation Core Processor Family Integrated Graphics Controller @ 1.10 GHz [Integrated] Memory: 3.99 GiB / 7.65 GiB (52%) Swap: 0 B / 8.00 GiB (0%) Disk (/): 7.83 GiB / 110.24 GiB (7%) - btrfs Local IP (enp2s0): 192.168.1.3/24 Locale: en_US.UTF-8

zedonix avatar May 13 '25 03:05 zedonix

Thank you for the additional info. I can reproduce a different crash, "attempt to subtract with overflow", when trying to draw an exact line, with HEAD of current main and with the 0.18.1 version. Since it's a different crash, I'll open a new issue for it.

But I don't have much luck trying your repro in either.

To get a better guess what's happening here, we'd at least need debug symbols. RUST_BACKTRACE=full wouldn't hurt, while we're at it. But I am not sure about how Arch deals with debug packages for Rust apps, if it's sufficient to install a debug package here or if there even is one.

If it's not too much trouble, could you repro from a cloned git repository, built with cargo build and then RUST_BACKTRACE=full? That way we'd also know if it's still happening, because there have been a few changes to the blur tool in the meantime, that may or may not have removed the issue altogether.

RobertMueller2 avatar May 13 '25 05:05 RobertMueller2

To get a better guess what's happening here, we'd at least need debug symbols. RUST_BACKTRACE=full wouldn't hurt, while we're at it. But I am not sure about how Arch deals with debug packages for Rust apps, if it's sufficient to install a debug package here or if there even is one.

I am afraid there will be none. Its different than Debian in this regard afaik.

I am also not sure about how to trigger the bug, maybe you could share a screenrecording to see exactly what you are doing?

gabm avatar May 13 '25 05:05 gabm

It should be fixed on main via https://github.com/gabm/Satty/commit/015375cae78a69eeff82447191bb66239b8606a0

            if size.x <= 0.0 || size.y <= 0.0 {
                return Ok(());
            }

fabienjuif avatar May 13 '25 09:05 fabienjuif

umm what should I do?

zedonix avatar May 13 '25 12:05 zedonix

We should release a version once I finished https://github.com/gabm/Satty/pull/188 If you want to have a version sooner, you could install Satty from git main branch too

fabienjuif avatar May 13 '25 12:05 fabienjuif

thanks, now should I close the ticket?

zedonix avatar May 13 '25 14:05 zedonix

Let's wait for an actual release so this is visible if other people have the same issue!

fabienjuif avatar May 13 '25 16:05 fabienjuif

@fabienjuif should we close this now?

RobertMueller2 avatar Jun 01 '25 10:06 RobertMueller2

@zedonix feel free to reopen the issue if you still encounter the problem with the latest release!

fabienjuif avatar Jun 01 '25 14:06 fabienjuif

thanks now it works.

zedonix avatar Jun 01 '25 14:06 zedonix