Skip to content

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

Description

@kennethbruskiewicz

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions