#14423 Fix crash when closing summary cases referred by a delta ensemble - #14424
Draft
magnesj wants to merge 1 commit into
Draft
#14423 Fix crash when closing summary cases referred by a delta ensemble#14424magnesj wants to merge 1 commit into
magnesj wants to merge 1 commit into
Conversation
…semble Removing a source case makes a delta ensemble recreate and delete its derived cases. Those cases are part of the list being removed, leaving dangling pointers that crash in PdmObjectHandle::prepareForDelete(). Use guarded pointers and return only the surviving cases.
magnesj
marked this pull request as draft
July 31, 2026 09:46
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Fixes #14423
Problem
RimSummaryCaseMainCollection::allSummaryCases()includes the derived cases of a delta ensemble. When a source case is removed, the delta ensemble recreates its derived cases and deletes the ones no longer in use. Those objects are still present in the list being removed, soRicCloseSummaryCaseFeature::deleteSummaryCasespasses dangling pointers toAsyncPdmObjectVectorDeleter, crashing inPdmObjectHandle::prepareForDelete().Fix
Use guarded
caf::PdmPointerinremoveCases()to skip cases deleted as a side effect, and return only the surviving cases. Adds a unit test that reproduces the crash.