artemsen / swayimg

Image viewer for Wayland
MIT License
379 stars 31 forks source link

Freeze when attempting to open a file from a non-existent next/previous directory #80

Closed dmyTRUEk closed 1 year ago

dmyTRUEk commented 1 year ago

When I press N or P (open file from next/prev directory) and there are no other folders with images, swayimg freezes and also utilizes 100% of a single core.

artemsen commented 1 year ago

Could describe step-by-step how to reproduce the bug? Do you use custom config file for swayimg?

dmyTRUEk commented 1 year ago

Yes, i use config, but the bug is also reproducible without a config.

Steps to reproduce:

  1. Create folder structure like this:
    .
    └── folder1
    ├── Screenshot_20220521_185716.png
    └── Screenshot_20220521_190904.png
  2. Navigate to folder folder1 (cd path/to/folder1).
  3. Run swayimg in terminal.
  4. Press any of n/p/+/- to ensure, that swayimg is working properly.
  5. Press N or P.
  6. swayimg freezes (don't repsond to any of the inputs) and htop shows 99.9% of CPU% (fully loaded one core).

And even any of the Sway's bind to kill program (I have Win+Backspace to kill and Win+Shift+Backspace to kill 9) doesn't kill it, only by pkill swayimg or kill from "htop".

If you need any other info, I will be happy to help.