Closed hlbstd closed 11 months ago
👋 Thanks for the detailed report - I haven't updated my MPD test server in a little while so I'm still running 0.22.0, but there's nothing in the changelogs since then that seem to affect plchanges
.
I don't think skipping should trigger a queue changed/playlist
subsystem event, unless maybe you have Consume enabled?
Number 2 looks like a WinUI bug -- I've seen a crash report in AppCenter recently that might come from this:
Skipping a song always trigger this event for me, with consume enabled or not. With consume enabled the behaviour actually matches the comment (I receive the songs remaining in the playlist). I think this is not the only instance of me receiving this event more often than intended by the app. I have another issue when playing an album for instance, the callback is triggered at least twice and is run in parallel which also messes with the list.
An easy fix on my side is to use the playlistinfo
command and run ReplaceRange
on the whole queue each time but it makes the ui refresh a lot more than it should I think.
Putting aside the what triggers the callback, shouldn't the result of plchanges
be handled a bit differently anyway ? Since the command gives the new offsets of the modified elements, couldn't they be used to find out which elements have actually been removed/added/shuffled without presuming of the result and with minimal modification to the list ? I don't know much about xaml/winui so maybe this wouldn't be beneficial to minimizes changes to the UI.
I think I've found the cause of those additional notifications, it's the proxy
database plugin, aka "satellite mode". I've switched to a local db and the application now works as expected.
This issue is solved as far as I'm concerned, I'll leave it open in case you want to handle this particular setup in app.
For those who have the app crashing random or after some minutes, you could try to reset the app data.
Richt-click the icon and select App-Settings(..) Then select Reset or try a repair.
This might help in some situations.
It seems to fix my issue.
I love this app. Thanks for the work!
I have this issue on Windows, and reported it via the Microsoft Store. In Settings, Stylophone is allowed to send crash and analytics reports. Are you getting those reports?
I am using the local playback mode: All my FLAC files are on the NAS and mpd streams audio to Stylophone.
It seems Stylophone survives longer than one song if I load up the queue with music and change to one of the other views.
Not seeing anything in AppCenter sadly -- Native crashes tend to escape the unhandled exception catch for some reason, this is one reason that makes me want to eventually move away from .NET Native when the tooling gets there. 🤔
Does the issue still happen with local playback disabled?
Does the issue still happen with local playback disabled?
I tried this just now, and yes, Stylophone crashes when I skip to the next song even with Local Playback disabled. I would assume you would be bogged down in bug reports if every Windows customer had these problems, so I wonder if it's something local to my system. Could you point me to the code that is called at queue updates?
This message skipped by me for some reason - sorry about that!
The main logic for queue updates can be found starting here: https://github.com/Difegue/Stylophone/blob/6d0e2f461cf68c6b657268c5b5ff0999493dea76/Sources/Stylophone.Common/ViewModels/QueueViewModel.cs#L185
This is usually called when the idle
polling reports a queue change.
I've revamped the queue update mechanism in 2.6 (again), so I'll tentatively close this for now. Feel free to reopen if it still happens!
Hi,
I've been trying to use Stylophone on windows but the app keeps on crashing whenever I try to skip a song, or modify a playlist in a way that removes items. I've build a debug version to investigate and here is what happens on my system:
plchanges
does not necessarily give the full list of files. For instance when skipping on my system the response always contains a single song which is the newly playing song. The logic that follows is then invalid.Here is the stack of the crash:
Replacing the
RemoveRange
with a for loop ofRemoveAt
seems to solve the crash.I've not seen this issue reported so maybe there's something on my setup that triggers both weird behaviors. The mpd server protocol version is 0.23.5 and it's the android version of the app.