mirror of
https://github.com/OPM/ResInsight.git
synced 2026-10-25 06:38:13 -05:00
#14121 Well Path: prevent crash when exporting completions for a non-existing well path
When a project references an RMS well path file that no longer exists, the well path geometry is null. The MSW completion export validated the eclipse case, well path, and MSW parameters but not the geometry, so generateCellSegments asserted and crashed when triggering Export Completion Data for Visible Well Paths. Guard the single MSW export dispatcher extractSingleWellMswData with a well path geometry null check that returns an error, protecting all export callers. Harden generateCellSegments to return empty instead of asserting on null geometry. Also log a warning on the interactive well path import path when a file cannot be read, matching the existing project-load behavior. Fixes #14121.
This commit is contained in:
1 parent
b20fcd5138
commit
253d57f1a5
2 files changed
+11
-2
No files matched your search
@@ -412,7 +412,11 @@ std::vector<RimWellPath*> RimWellPathCollection::readAndAddWellPaths( std::vecto
|
||||
std::vector<RimWellPath*> addedWellPaths;
|
||||
for ( RimFileWellPath* wellPath : wellPathArray )
|
||||
{
|
||||
wellPath->readWellPathFile( nullptr, m_wellPathImporter.get(), true );
|
||||
QString errorMessage;
|
||||
if ( !wellPath->readWellPathFile( &errorMessage, m_wellPathImporter.get(), true ) )
|
||||
{
|
||||
RiaLogging::warning( errorMessage.toStdString() );
|
||||
}
|
||||
|
||||
progress.setProgressDescription( QString( "Reading file %1" ).arg( wellPath->name() ) );
|
||||
|
||||
|
||||
Reference in new issue
Block a user