From e2953ddee6fa3025fa0f975aad106758ee8e5e55 Mon Sep 17 00:00:00 2001 From: Magne Sjaastad Date: Sun, 13 Sep 2026 07:53:33 +0200 Subject: [PATCH 1/3] #14654 Fix Linux Release build defining NO_DEBUG instead of NDEBUG CMAKE_CXX_FLAGS_RELEASE was overwritten with -DNO_DEBUG on Linux in both CMakeLists.txt and Fwk/CMakeLists.txt. NO_DEBUG is not a standard macro, so NDEBUG was never defined in Linux Release builds. As a result, cafAssert.h fell back to CAF_ENABLE_ASSERTS 1, keeping CAF_ASSERT (and standard assert()) active in Release and aborting the app, even though RESINSIGHT_ENABLE_ASSERTS_IN_RELEASE defaults to OFF. Windows and macOS Release builds were unaffected. Drop the override entirely so CMake supplies its default Release flags (-O3 -DNDEBUG) on Linux, matching Windows and macOS. Also simplify CEE_USE_QT5/CEE_USE_QT6 handling: set them directly instead of via option() with malformed NOT DEFINED(...) guards. --- CMakeLists.txt | 3 +-- Fwk/AppFwk/CMakeLists.txt | 11 +++-------- Fwk/CMakeLists.txt | 1 - 3 files changed, 4 insertions(+), 11 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 55ceb795bd3..ccd85a3505a 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -67,7 +67,7 @@ set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}) set(VIZ_MODULES_FOLDER_NAME Fwk/VizFwk) -message(STATUS "Set CEE_USE_QT6 to ON") +# Instruct cvf to use Qt6 set(CEE_USE_QT5 OFF) set(CEE_USE_QT6 ON) @@ -141,7 +141,6 @@ if(${CMAKE_SYSTEM_NAME} MATCHES "Linux") ) endif() set(CMAKE_CXX_FLAGS_DEBUG "-ggdb -g3 -O0 -DDEBUG -D_DEBUG") - set(CMAKE_CXX_FLAGS_RELEASE "-O2 -DNO_DEBUG") endif() include(cmake/StdStacktrace.cmake) diff --git a/Fwk/AppFwk/CMakeLists.txt b/Fwk/AppFwk/CMakeLists.txt index 061cd4399c0..5117fcf6ec1 100644 --- a/Fwk/AppFwk/CMakeLists.txt +++ b/Fwk/AppFwk/CMakeLists.txt @@ -19,14 +19,9 @@ if(MSVC) set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /MP") endif() -# Qt -if(NOT DEFINED (CEE_USE_QT5)) - option(CEE_USE_QT5 "Use Qt5" ON) -endif(NOT DEFINED (CEE_USE_QT5)) - -if(NOT DEFINED (CEE_USE_QT6)) - option(CEE_USE_QT6 "Use Qt6" OFF) -endif(NOT DEFINED (CEE_USE_QT6)) +# Instruct cvf to use Qt6 +set(CEE_USE_QT5 OFF) +set(CEE_USE_QT6 ON) # CeeViz is not available here, exclude it from the build set(CAF_EXCLUDE_CVF ON) diff --git a/Fwk/CMakeLists.txt b/Fwk/CMakeLists.txt index 92d24fc1fbf..5eaeb1aaa75 100644 --- a/Fwk/CMakeLists.txt +++ b/Fwk/CMakeLists.txt @@ -29,7 +29,6 @@ if(${CMAKE_SYSTEM_NAME} MATCHES "Linux") "-DCVF_LINUX -pipe -Wextra -Woverloaded-virtual -Wformat -Wno-unused-parameter" ) set(CMAKE_CXX_FLAGS_DEBUG "-ggdb -g3 -O0 -DDEBUG -D_DEBUG") - set(CMAKE_CXX_FLAGS_RELEASE "-O2 -DNO_DEBUG") endif() find_package( From 138d2127d70280519ccd68dd88d21049dcc8a279 Mon Sep 17 00:00:00 2001 From: Magne Sjaastad Date: Sun, 13 Sep 2026 09:38:48 +0200 Subject: [PATCH 2/3] #14654 Fix uninitialized VfpValueSelection members causing Linux Release build failure Default-initialize the double members of VfpValueSelection to 0.0. computeValueSelectionCombinations() in RimCustomVfpPlot.cpp only sets the fields corresponding to non-family production variables, leaving the family variable's field unset. With -O3 now enabled on Linux Release builds (after removing the NO_DEBUG/NDEBUG flag override), GCC's -Werror=maybe-uninitialized flags this as an error. --- ApplicationLibCode/ReservoirDataModel/RigVfpTables.h | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/ApplicationLibCode/ReservoirDataModel/RigVfpTables.h b/ApplicationLibCode/ReservoirDataModel/RigVfpTables.h index 8216e320952..45445b265c3 100644 --- a/ApplicationLibCode/ReservoirDataModel/RigVfpTables.h +++ b/ApplicationLibCode/ReservoirDataModel/RigVfpTables.h @@ -79,11 +79,11 @@ struct VfpTableSelection struct VfpValueSelection { - double flowRateValue; - double thpValue; - double artificialLiftQuantityValue; - double waterCutValue; - double gasLiquidRatioValue; + double flowRateValue = 0.0; + double thpValue = 0.0; + double artificialLiftQuantityValue = 0.0; + double waterCutValue = 0.0; + double gasLiquidRatioValue = 0.0; std::vector familyValues; }; From 1016b9bd207be227b16e8ff7699b682378783cb4 Mon Sep 17 00:00:00 2001 From: Magne Sjaastad Date: Sun, 13 Sep 2026 19:57:52 +0200 Subject: [PATCH 3/3] #14654 Fix uninitialized intersectedCellFaceOut in MSW table data export WellPathCellIntersectionInfo has no default member initializers, and filterIntersections() only assigned intersectedCellFaceOut inside the if/else-if pair. When both faces of the first intersection are NO_FACE, the member was copied into the result vector while indeterminate. GCC detects this at -O3 and the Linux Release build failed with -Werror=maybe-uninitialized. --- .../RicWellPathExportMswTableData.cpp | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/ApplicationLibCode/Commands/CompletionExportCommands/RicWellPathExportMswTableData.cpp b/ApplicationLibCode/Commands/CompletionExportCommands/RicWellPathExportMswTableData.cpp index bb1509ce390..bea3a376003 100644 --- a/ApplicationLibCode/Commands/CompletionExportCommands/RicWellPathExportMswTableData.cpp +++ b/ApplicationLibCode/Commands/CompletionExportCommands/RicWellPathExportMswTableData.cpp @@ -207,12 +207,13 @@ std::vector WellPathCellIntersectionInfo extraIntersection; - extraIntersection.globCellIndex = std::numeric_limits::max(); - extraIntersection.startPoint = intersectionPoint; - extraIntersection.endPoint = firstIntersection.startPoint; - extraIntersection.startMD = initialMD; - extraIntersection.endMD = firstIntersection.startMD; - extraIntersection.intersectedCellFaceIn = cvf::StructGridInterface::NO_FACE; + extraIntersection.globCellIndex = std::numeric_limits::max(); + extraIntersection.startPoint = intersectionPoint; + extraIntersection.endPoint = firstIntersection.startPoint; + extraIntersection.startMD = initialMD; + extraIntersection.endMD = firstIntersection.startMD; + extraIntersection.intersectedCellFaceIn = cvf::StructGridInterface::NO_FACE; + extraIntersection.intersectedCellFaceOut = cvf::StructGridInterface::NO_FACE; if ( firstIntersection.intersectedCellFaceIn != cvf::StructGridInterface::NO_FACE )