Skip to content

nil exeption at internal/decoder/slice.go:65 #268

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

Closed
6543 opened this issue Jul 24, 2021 · 4 comments · Fixed by #276
Closed

nil exeption at internal/decoder/slice.go:65 #268

6543 opened this issue Jul 24, 2021 · 4 comments · Fixed by #276
Labels
bug Something isn't working

Comments

@6543
Copy link

6543 commented Jul 24, 2021

version = v0.7.4

https://drone.gitea.io/go-gitea/gitea/42335/2/15

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

goroutine 47290 [running]:
testing.tRunner.func1.2(0x24db300, 0x44f29b0)
	/usr/local/go/src/testing/testing.go:1144 +0x332
testing.tRunner.func1(0xc004d59380)
	/usr/local/go/src/testing/testing.go:1147 +0x4b6
panic(0x24db300, 0x44f29b0)
	/usr/local/go/src/runtime/panic.go:965 +0x1b9
reflect.typedslicecopy(0x2493060, 0xc004fe9e60, 0x2, 0x2, 0x0, 0x2, 0x2, 0xf0)
	/usr/local/go/src/runtime/mbarrier.go:286 +0xaa
github.com/goccy/go-json/internal/decoder.(*sliceDecoder).newSlice(0xc0075fbf10, 0xc0065800a8, 0xf0)
	/drone/src/vendor/github.com/goccy/go-json/internal/decoder/slice.go:65 +0xc5
github.com/goccy/go-json/internal/decoder.(*sliceDecoder).DecodeStream(0xc0075fbf10, 0xc007880a20, 0x3, 0xc0065800a8, 0x9, 0x0)
	/drone/src/vendor/github.com/goccy/go-json/internal/decoder/slice.go:125 +0x3b2
github.com/goccy/go-json/internal/decoder.(*structDecoder).DecodeStream(0xc008fac3c0, 0xc007880a20, 0x2, 0xc006580000, 0xc008438090, 0xc006747570)
	/drone/src/vendor/github.com/goccy/go-json/internal/decoder/struct.go:702 +0x709
github.com/goccy/go-json/internal/decoder.(*ptrDecoder).DecodeStream(0xc0036f2180, 0xc007880a20, 0x1, 0xc006747570, 0x1ff, 0x1ff)
	/drone/src/vendor/github.com/goccy/go-json/internal/decoder/ptr.go:55 +0x96
github.com/goccy/go-json/internal/decoder.(*sliceDecoder).DecodeStream(0xc0075fbf80, 0xc007880a20, 0x1, 0xc003548fa8, 0x0, 0xc003d5a000)
	/drone/src/vendor/github.com/goccy/go-json/internal/decoder/slice.go:149 +0x542
github.com/goccy/go-json.(*Decoder).DecodeWithOption(0xc004fa54f0, 0x237bf20, 0xc003548fa8, 0x0, 0x0, 0x0, 0xc007880a20, 0xc006e88000)
	/drone/src/vendor/github.com/goccy/go-json/decode.go:202 +0x131
github.com/goccy/go-json.(*Decoder).Decode(0xc004fa54f0, 0x237bf20, 0xc003548fa8, 0x2f20480, 0xc004fa54f0)
	/drone/src/vendor/github.com/goccy/go-json/decode.go:168 +0x50
code.gitea.io/gitea/integrations.DecodeJSON(0x2f78ae8, 0xc004d59380, 0xc0024f8c80, 0x237bf20, 0xc003548fa8)
	/drone/src/integrations/integration_test.go:511 +0x92
code.gitea.io/gitea/integrations.TestAPISearchIssues(0xc004d59380)
	/drone/src/integrations/api_issue_test.go:223 +0x1115
testing.tRunner(0xc004d59380, 0x2ad0950)
	/usr/local/go/src/testing/testing.go:1194 +0xef
@IncSW
Copy link
Contributor

IncSW commented Jul 31, 2021

@6543 Can you tell which version of go was used and is it possible to write a test case?
I tried it on gitea@main test-sqlite with go1.16 linux/amd64, but cant reproduce.

@6543
Copy link
Author

6543 commented Aug 11, 2021

go-gitea/gitea#14914 - go version go1.16 linux/amd64

@goccy goccy added the bug Something isn't working label Aug 12, 2021
@goccy
Copy link
Owner

goccy commented Aug 12, 2021

@6543
I cloned github.com/zeripath/gitea and tried to reproduce this issue in the go-json branch,
but I didn't know how to test it. Could you tell me the specific procedure to reproduce this issue ?

@zeripath
Copy link

this is #275

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants