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]:*Codec).Decode(0xc00083e180, 0xc001cc0bc0, 0xc0022d0dc8) +0x24e*Workflow).flushQueue(0xc000a24000) +0x392*Workflow).OnWorkflowTaskStarted(0xc000a24000, 0xc001a61400?) +0x1a9*workflowExecutionEventHandlerImpl).ProcessEvent(0xc002970618, 0xc001a61480, 0x98?, 0x0) +0x1e6*workflowExecutionContextImpl).ProcessWorkflowTask(0xc0000a62d0, 0xc00090f3b0) +0xf3f*workflowTaskHandlerImpl).ProcessWorkflowTask(0xc002f3c780, 0xc00090f3b0, 0xc000766d50) +0x4f6*workflowTaskPoller).processWorkflowTask(0xc00093f1d0, 0xc00090f3b0) +0x2dc*workflowTaskPoller).ProcessTask(0xc00093f1d0, {0x1811640?, 0xc00090f3b0}) +0x6c*baseWorker).processTask(0xc0004ec8c0, {0x1811200?, 0xc0007e6620}) +0x167
created by*baseWorker).runTaskDispatcher +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.