Skip to content

fixing nil pointer exception for Getters#226

Merged
EnriqueL8 merged 1 commit into
hyperledger-firefly:mainfrom
kaleido-io:cache-race-fix
Jun 30, 2026
Merged

fixing nil pointer exception for Getters#226
EnriqueL8 merged 1 commit into
hyperledger-firefly:mainfrom
kaleido-io:cache-race-fix

Conversation

@Chengxuan

@Chengxuan Chengxuan commented Jun 30, 2026

Copy link
Copy Markdown
Contributor

The get methods are not parsing the retrieved value, instead, they call Get method to retrieve the value again.

This caused nil pointer exception when the cache value had expired or been deleted.

2026-06-29T12:26:35.548Z] ERROR observed panic (execMapped) 'interface conversion: interface {} is nil, not string': goroutine 433125 [running]:
runtime/debug.Stack()
	/usr/local/go/src/runtime/debug/stack.go:26 +0x5e
github.com/kaleido-io/workflow-engine/pkg/enginesdk.execMapped[...].func1()
	/workflow-engine/pkg/enginesdk/txn_handler.go:442 +0x7c
panic({0x1af4920?, 0xc000cc05d0?})
	/usr/local/go/src/runtime/panic.go:783 +0x132
github.com/hyperledger/firefly-common/pkg/cache.(*CCache).GetString(0xc00047bef0, {0xc000c69c00, 0x3a})
	/go/pkg/mod/github.com/hyperledger/firefly-common@v1.5.11-0.20260428164525-50bebf579bab/pkg/cache/cache.go:127 +0x77

Signed-off-by: Chengxuan Xing <chengxuan.xing@kaleido.io>
@Chengxuan Chengxuan requested a review from a team as a code owner June 30, 2026 06:30

@EnriqueL8 EnriqueL8 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch!

@EnriqueL8 EnriqueL8 merged commit 1f05c39 into hyperledger-firefly:main Jun 30, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants