Closed Vankog closed 7 years ago
Oh geez! I already saw this behaviour, but never in a Release build. 😞 The second exception and the crash are totally related to the first exception. The base cause, I think, is that somehow Toastify was not able to find the Spotify process (or it did found it, but didn't find its main window, that is used to check if Spotify is running – I might need to change this). It always happens when Toastify starts Spotify though, but yet it doesn't happen everytime – seems kinda random; my guess is that sometimes Spotify takes too long to start and there's some kind of timeout somewhere. 🤔
I have to investigate this.
Also, you say that it still ran after the second exception, but were you able to see the toast with Artist/Track info?
Yeah, the toast even updated to hide or show the bar. Just showed me the exception on first save and crashed silently on the second save.
But I couldn't reproduce this exception since then. So, might it be a problem in the unofficial API you are contributing to?
Nice label btw ^^
Nah, It's definitely a problem with Toastify – I can feel it. I just didn't manage correctly the process of "launch Spotify > wait for it > show Toastify or show error".
I think the best thing to do is to make Toastify kill itself if such an error occurs and show an informational message asking to restart it, instead of letting it run to eventually crash randomly in the end.
At least that's a valid workaround.
Should be definitely fixed in the new release, I hope. 🤞
Hooray! So it was just the missing previous version. Nice catch! Sounds hard to find.
Nay, the missing previous version thing was the cause of another unrelated bug. This issue, instead, has been worked around by moving the startup tasks (launching Spotify and connecting to it) to a background thread that shows an error message and shuts down the app if it is not able to terminate within a time limit. Unfortunately, I couldn't test the changes thoroughly because I was not able to replicate the same exact behaviour, but I think it should be ok.
only time will tell! :-)
hehe, the new version added some exceptions.
First one I did not capture, but it was something like an exception while opening spotify after toastify start. It worked anyway. I'll have an eye on this.
The second one came, after removing progress bar check and saving (loosely translated, because it was given in German):
It still ran afterwards, but after enabling the progress bar again and saving, Toastify crashed.
On the next start (spotify closed again) no exception occured during startup.
But the saving did not crash neither.