Skip to content

#6206 Fix LLImageJ2CKDU shutdown order - #6207

Merged
akleshchev merged 1 commit into
developfrom
andreyk/viewer_6206
Aug 27, 2026
Merged

#6206 Fix LLImageJ2CKDU shutdown order#6207
akleshchev merged 1 commit into
developfrom
andreyk/viewer_6206

Conversation

@akleshchev

Copy link
Copy Markdown
Contributor

Fix for an ocational KDU cleanup crash.

Copilot AI 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.

Pull request overview

This PR adjusts the destruction order of Kakadu (KDU) decode-related objects in LLImageJ2CKDU::cleanupCodeStream() to prevent an occasional shutdown/cleanup crash by ensuring dependent objects are torn down before the objects they reference.

Changes:

  • Reset mDecodeState before mCodeStreamp, since LLKDUDecodeState is constructed with mCodeStreamp.get() and may retain/use that pointer during destruction.
  • Reset mCodeStreamp before mInputp, since the codestream is created from mInputp (mCodeStreamp->create(mInputp.get())) and may rely on it during teardown.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@akleshchev
akleshchev merged commit 47327c8 into develop Aug 27, 2026
20 checks passed
@akleshchev
akleshchev deleted the andreyk/viewer_6206 branch August 27, 2026 19:39
@github-actions github-actions Bot locked and limited conversation to collaborators Aug 27, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants