Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"panic: runtime error: invalid memory address or nil pointer dereference" on macOS #15

Open
kennethbruskiewicz opened this issue Apr 1, 2022 · 1 comment

Comments

@kennethbruskiewicz
Copy link

Following the instructions, I got to the point where all of the folders were created, the command was ready to run, etc... and this is what returned.

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

goroutine 1 [running]:
reflect.mapiternext(0x10041eb60?)
	/opt/homebrew/Cellar/go/1.18/libexec/src/runtime/map.go:1378 +0x20
github.com/modern-go/reflect2.(*UnsafeMapIterator).UnsafeNext(0x0?)
	/Users/kenneth/go/pkg/mod/github.com/modern-go/reflect2@v0.0.0-20180701023420-4b7aa43c6742/unsafe_map.go:136 +0x3c
github.com/json-iterator/go.(*mapEncoder).Encode(0x140002692f0, 0x1400012e968, 0x14000130780)
	/Users/kenneth/go/pkg/mod/github.com/json-iterator/go@v1.1.11/reflect_map.go:262 +0x3bc
github.com/json-iterator/go.(*onePtrEncoder).Encode(0x1400026b270, 0x14000269110, 0x14000278e80?)
	/Users/kenneth/go/pkg/mod/github.com/json-iterator/go@v1.1.11/reflect.go:219 +0x8c
github.com/json-iterator/go.(*Stream).WriteVal(0x14000130780, {0x10041fb80, 0x14000269110})
	/Users/kenneth/go/pkg/mod/github.com/json-iterator/go@v1.1.11/reflect.go:98 +0x174
github.com/json-iterator/go.(*Encoder).Encode(0x1400012e918, {0x10041fb80?, 0x14000269110?})
	/Users/kenneth/go/pkg/mod/github.com/json-iterator/go@v1.1.11/adapter.go:127 +0x34
github.com/amirgamil/apollo/pkg/apollo/backend.writeIndexToDisk()
	/Users/kenneth/git/apollo/pkg/apollo/backend/api.go:117 +0xec
github.com/amirgamil/apollo/pkg/apollo/backend.RefreshInvertedIndex()
	/Users/kenneth/git/apollo/pkg/apollo/backend/api.go:153 +0x1dc
main.main()
	/Users/kenneth/git/apollo/cmd/apollo.go:16 +0x24
exit status 2

Running on Golang version 1.18 built for ARM64. Thoughts?

@truemanluo
Copy link

just run go get -u github.com/json-iterator/go

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

No branches or pull requests

2 participants