[GH-ISSUE #80] tui freezes when closing as a scratchpad #963

Closed
opened 2026-03-14 12:42:11 +03:00 by kerem · 14 comments
Owner

Originally created by @a1fishie on GitHub (Sep 14, 2022).
Original GitHub issue: https://github.com/aome510/spotify-player/issues/80

I have the spotify_player app integrated as a scratchpad as i find them very useful, my only problem with it so far is that it freezes when i hide the scratchpad and reopen it again.
Closing the scratchpad completely (with my kill keybind) makes it so that spotify_player won't launch again until i perform a reboot of my system
image

Image above shows me trying to launch it through the terminal (kitty)
Installed from cargo with lyric and image feature on Arch with kernel 5.19.8

Originally created by @a1fishie on GitHub (Sep 14, 2022). Original GitHub issue: https://github.com/aome510/spotify-player/issues/80 I have the spotify_player app integrated as a scratchpad as i find them very useful, my only problem with it so far is that it freezes when i hide the scratchpad and reopen it again. Closing the scratchpad completely (with my kill keybind) makes it so that spotify_player won't launch again until i perform a reboot of my system ![image](https://user-images.githubusercontent.com/104651507/190239687-ab5df308-966f-4b9f-acbe-966376bf57e6.png) Image above shows me trying to launch it through the terminal (kitty) Installed from cargo with lyric and image feature on Arch with kernel 5.19.8
kerem 2026-03-14 12:42:11 +03:00
  • closed this issue
  • added the
    bug
    label
Author
Owner

@aome510 commented on GitHub (Sep 15, 2022):

I have the spotify_player app integrated as a scratchpad as i find them very useful, my only problem with it so far is that it freezes when i hide the scratchpad and reopen it again

I'm not really familiar with the scratchpad concept. Would you mind to further elaborate?

Also, if possible, can you include the log and backtrace of the app when freezing as described in https://github.com/aome510/spotify-player#logging?

<!-- gh-comment-id:1247478898 --> @aome510 commented on GitHub (Sep 15, 2022): > I have the spotify_player app integrated as a scratchpad as i find them very useful, my only problem with it so far is that it freezes when i hide the scratchpad and reopen it again I'm not really familiar with the scratchpad concept. Would you mind to further elaborate? Also, if possible, can you include the log and backtrace of the app when freezing as described in https://github.com/aome510/spotify-player#logging?
Author
Owner

@a1fishie commented on GitHub (Sep 15, 2022):

I have the spotify_player app integrated as a scratchpad as i find them very useful, my only problem with it so far is that it freezes when i hide the scratchpad and reopen it again

I'm not really familiar with the scratchpad concept. Would you mind to further elaborate?

Yeah so, a scratchpad is basically a toggleable window in a window manager ( I use xmonad) , you press a keybind - it opens/closes and it functions like any other program, currently I have spotify-player in one as I find it useful.
https://hackage.haskell.org/package/xmonad-contrib-0.17.0/docs/XMonad-Util-NamedScratchpad.html < Link to more information

Also, if possible, can you include the log and backtrace of the app when freezing as described in https://github.com/aome510/spotify-player#logging?

https://pastebin.com/NnbfFFPa
https://pastebin.com/cR0fhePH

<!-- gh-comment-id:1247688117 --> @a1fishie commented on GitHub (Sep 15, 2022): > > I have the spotify_player app integrated as a scratchpad as i find them very useful, my only problem with it so far is that it freezes when i hide the scratchpad and reopen it again > > I'm not really familiar with the scratchpad concept. Would you mind to further elaborate? Yeah so, a scratchpad is basically a toggleable window in a window manager ( I use xmonad) , you press a keybind - it opens/closes and it functions like any other program, currently I have spotify-player in one as I find it useful. https://hackage.haskell.org/package/xmonad-contrib-0.17.0/docs/XMonad-Util-NamedScratchpad.html < Link to more information > Also, if possible, can you include the log and backtrace of the app when freezing as described in https://github.com/aome510/spotify-player#logging? https://pastebin.com/NnbfFFPa https://pastebin.com/cR0fhePH
Author
Owner

@aome510 commented on GitHub (Sep 15, 2022):

https://pastebin.com/NnbfFFPa
https://pastebin.com/cR0fhePH

Thanks. However, I couldn't find anything wrong with the log. Can you record a screen of the freezing case?

I'm not familiar with xmonad, so not sure if the issue is related to spotify_player.

<!-- gh-comment-id:1248197794 --> @aome510 commented on GitHub (Sep 15, 2022): > https://pastebin.com/NnbfFFPa https://pastebin.com/cR0fhePH Thanks. However, I couldn't find anything wrong with the log. Can you record a screen of the freezing case? I'm not familiar with xmonad, so not sure if the issue is related to `spotify_player`.
Author
Owner

@a1fishie commented on GitHub (Sep 15, 2022):

Excuse the white noise.
I don't think its something to do with xmonad since both btop, and spotify-tui work just fine

https://user-images.githubusercontent.com/104651507/190434872-ddb76f4e-6a2b-42f0-84d0-15cc379bbb4d.mp4

<!-- gh-comment-id:1248207382 --> @a1fishie commented on GitHub (Sep 15, 2022): Excuse the white noise. I don't think its something to do with xmonad since both btop, and spotify-tui work just fine https://user-images.githubusercontent.com/104651507/190434872-ddb76f4e-6a2b-42f0-84d0-15cc379bbb4d.mp4
Author
Owner

@aome510 commented on GitHub (Sep 15, 2022):

I don't think the above video works for me

<!-- gh-comment-id:1248366786 --> @aome510 commented on GitHub (Sep 15, 2022): I don't think the above video works for me
Author
Owner

@a1fishie commented on GitHub (Sep 16, 2022):

https://user-images.githubusercontent.com/104651507/190622551-e8232842-f17d-4d51-b3ef-d9a0a565f1c9.mp4

Does this one work for you?

Edit: Excuse the white noise, no clue whats causing it

<!-- gh-comment-id:1249217142 --> @a1fishie commented on GitHub (Sep 16, 2022): https://user-images.githubusercontent.com/104651507/190622551-e8232842-f17d-4d51-b3ef-d9a0a565f1c9.mp4 Does this one work for you? Edit: Excuse the white noise, no clue whats causing it
Author
Owner

@elkrien commented on GitHub (Sep 16, 2022):

I don't think it's the problem with Spotify-player. I use it as a scratchpad in LeftWM and Qtile and everything works fine.

<!-- gh-comment-id:1249319445 --> @elkrien commented on GitHub (Sep 16, 2022): I don't think it's the problem with Spotify-player. I use it as a scratchpad in LeftWM and Qtile and everything works fine.
Author
Owner

@aome510 commented on GitHub (Sep 16, 2022):

Thanks @elkrien for additional input.

@a1fishie the above video works for me. My best guest is that the reopening the scratchpad requires the app to re-communicate with kitty for image rendering. However, the communicate part is only done upon startup, so kitty won't be able to process the new request hence the freeze. I encountered a similar freeze before when first integrating image rendering.

So to confirm this behaviour, @a1fishie can you try to run the app without image feature and maybe, with image feature but in a terminal other than kitty?

<!-- gh-comment-id:1249331045 --> @aome510 commented on GitHub (Sep 16, 2022): Thanks @elkrien for additional input. @a1fishie the above video works for me. My best guest is that the reopening the scratchpad requires the app to re-communicate with kitty for image rendering. However, the communicate part is only done upon startup, so kitty won't be able to process the new request hence the freeze. I encountered a similar freeze before when first integrating image rendering. So to confirm this behaviour, @a1fishie can you try to run the app without `image` feature and maybe, with `image` feature but in a terminal other than kitty?
Author
Owner

@a1fishie commented on GitHub (Sep 16, 2022):

Without image seemingly fixes the issue, thank you

<!-- gh-comment-id:1249671068 --> @a1fishie commented on GitHub (Sep 16, 2022): Without image seemingly fixes the issue, thank you
Author
Owner

@aome510 commented on GitHub (Sep 16, 2022):

@a1fishie thanks for the confirmation. I think it's possible to fix the issue with image feature and kitty for scratchpad. Just leave this issue as open, so we can track that.

<!-- gh-comment-id:1249674848 --> @aome510 commented on GitHub (Sep 16, 2022): @a1fishie thanks for the confirmation. I think it's possible to fix the issue with `image` feature and kitty for scratchpad. Just leave this issue as open, so we can track that.
Author
Owner

@AntonHermann commented on GitHub (Nov 25, 2022):

I've got the same issue (i guess), and running strace shows that it seems to hang on opening temp files:

...
openat(AT_FDCWD, "/tmp/.tmp.viuer.p", O_RDWR|O_CREAT|O_EXCL|O_CLOEXEC, 0600) = -1 EEXIST (File exists)
openat(AT_FDCWD, "/tmp/.tmp.viuer.R", O_RDWR|O_CREAT|O_EXCL|O_CLOEXEC, 0600) = -1 EEXIST (File exists)
openat(AT_FDCWD, "/tmp/.tmp.viuer.d", O_RDWR|O_CREAT|O_EXCL|O_CLOEXEC, 0600) = -1 EEXIST (File exists)
...

This goes on for a random sequence of numbers and letters. Maybe some cleanup didn't run?
Removing all those files resolved the issue for me

Haven't got time to see what spotify-players logging reports, maybe I can check that later/the next time this issue appears

<!-- gh-comment-id:1327691980 --> @AntonHermann commented on GitHub (Nov 25, 2022): I've got the same issue (i guess), and running `strace` shows that it seems to hang on opening temp files: ``` ... openat(AT_FDCWD, "/tmp/.tmp.viuer.p", O_RDWR|O_CREAT|O_EXCL|O_CLOEXEC, 0600) = -1 EEXIST (File exists) openat(AT_FDCWD, "/tmp/.tmp.viuer.R", O_RDWR|O_CREAT|O_EXCL|O_CLOEXEC, 0600) = -1 EEXIST (File exists) openat(AT_FDCWD, "/tmp/.tmp.viuer.d", O_RDWR|O_CREAT|O_EXCL|O_CLOEXEC, 0600) = -1 EEXIST (File exists) ... ``` This goes on for a random sequence of numbers and letters. Maybe some cleanup didn't run? Removing all those files resolved the issue for me Haven't got time to see what `spotify-player`s logging reports, maybe I can check that later/the next time this issue appears
Author
Owner

@aome510 commented on GitHub (Nov 25, 2022):

hi @AntonHermann, thanks for reporting. Just want to clarify, did u also use scratchpad as described in the initial discussion in this issue or did u encounter a freeze in general, which may be a result of a potential deadlock?

<!-- gh-comment-id:1327911574 --> @aome510 commented on GitHub (Nov 25, 2022): hi @AntonHermann, thanks for reporting. Just want to clarify, did u also use **scratchpad** as described in the initial discussion in this issue or did u encounter a freeze in general, which may be a result of a potential deadlock?
Author
Owner

@AntonHermann commented on GitHub (Nov 25, 2022):

No, for me it happened in a regular kitty window

<!-- gh-comment-id:1327933570 --> @AntonHermann commented on GitHub (Nov 25, 2022): No, for me it happened in a regular kitty window
Author
Owner

@aome510 commented on GitHub (Nov 26, 2022):

Got it, thanks for the clarification. I guess the cause can be a subtle concurrent bug. I can take a look when I'm less busy. In the meantime, hope that this doesn't happen too frequently. Any further details to help reproduce the bug is also appreciated.

<!-- gh-comment-id:1327977240 --> @aome510 commented on GitHub (Nov 26, 2022): Got it, thanks for the clarification. I guess the cause can be a subtle concurrent bug. I can take a look when I'm less busy. In the meantime, hope that this doesn't happen too frequently. Any further details to help reproduce the bug is also appreciated.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/spotify-player#963
No description provided.