soup icon indicating copy to clipboard operation
soup copied to clipboard

Fix for `invalid memory address or nil pointer dereference`

Open Dharmey747 opened this issue 2 years ago • 0 comments

Error log:

panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x8 pc=0x796022]

goroutine XXXX [running]:
github.com/anaskhan96/soup.Root.Text({0x0, {0x0, 0x0}, {0x8efd40, 0xc0b11e8a08}})
	/root/go/pkg/mod/github.com/anaskhan96/[email protected]/soup.go:415 +0x42

This error seems to be happening when running thousands(+) of goroutines that are interacting with the library. This quick patch that I've applied seems to be fixing it and avoids the entire program from panicking.

Dharmey747 avatar Nov 02 '23 18:11 Dharmey747