apollo icon indicating copy to clipboard operation
apollo copied to clipboard

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

Open kennethbruskiewicz opened this issue 2 years ago • 1 comments

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/[email protected]/unsafe_map.go:136 +0x3c
github.com/json-iterator/go.(*mapEncoder).Encode(0x140002692f0, 0x1400012e968, 0x14000130780)
	/Users/kenneth/go/pkg/mod/github.com/json-iterator/[email protected]/reflect_map.go:262 +0x3bc
github.com/json-iterator/go.(*onePtrEncoder).Encode(0x1400026b270, 0x14000269110, 0x14000278e80?)
	/Users/kenneth/go/pkg/mod/github.com/json-iterator/[email protected]/reflect.go:219 +0x8c
github.com/json-iterator/go.(*Stream).WriteVal(0x14000130780, {0x10041fb80, 0x14000269110})
	/Users/kenneth/go/pkg/mod/github.com/json-iterator/[email protected]/reflect.go:98 +0x174
github.com/json-iterator/go.(*Encoder).Encode(0x1400012e918, {0x10041fb80?, 0x14000269110?})
	/Users/kenneth/go/pkg/mod/github.com/json-iterator/[email protected]/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?

kennethbruskiewicz avatar Apr 01 '22 23:04 kennethbruskiewicz

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

truemanluo avatar Jan 05 '24 13:01 truemanluo