Skip to content

Fix for invalid memory address or nil pointer dereference#83

Open
Dharmey747 wants to merge 1 commit intoanaskhan96:masterfrom
Dharmey747:master
Open

Fix for invalid memory address or nil pointer dereference#83
Dharmey747 wants to merge 1 commit intoanaskhan96:masterfrom
Dharmey747:master

Conversation

@Dharmey747
Copy link

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/soup@v1.2.5/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.

ByteSizedMarius pushed a commit to ByteSizedMarius/soup that referenced this pull request Feb 16, 2024
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

Successfully merging this pull request may close these issues.

1 participant