2021/01/24 22:18:02.242994 handlers.go:69: Message [105609928126824448/374491861823520769/105608094721028096]: RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
2021/01/24 22:18:02.248536 handlers.go:105: > FILE: https://%{HTTP_HOST}%{REQUEST_URI}
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x38 pc=0xa55d57]
goroutine 4934 [running]:
main.tryDownload(0xc000606013, 0x22, 0x0, 0x0, 0xc00007ced0, 0x2b, 0xc0001231e0, 0x9d5b340, 0xed79fe91a, 0x10ceb20, ...)
/discord-downloader-go/downloads.go:461 +0x4f7
main.startDownload(0xc000606013, 0x22, 0x0, 0x0, 0xc00007c9f0, 0x2a, 0xc0001231e0, 0x9d5b340, 0xed79fe91a, 0x10ceb20, ...)
/discord-downloader-go/downloads.go:390 +0x195
main.handleMessage(0xc0001231e0, 0xc000704200)
/discord-downloader-go/handlers.go:107 +0x5dd
main.messageCreate(0xc00010e240, 0xc00000ebb0)
/discord-downloader-go/handlers.go:31 +0x33
github.com/bwmarrin/discordgo.messageCreateEventHandler.Handle(0xc3aae0, 0xc00010e240, 0xb30700, 0xc00000ebb0)
/go/pkg/mod/github.com/bwmarrin/[email protected]/eventhandlers.go:497 +0x4b
created by github.com/bwmarrin/discordgo.(*Session).handle
/go/pkg/mod/github.com/bwmarrin/[email protected]/event.go:171 +0x111
Running on Docker (custom alpine-based image) but most likely reproducible in all other environments too.
This happens on both newly posted messages as well as when downloading history (history download will not be able to go past that message unless it is deleted).