fix: panic for nil pointer dereference runRangeCheck #105
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
fixing this panic:
time="2025-07-11T15:07:14Z" level=error msg="task execution panic: runtime error: invalid memory address or nil pointer dereference, stack: goroutine 254 [running]:\nruntime/debug.Stack()\n\t/opt/hostedtoolcache/go/1.24.4/x64/src/runtime/debug/stack.go:26 +0x5e\ngithub.com/ethpandaops/assertoor/pkg/coordinator/scheduler.(*TaskScheduler).ExecuteTask.func6()\n\t/home/runner/work/assertoor/assertoor/pkg/coordinator/scheduler/task_execution.go:143 +0xd2\npanic({0x1388940?, 0x2526620?})\n\t/opt/hostedtoolcache/go/1.24.4/x64/src/runtime/panic.go:792 +0x132\ngithub.com/ethpandaops/assertoor/pkg/coordinator/tasks/check_consensus_slot_range.(*Task).runRangeCheck(0xc00158e370)\n\t/home/runner/work/assertoor/assertoor/pkg/coordinator/tasks/check_consensus_slot_range/task.go:102 +0x59\ngithub.com/ethpandaops/assertoor/pkg/coordinator/tasks/check_consensus_slot_range.(*Task).Execute(0xc00158e370, {0x1affe30, 0xc00158e500})\n\t/home/runner/work/assertoor/assertoor/pkg/coordinator/tasks/check_consensus_slot_range/task.go:80 +0xf3\ngithub.com/ethpandaops/assertoor/pkg/coordinator/scheduler.(*TaskScheduler).ExecuteTask(0xc001377ba0, {0x1affea0, 0xc001585340}, 0x13d0440?, 0xc00155f550)\n\t/home/runner/work/assertoor/assertoor/pkg/coordinator/scheduler/task_execution.go:156 +0xa26\ngithub.com/ethpandaops/assertoor/pkg/coordinator/scheduler.(*TaskScheduler).RunTasks(0xc001377ba0, {0x1affe30, 0xc0000f26e0}, 0x68c61714000)\n\t/home/runner/work/assertoor/assertoor/pkg/coordinator/scheduler/scheduler.go:88 +0x225\ngithub.com/ethpandaops/assertoor/pkg/coordinator/test.(*Test).Run(0xc0000d2a50, {0x1affe30, 0xc0000f26e0})\n\t/home/runner/work/assertoor/assertoor/pkg/coordinator/test/test.go:211 +0x27f\ngithub.com/ethpandaops/assertoor/pkg/coordinator.(*TestRunner).runTest(0x0?, {0x1affe30, 0xc0000f26e0}, {0x1b0c7e0, 0xc0000d2a50})\n\t/home/runner/work/assertoor/assertoor/pkg/coordinator/testrunner.go:200 +0x106\ngithub.com/ethpandaops/assertoor/pkg/coordinator.(*TestRunner).RunTestExecutionLoop.func1({0x1b0c7e0?, 0xc0000d2a50?})\n\t/home/runner/work/assertoor/assertoor/pkg/coordinator/testrunner.go:159 +0x72\ncreated by github.com/ethpandaops/assertoor/pkg/coordinator.(*TestRunner).RunTestExecutionLoop in goroutine 35\n\t/home/runner/work/assertoor/assertoor/pkg/coordinator/testrunner.go:168 +0x2dc\n" RunID=1 TestID=w