From 5cd72f55f3cfd299583b5a4dc1a191b14d84402b Mon Sep 17 00:00:00 2001 From: Magne Sjaastad Date: Tue, 3 Aug 2021 14:34:51 +0200 Subject: [PATCH] #7852 Crash on dual porosity grid model load and clicking on cell in 3D view --- .../opm-flowdiagnostics-applications/opm/utility/ECLGraph.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/ThirdParty/custom-opm-flowdiag-app/opm-flowdiagnostics-applications/opm/utility/ECLGraph.cpp b/ThirdParty/custom-opm-flowdiag-app/opm-flowdiagnostics-applications/opm/utility/ECLGraph.cpp index f83a13eb24..663893a0f6 100644 --- a/ThirdParty/custom-opm-flowdiag-app/opm-flowdiagnostics-applications/opm/utility/ECLGraph.cpp +++ b/ThirdParty/custom-opm-flowdiag-app/opm-flowdiagnostics-applications/opm/utility/ECLGraph.cpp @@ -1233,7 +1233,9 @@ deriveNeighbours(const std::vector& gcells, continue; } - if (T[globID] > 0.0) { + // Guard access to transmissibility vector. Crash seen in some dual porosity models + // https://github.com/OPM/ResInsight/issues/7852 + if (globID < T.size() && T[globID] > 0.0) { const auto other = this->cells_.getNeighbour(globID, d); if ((other >= 0) && ! this->cells_.isSubdivided(other)) {