mirror of
https://github.com/OPM/ResInsight.git
synced 2026-10-26 15:10:22 -05:00
#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<double>::operator=(cvf::Vector3<double> 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
This commit is contained in:
1 parent
45bcb34634
commit
8a0f2dc877
1 file changed
+1
@@ -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<cvf::Vec3d> polyLineForSection = { texturePart.rect[0], texturePart.rect[1] };
|
||||
|
||||
Reference in new issue
Block a user