From 8a0f2dc877f1d886fcc7f4ae37238928095a16e4 Mon Sep 17 00:00:00 2001 From: Magne Sjaastad Date: Sun, 11 Oct 2026 19:12:43 +0200 Subject: [PATCH] #14906: Fix crash drawing seismic surface intersection lines for empty sections Crash signature 69f8ebe0f20e. RivSeismicSectionPartMgr::appendSurfaceIntersectionLines reads texturePart.rect[0] and rect[1] without a size check. texturedSection() clears rect and returns early when the section has no geometry, so the read is out of range. Skip parts with fewer than two corner points. Call stack: [3] cvf::Vector3::operator=(cvf::Vector3 const&) at ResInsight/Fwk/VizFwk/LibCore/cvfVector3.inl:140 [4] RimSeismicSectionCollection::appendPartsToModel(Rim3dView*, cvf::ModelBasicList*, caf::DisplayCoordTransform*, cvf::BoundingBox const&) at ResInsight/ApplicationLibCode/ProjectDataModel/Seismic/RimSeismicSectionCollection.cpp:183 [5] RimGeoMechView::onCreateDisplayModel() at ResInsight/ApplicationLibCode/ProjectDataModel/GeoMech/RimGeoMechView.cpp:322 [6] Rim3dView::createDisplayModelAndRedraw() at ResInsight/ApplicationLibCode/ProjectDataModel/Rim3dView.cpp:718 [7] RiaViewRedrawScheduler::updateAndRedrawScheduledViews() at ResInsight/ApplicationLibCode/Application/RiaViewRedrawScheduler.cpp:93 [12] RiaGuiApplication::notify(QObject*, QEvent*) at ResInsight/ApplicationLibCode/Application/RiaGuiApplication.cpp:1828 [22] main at ResInsight/ApplicationExeCode/RiaMain.cpp:267 [23] __libc_start_main at :0 --- .../ModelVisualization/Seismic/RivSeismicSectionPartMgr.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/ApplicationLibCode/ModelVisualization/Seismic/RivSeismicSectionPartMgr.cpp b/ApplicationLibCode/ModelVisualization/Seismic/RivSeismicSectionPartMgr.cpp index 64fd01c391..9a690236fe 100644 --- a/ApplicationLibCode/ModelVisualization/Seismic/RivSeismicSectionPartMgr.cpp +++ b/ApplicationLibCode/ModelVisualization/Seismic/RivSeismicSectionPartMgr.cpp @@ -222,6 +222,7 @@ void RivSeismicSectionPartMgr::appendSurfaceIntersectionLines( cvf::ModelBasicLi for ( int i = 0; i < texSection->partsCount(); i++ ) { const auto& texturePart = texSection->part( i ); + if ( texturePart.rect.size() < 2 ) continue; // Each part of the seismic section is a rectangle, use two corners of the rectangle to create a polyline std::vector polyLineForSection = { texturePart.rect[0], texturePart.rect[1] };