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

Podcast episode w/o audio causes segfault #269

Closed
brian-doherty opened this issue Dec 9, 2022 · 2 comments
Closed

Podcast episode w/o audio causes segfault #269

brian-doherty opened this issue Dec 9, 2022 · 2 comments

Comments

@brian-doherty
Copy link
Contributor

2022/12/09 11:41:27 failed to find audio in feed item, skipping
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0xc8 pc=0x8e3872]

goroutine 50133 [running]:
go.senan.xyz/gonic/podcasts.(*Podcasts).AddNewEpisodes(0xc0002c2e10, 0xc0003906c0, {0xc000bae800?, 0xc7, 0x100})
/home/brian/gonic/podcasts/podcasts.go:173 +0x212
go.senan.xyz/gonic/podcasts.(*Podcasts).refreshPodcasts(0xc0001c1e10?, {0xc0000bc1c0, 0x7, 0x0?})
/home/brian/gonic/podcasts/podcasts.go:301 +0x2df
go.senan.xyz/gonic/podcasts.(*Podcasts).RefreshPodcasts(0xc0002c2e10)
/home/brian/gonic/podcasts/podcasts.go:286 +0xdd
go.senan.xyz/gonic/server.(*Server).StartPodcastRefresher.func1()
/home/brian/gonic/server/server.go:398 +0x98
go.senan.xyz/gonic/server.(*Server).StartPodcastRefresher.func2()
/home/brian/gonic/server/server.go:406 +0x43
github.com/oklog/run.(*Group).Run.func1({0xc000442f00?, 0xc0002a8048?})
/home/brian/go/pkg/mod/github.com/oklog/run@v1.1.0/group.go:38 +0x2f
created by github.com/oklog/run.(*Group).Run
/home/brian/go/pkg/mod/github.com/oklog/run@v1.1.0/group.go:37 +0x22a

AddEpisode returned nil, nil in this case which shouldn't be hit. Recommend it return an error of your choice instead so that the caller doesn't assume the episode returned is non nil.

@sentriz
Copy link
Owner

sentriz commented Dec 12, 2022

thanks, how does this look? b47c880

@brian-doherty
Copy link
Contributor Author

brian-doherty commented Dec 12, 2022 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants