Join GitHub today
GitHub is home to over 36 million developers working together to host and review code, manage projects, and build software together.Sign up
runtime: panic: runtime error: index out of range #30063
What version of Go are you using (
changed the title
runtime1.go:474 cause panic runtime error: index out of range
Feb 2, 2019
This doesn't make much sense. There should always be at least one module.
Can you add a few more prints:
That will let us know if the data is computed incorrectly to start, or whether it gets lost subsequently.
@randall77 thanks for your reply for me.
Here was the print results:
The modules slice is getting corrupted somehow. I don't see how that's possible. The rest of this post is grasping at straws...
Bug in GC?
That will provide another GC root that might keep the modules slice alive.
You might also try 1.11 and 1.12, to see if that affects anything.