[Cog 2848] Cog interface locks up when network media is unavailable (for each item in playlist) #392

Open
opened 2024-01-31 08:29:47 -03:00 by timmb · 4 comments
timmb commented 2024-01-31 08:29:47 -03:00 (Migrated from github.com)

Describe
I'm playing music on an SMB share. The files linger on the Cog playlist after the share has disconnected (I may have restarted Cog in between). If I try to play one of these tracks, the UI of Cog locks up while it tries to access the file.

It's a bigger problem because Cog will cycle through the whole playlist trying, and I can't stop it because the UI is locked up. I have to Force Quit, reopen, and immediately clear the playlist.

To Reproduce
Steps to reproduce the behavior:

  1. Mount a network share over SMB with music on it
  2. Add some of the network music into Cog
  3. Play to test it works.
  4. Close Cog
  5. Disconnect the network or turn off the SMB server (so any reconnection attempt fails)
  6. Reopen Cog
  7. Double click the first entry in the playlist
  8. Observe the UI is locked up for a few seconds while it tries to connect
  9. When "There is a problem connecting" message appears, click OK
  10. Repeat steps 8 and 9 until Cog makes it through the entire playlist

Expected behavior
The UI should remain responsive while Cog is trying to connect. If this is not possible, Cog should not try to play the next track after showing the error message.

Screenshots
cog bug screenshot

Version information:*

  • macOS version: 13.6.3
  • Cog version: 2848 (2848-g42ea8249)
**Describe** I'm playing music on an SMB share. The files linger on the Cog playlist after the share has disconnected (I may have restarted Cog in between). If I try to play one of these tracks, the UI of Cog locks up while it tries to access the file. It's a bigger problem because Cog will cycle through the whole playlist trying, and I can't stop it because the UI is locked up. I have to Force Quit, reopen, and immediately clear the playlist. **To Reproduce** Steps to reproduce the behavior: 1. Mount a network share over SMB with music on it 2. Add some of the network music into Cog 3. Play to test it works. 4. Close Cog 5. Disconnect the network or turn off the SMB server (so any reconnection attempt fails) 6. Reopen Cog 7. Double click the first entry in the playlist 8. Observe the UI is locked up for a few seconds while it tries to connect 9. When "There is a problem connecting" message appears, click OK 10. Repeat steps 8 and 9 until Cog makes it through the entire playlist **Expected behavior** The UI should remain responsive while Cog is trying to connect. If this is not possible, Cog should not try to play the next track after showing the error message. **Screenshots** ![cog bug screenshot](https://github.com/losnoco/Cog/assets/772105/f6b947cb-eaeb-47fc-a161-f0819a9f3506) **Version information:*** - macOS version: 13.6.3 - Cog version: 2848 (2848-g42ea8249)
kode54 commented 2024-01-31 21:59:08 -03:00 (Migrated from github.com)

That is a system dialog. I can’t even check if files still exist without incurring a delay and popup per file.

That is a system dialog. I can’t even check if files still exist without incurring a delay and popup per file.
timmb commented 2024-02-01 07:12:53 -03:00 (Migrated from github.com)

Ideal would be to do it on a different thread than the UI, but I guess that might be a grand change to make.

A workaround could be to stop playback on MacOS if a network file fails to play. It sounds annoying if you have a big playlist with just a file missing, but given the UI popup blocks Cog anyway then playback is already stopped until the user interacts.

Ideal would be to do it on a different thread than the UI, but I guess that might be a grand change to make. A workaround could be to stop playback on MacOS if a network file fails to play. It sounds annoying if you have a big playlist with just a file missing, but given the UI popup blocks Cog anyway then playback is already stopped until the user interacts.
kode54 commented 2024-02-01 07:17:43 -03:00 (Migrated from github.com)

The thing is, I can't tell from the path string that it's a network path, unless it's http or https via manually added stream paths. Network shares look just like local file mounts, and I have to ask for a bookmark to the file to access them after a restart. It is asking for this bookmark that triggers macOS trying to reconnect to the network share. Similarly, folder bookmarks work the same way, it tries to reconnect to the network share that the bookmark is located on.

I'm open to suggestions of how to better handle this, since bookmarks are fully opaque, and the file path is only something like file:///Volumes/SomeShareFolderMountPoint/path/to/file

I suppose I could halt all playback the instant any path that starts with /Volumes/ fails.

And I can't really update the app right now anyway, no adequate Apple Silicon Mac in my possession. No Mac that runs anything newer than Big Sur, either, so I definitely can't run the latest Xcode.

The thing is, I can't tell from the path string that it's a network path, unless it's http or https via manually added stream paths. Network shares look just like local file mounts, and I have to ask for a bookmark to the file to access them after a restart. It is asking for this bookmark that triggers macOS trying to reconnect to the network share. Similarly, folder bookmarks work the same way, it tries to reconnect to the network share that the bookmark is located on. I'm open to suggestions of how to better handle this, since bookmarks are fully opaque, and the file path is only something like `file:///Volumes/SomeShareFolderMountPoint/path/to/file` I suppose I could halt all playback the instant any path that starts with `/Volumes/` fails. And I can't really update the app right now anyway, no adequate Apple Silicon Mac in my possession. No Mac that runs anything newer than Big Sur, either, so I definitely can't run the latest Xcode.
fulldecent commented 2024-02-08 12:05:56 -03:00 (Migrated from github.com)

I am also experiencing lockup when adding some files that are on a local attached drive.

It is a Samsung T9 drive, super fast. Attached direct on Thunderbolt 4.

As a separate test, I tried dropping a media folder of 200GB on Cog. One folder, lots of MP3s. Fast drive. And this causes the UI to lockup. Maybe there is a way to do these updates on a background thread with progress published to the UI, and then inside that thread maybe the loading operation can happen incrementally.

I am also experiencing lockup when adding some files that are on a local attached drive. It is a Samsung T9 drive, super fast. Attached direct on Thunderbolt 4. As a separate test, I tried dropping a media folder of 200GB on Cog. One folder, lots of MP3s. Fast drive. And this causes the UI to lockup. Maybe there is a way to do these updates on a background thread with progress published to the UI, and then inside that thread maybe the loading operation can happen incrementally.
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: chris/Cog#392
No description provided.