Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Crash opening Top Tracks for an artist that is not an album artist #141

Closed
GutsyHeart opened this issue Apr 23, 2023 · 7 comments
Closed
Labels
bug Something isn't working

Comments

@GutsyHeart
Copy link

1 Open Favorites
2 Open traks
3 Open Artist
4 Open Top Tracks

2023/04/23 21:35:10   At: /home/user/.local/share/go/pkg/mod/github.com/dweymouth/fyne/v2@v2.3.0-rc1.0.20230407015007-c8e2aa472ae4/internal/svg/svg.go:27
2023/04/23 21:35:10 Fyne error:  could not load SVG, falling back to static content:
2023/04/23 21:35:10   Cause: XML syntax error on line 3: invalid character entity & (no semicolon)
2023/04/23 21:35:10   At: /home/user/.local/share/go/pkg/mod/github.com/dweymouth/fyne/v2@v2.3.0-rc1.0.20230407015007-c8e2aa472ae4/internal/svg/svg.go:27
2023/04/23 21:36:22 Failed to get artist: Error #10: please provide an `id` parameter
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x28 pc=0xae87c9]

goroutine 174 [running]:
supersonic/ui/browsing.(*ArtistPage).showTopTracks(0xc00280c540)
	/home/user/supersonic/ui/browsing/artistpage.go:180 +0xe9
created by supersonic/ui/browsing.(*ArtistPage).onViewChange
	/home/user/supersonic/ui/browsing/artistpage.go:207 +0x6b
@dweymouth
Copy link
Owner

Oof, sorry about that one! Looking at the code I can see that it can indeed crash if you click Top Tracks before the page has finished loading. Is that what happened here? (i.e. if you wait until the discography appears and then click "Top Tracks" it should no longer be crashing?) I will fix this in the next release

@dweymouth dweymouth added the bug Something isn't working label Apr 23, 2023
@dweymouth
Copy link
Owner

dweymouth commented Apr 23, 2023

Actually this line suggests you might be running into a different problem.

2023/04/23 21:36:22 Failed to get artist: Error #10: please provide an id parameter

What Subsonic server are you using? It's possible your server might not be setting the artistId property on the songs returned in the favorite songs list. Nonetheless it shouldn't be crashing, it should just fail to load or show an error message. I can't reproduce this on Navidrome

@dweymouth dweymouth added the needs-info An issue that needs more information label Apr 23, 2023
@GutsyHeart
Copy link
Author

What Subsonic server are you using?

Gonic

@dweymouth
Copy link
Owner

dweymouth commented Apr 23, 2023

I'll spin up a Gonic server to test on my end and see if I can reproduce this. It definitely should not crash so I'll fix that, but if Gonic isn't setting an artistId on the tracks in the favorite tracks list, there's no way to link from the track to the artist, so if that turns out to be the case I'll submit an issue with Gonic.

@dweymouth
Copy link
Owner

Just doing some investigation by looking at Gonic source code. Did the track that caused this crash have a different track artist than album artist? It looks like Gonic sets the artistId on tracks based on the album artist. Does this crash reproduce if you go to favorite tracks list and click an artist name from a track where the track artist == the album artist?

@dweymouth
Copy link
Owner

OK I confirmed this with Navidrome in the above case - navigating to the artist page of a track artist that is not an album artist. Such artists don't have IDs assigned on the server so can't be looked up with the GetArtist API. I will fix the crash but I will also look into disabling the hyperlinks for track artists that aren't also album artists.

@dweymouth dweymouth changed the title Crash open top tracks Crash opening Top Tracks for an artist that is not an album artist Apr 23, 2023
@dweymouth dweymouth removed the needs-info An issue that needs more information label Apr 23, 2023
@dweymouth
Copy link
Owner

Crash fixed. Filed #142 for disabling hyperlinks for track artists that aren't album artists

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants