Panic error at а random time in Workflow

There is a Workflow that is responsible for importing objects from a file. A separate Activity provides import of one object. The import starts successfully and the objects are created. But after processing about 30 objects (out of 90), Workflow restarts again (there are no errors in the import code). However, the Activity code is not called. Then Workflow is restarted again. This happens about 5-6 times and the import stops running. The process remains in Running status. The Temporal history for the process contains the following errors:

PanicError: runtime error: invalid memory address or nil pointer dereference

process event for queue_import_area_list [panic]:
github.com/temporalio/roadrunner-temporal/v3/internal/codec/proto.(*Codec).Decode(0xc00083e180, 0xc001cc0bc0, 0xc0022d0dc8)
	github.com/temporalio/roadrunner-temporal/v3@v3.0.0/internal/codec/proto/proto.go:92 +0x24e
github.com/temporalio/roadrunner-temporal/v3/aggregatedpool.(*Workflow).flushQueue(0xc000a24000)
	github.com/temporalio/roadrunner-temporal/v3@v3.0.0/aggregatedpool/handler.go:368 +0x392
github.com/temporalio/roadrunner-temporal/v3/aggregatedpool.(*Workflow).OnWorkflowTaskStarted(0xc000a24000, 0xc001a61400?)
	github.com/temporalio/roadrunner-temporal/v3@v3.0.0/aggregatedpool/workflow.go:142 +0x1a9
go.temporal.io/sdk/internal.(*workflowExecutionEventHandlerImpl).ProcessEvent(0xc002970618, 0xc001a61480, 0x98?, 0x0)
	go.temporal.io/sdk@v1.21.1/internal/internal_event_handlers.go:917 +0x1e6
go.temporal.io/sdk/internal.(*workflowExecutionContextImpl).ProcessWorkflowTask(0xc0000a62d0, 0xc00090f3b0)
	go.temporal.io/sdk@v1.21.1/internal/internal_task_handlers.go:915 +0xf3f
go.temporal.io/sdk/internal.(*workflowTaskHandlerImpl).ProcessWorkflowTask(0xc002f3c780, 0xc00090f3b0, 0xc000766d50)
	go.temporal.io/sdk@v1.21.1/internal/internal_task_handlers.go:739 +0x4f6
go.temporal.io/sdk/internal.(*workflowTaskPoller).processWorkflowTask(0xc00093f1d0, 0xc00090f3b0)
	go.temporal.io/sdk@v1.21.1/internal/internal_task_pollers.go:323 +0x2dc
go.temporal.io/sdk/internal.(*workflowTaskPoller).ProcessTask(0xc00093f1d0, {0x1811640?, 0xc00090f3b0})
	go.temporal.io/sdk@v1.21.1/internal/internal_task_pollers.go:296 +0x6c
go.temporal.io/sdk/internal.(*baseWorker).processTask(0xc0004ec8c0, {0x1811200?, 0xc0007e6620})
	go.temporal.io/sdk@v1.21.1/internal/internal_worker_base.go:440 +0x167
created by go.temporal.io/sdk/internal.(*baseWorker).runTaskDispatcher
	go.temporal.io/sdk@v1.21.1/internal/internal_worker_base.go:334 +0xb5

What could be the reason for this behavior? What Temporal settings can affect this?

Hey @Kate :wave:
Looks like that you’re using a hugely outdated RR version :slightly_smiling_face:. Could you please update it? There are no breaking changes in userland.