Skip to content

Fix four crashes found by stacktrace triage - #14591

Open
magnesj wants to merge 4 commits into
OPM:devfrom
magnesj:crash-fixes-2026-08-21
Open

Fix four crashes found by stacktrace triage#14591
magnesj wants to merge 4 commits into
OPM:devfrom
magnesj:crash-fixes-2026-08-21

Conversation

@magnesj

@magnesj magnesj commented Aug 23, 2026

Copy link
Copy Markdown
Member

Fixes #14587
Fixes #14588
Fixes #14589
Fixes #14590

Four unrelated crashes found by triage of the stacktrace reports for 2026.06.1. One commit per issue.

#14587 Missing displacements in GeoMech intersections

Problem: RivFemIntersectionGrid::cellCornerVertices() reads displacements[nodeIdx] based on isDisplacementsUsed() alone. The displacement vector is empty when reading displacements for the current time step fails, or when the part id is unknown, and the read goes out of bounds.

Fix: Use displacements only when there is one displacement per node, the same guard as in RivFemPartGeometryGenerator and RivFemPartPartMgr.

#14588 Project close while the main window is being destroyed

Problem: The main windows have Qt::WA_DeleteOnClose. Events dispatched during ~RiuMainWindow() can make Qt emit lastWindowClosed, which closes the project and calls cleanupGuiBeforeProjectClose() on the window currently being destroyed. RiaGuiApplication::m_mainWindow is a QPointer, and is not cleared until ~QObject() runs, so the existing null check does not catch this.

Fix: Flag the window as being destroyed at the start of the destructor, and skip GUI cleanup for a window in that state. Both main windows are handled, as both use WA_DeleteOnClose.

#14589 Parse error in element property file

Problem: RifElementPropertyTableReader::readData() throws FileParseException for a malformed file. The exception propagates out of RigFemPartResultsCollection::findOrLoadScalarResult() and through the Qt event loop, and terminates the application.

Fix: Catch the exception where the file is read, log an error and return no data, as done for other file readers using FileParseException.

#14590 Missing grid data in a shared grid ensemble

Problem: RimReservoirGridEnsemble::loadGridsInSharedMode() calls eclipseCaseData()->setMainGrid() for all cases. RimEclipseResultCase::openAndReadActiveCellData() returns without creating case data if the grid file is missing or cannot be read, and the call is done on a null pointer.

Fix: Skip cases without case data and log a warning, and guard the case data of the first case and an empty list of cases.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

1 participant