servitor icon indicating copy to clipboard operation
servitor copied to clipboard

feed crashes with some urls

Open rrobin-pr opened this issue 1 year ago • 0 comments

Using the master branch (7c711782926e14933ab8ab995ac7681ea5f3a4f0)

[feeds]
lemmy = [
	"@[email protected]",
]

and running ./servitor feed lemmy gets me a crash

panic: value method servitor/splicer.Splicer.Harvest called using nil *Splicer pointer

                                                                                      goroutine 13 [running]:
                                                                                                             servitor/splicer.(*Splicer).Harvest(0xc00020c250?, 0x0?, 0x0?)
                                                                                                                                                                             <autogenerated>:1 +0x46
                      servitor/ui.(*State).loadSurroundings.func2()
                                                                        servitor/ui/ui.go:382 +0x3a
                                                                                                                               created by servitor/ui.(*State).loadSurroundings in goroutine 18
                        servitor/ui/ui.go:380 +0x185

The terminal output is left garbled too (and requires a reset).

Strangely this does not happen with other feeds e.g. this does not crash:

lemmy = [
	"@[email protected]",
	"@[email protected]",
]

I took a quick glimpse at the code at it seems related to quantity being 0 in Harvest (but take it with a grain of salt, I have 0 knowledge of golang).

rrobin-pr avatar Jun 08 '24 13:06 rrobin-pr