Girbons/comics-downloader

Segmentation fault

billsargent opened this issue · 3 comments

I downloaded the linux build directly from github and this is the error I get on Ubuntu. I built the binary myself and it says the same thing.

./comics-downloader -url=https://www.mangatown.com/lists/43819     
INFO[0000] Downloading...                               
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x8 pc=0x701e35]

goroutine 1 [running]:
github.com/anaskhan96/soup.findAllofem.func1(0xc000040400, {0xc0000c2700, 0x0, 0x1}, 0x78)
        /Users/girbons/go/pkg/mod/github.com/anaskhan96/soup@v1.2.4/soup.go:534 +0x1d5
github.com/anaskhan96/soup.findAllofem(0xc0004e3a18, {0xc0000c2700, 0x1, 0x1}, 0x0)
        /Users/girbons/go/pkg/mod/github.com/anaskhan96/soup@v1.2.4/soup.go:538 +0xe4
github.com/anaskhan96/soup.Root.FindAll({0x0, {0x0, 0x0}, {0x839c80, 0xc00033e4b0}}, {0xc0000c2700, 0x45dc1b, 0xc0000001a0})
        /Users/girbons/go/pkg/mod/github.com/anaskhan96/soup@v1.2.4/soup.go:283 +0x7e
github.com/Girbons/comics-downloader/pkg/sites.(*Mangatown).RetrieveIssueLinks(0xc000206260)
        /Users/girbons/go/src/github.com/Girbons/comics-downloader/pkg/sites/mangatown.go:116 +0x325
github.com/Girbons/comics-downloader/pkg/sites.LoadComicFromSource(0xc00010f720)
        /Users/girbons/go/src/github.com/Girbons/comics-downloader/pkg/sites/loader.go:111 +0x282
github.com/Girbons/comics-downloader/cmd/app.download(0xc00010f720)
        /Users/girbons/go/src/github.com/Girbons/comics-downloader/cmd/app/downloader.go:77 +0x305
github.com/Girbons/comics-downloader/cmd/app.Run(0xc00010f720)
        /Users/girbons/go/src/github.com/Girbons/comics-downloader/cmd/app/downloader.go:123 +0x170
main.main()
        /Users/girbons/go/src/github.com/Girbons/comics-downloader/cmd/downloader/main.go:86 +0x22a
root@work:~# 

Hi @billsargent,

Seems like mangatown changed the html structure, I'll try to provide a fix asap!

I didn't even think to try it on another site. My apologies. -- I got your program just to try to get a single manga and when it failed with a segfault, I just assumed something more serious was wrong or that I was missing something needed to run. Thanks for your quick response!

I didn't even think to try it on another site. My apologies. -- I got your program just to try to get a single manga and when it failed with a segfault, I just assumed something more serious was wrong or that I was missing something needed to run. Thanks for your quick response!

Don't worry!
I noticed now the url you used, downloading a lists is not supported.