Commit Graph
523 Commits
Author SHA1 Message Date
Kristian Bendiksen c87fff08d6 Revert "#14714 Add opt-in native window for 3D viewers"
This reverts commit aa3ec82e1c.
2026-09-11 08:15:21 -04:00
Kristian Bendiksen 7b70f7e0a3 #14708 Fix black docked views by updating ADS
Update Qt Advanced Docking System to the parent-preservation fix cherry-picked onto CeetronSolutions master. Keep inactive docks hidden under the dock manager instead of temporarily making them top-level windows, avoiding disruption of QOpenGLWidget composition without enabling native windows.

Related to #14714. ADS fix cherry-picked from kriben/Qt-Advanced-Docking-System commit 7d6f2e71e374b95d600467602b770a8c8cf85d07.
2026-09-11 08:15:21 -04:00
magnesj 8ff1515bf4 vcpkg: Patch thrift for GCC 15 via overlay port
thrift 0.20.0#1, a transitive dependency of arrow, declares int64_t in lib/cpp/src/thrift/concurrency/Mutex.h without including <cstdint>. libstdc++ in GCC 15 no longer provides that header transitively through <memory>, so the port fails to compile at TSSLServerSocket.cpp with gcc-toolset-15. gcc-toolset-14 and older are unaffected, which is why RHEL8 CI has been green: it pins gcc-toolset-14 and restores thrift from the prebuilt cache in the CI image.

Vendor the port under ThirdParty/vcpkg-overlay-ports and add gcc15-cstdint.patch. An overlay port is used rather than a port-scoped flag in the x64-linux-release triplet because triplet_abi is a hash of the triplet file contents and is identical for every port, so editing a triplet invalidates the whole dependency set and forces a cold-cache rebuild.

Register overlay-ports in vcpkg-configuration-rhel8.json, which the RHEL8 workflow and Dockerfile.rhel8 copy over vcpkg-configuration.json. The bumped port-version misses the vcpkg binary cache baked into the current CI image, so the RHEL8 image needs a rebuild to pick up thrift 0.20.0#2.
2026-09-11 07:36:34 -04:00
Magne Sjaastad de3996ee9e Fix four crashes found via automated stacktrace triage (#14702)
* Fail gracefully when exportSnapshots command has no main window
* Guard against unopened plot panels in selection change handler
* Guard ecl_rsthead_alloc against missing INTEHEAD_KW
* Guard against detached flow diag solution in solverInterface
* Never rewrite all crash-triage reports when updating registry
2026-09-08 11:16:38 +02:00
JJ 73783a3e0a Update to latest Qt Advanced Docking (#14652)
* Update to latest Qt Advanced Docking, simplifying cmake config and fixing some bugs.
2026-09-01 07:46:30 +02:00
Magne Sjaastad b16c29b2e8 CI: Build vcpkg ports release-only to cut cold-cache time
vcpkg only reads VCPKG_BUILD_TYPE from the triplet file, so the
-DVCPKG_BUILD_TYPE=release passed to the top-level CMake call never had any
effect and every port was built in both debug and release. On a cold cache
that is roughly half of an 85 minute vcpkg step.

Add release-only overlay triplets for x64-windows and x64-linux and select
them from the workflow matrix. They are separate triplets rather than an
override of the stock ones so local developer builds keep their debug
dependencies. VCPKG_HOST_TRIPLET is set alongside the target triplet,
otherwise the 12 host-tool ports (openssl and protobuf among them) would be
built a second time under the stock triplet.

The triplet is part of the vcpkg cache key since it changes every binary's
ABI hash.
2026-08-31 22:21:52 +02:00
Kristian Bendiksen 14a4aa0f62 #14621 Sector model export: Preserve include-only wrapper files
Include files containing only INCLUDE statements, such as a wrapper
collecting many lift curve (.ecl/.vfp) files, were dropped during
sector model export, and the includes for all leaf files were written
directly into the exported .DATA file.

Update the custom-opm-common submodule so FileDeck recreates
include-only files in the output directory and preserves the include
hierarchy at any nesting depth. Add a regression test exporting a deck
with a nested include-only wrapper and reloading the result.
2026-08-31 21:48:39 +02:00
Kristian Bendiksen fd35578463 #14620 Sector model export: limit deck lines to 132 characters
Table keywords such as PVTO and SGOF were rewritten by opm-common as one
unbounded line when saving the deck, exceeding the 132 character line
limit of Eclipse 100 and making exported sector models unusable there.

Update the custom-opm-common submodule so DeckOutput tracks the current
line width and wraps records at item boundaries before a line exceeds
132 characters. Quoted values are never split. Add a regression test
that round-trips a deck with a long rel. perm. table and a record of
quoted mnemonics.
2026-08-31 20:17:48 +02:00
jonjenssen 8f4061208e Use a copy of the OSDU OpenZGY code, not a submodule, due to server instabilities. 2026-08-27 13:46:51 +02:00
Magne Sjaastad f68c0fe2cb #14584 Fix Windows build race copying Qt DLLs into the build root
extract-projectfile-versions linked into the shared build root and copied
Qt6Core.dll and Qt6Sql.dll next to its executable as a POST_BUILD step. The
generated_classes.py edge runs ResInsight.exe out of that same directory with
those DLLs loaded, and nothing orders the two edges relative to each other, so
Ninja was free to schedule them concurrently. Overwriting a mapped DLL is a
sharing violation on Windows, which failed the copy and took the build down.

Give the target its own RUNTIME_OUTPUT_DIRECTORY. It is a standalone developer
tool with no reason to share the application output directory, so moving it
removes the conflict instead of narrowing it. Also switch the copy to
copy_if_different, matching the equivalent step in the unit test target.
2026-08-22 11:50:55 +02:00
Magne Sjaastad d6c0df228d Fix RHEL8 vcpkg build broken by the toolchain cross-compile check
The RHEL8 job pins its own older ports baseline in
vcpkg-configuration-rhel8.json for Rocky Linux 8 compatibility. At that
baseline arrow 18.1.0 passes -DCMAKE_SYSTEM_PROCESSOR=x64, which the
updated linux toolchain reads as a cross build and answers with a
nonexistent x64-linux-gnu-gcc. The January 2025 toolchain had no such
inference, so the mismatch used to be harmless.

Bump the vcpkg submodule to normalize the vcpkg triplet architecture to
the GNU processor name before the cross-compilation check.

The default baseline is unaffected: arrow 21.0.0 there no longer passes
the flag, upstream having removed it in microsoft/vcpkg#47958.
2026-08-14 12:51:26 +02:00
Magne Sjaastad fa0c45a24f Update vcpkg to the 2026.07.29 release
Rebase the fork-local patches onto microsoft/vcpkg tag 2026.07.29
(9e593bb18ea69cc5095e012465dcd675a822ed0d): drop /Z7 from the vcpkg
Windows toolchain, and set CMAKE_POLICY_VERSION_MINIMUM for the
x64-linux and x64-windows triplets.

The previous submodule commit was based on upstream from January 2025,
which pinned msys2-runtime-3.5.4-2. That distfile has been pruned from
all MSYS2 mirrors, so any Windows build with a cold vcpkg binary cache
failed with a 404 while rapidjson acquired pkgconf. The new base pins
msys2-runtime-3.6.5-1, which is still hosted.

The ports baseline in vcpkg-configuration.json is left unchanged.
2026-08-14 12:51:26 +02:00
Magne Sjaastad 3ba47253ad #14386 Update opm-common submodule to merged development-01 commit 2026-07-28 14:51:13 +02:00
Magne Sjaastad 2d761c1d99 #14386 Update opm-common submodule with ESmry summary file open fix 2026-07-28 14:51:13 +02:00
Magne Sjaastad 14a4b5ef53 #14381 Fail gracefully when reading truncated or corrupt SMSPEC file 2026-07-28 14:44:25 +02:00
Magne Sjaastad e35f9aa85e #14370 Guard against NULL base when selecting summary file lists 2026-07-28 11:26:18 +02:00
Magne Sjaastad 2ac1948abe #14245 Remove gsl functions and ThirdParty/gsl folder 2026-06-24 18:47:04 +02:00
Jon Jenssen 789f433d9d Support toggle titlebar on/off for plots and 3d viewers 2026-06-17 13:55:32 +02:00
Jon Jenssen 4e2310e424 Update docking to latest version to support wayland 2026-06-17 13:55:32 +02:00
Jon Jenssen 255576d53d Clean up delete 3d views and project close/open
Update to latest qtadv docking
2026-06-17 13:55:32 +02:00
Jon Jenssen 9823f9c5a3 Update to latest qt adv docking version
Make sure copied 3d or plot views get a unique id
2026-06-17 13:55:32 +02:00
Magne Sjaastad 3a3a53ff0f Add input guards to fortio_fread_buffer for parity with resdata PR #1189
Reject null buffers and negative buffer sizes up front, returning false instead of risking a null dereference or hitting util_abort. The buffer-overflow protection from the upstream fix is already present via #14144; these two input-validation guards are the remaining delta.
2026-06-11 22:26:07 +02:00
Magne Sjaastad d339a34910 #14149 Fix crash when reading corrupt or truncated Eclipse INIT keyword
ecl_kw_fread_alloc() returns NULL if a keyword cannot be read, e.g. when
the backing file is truncated or corrupt. ecl_file_kw_load_kw() then
called ecl_file_kw_assert_kw() unconditionally, which dereferenced the
NULL keyword and caused a SIGSEGV.

Guard the assert and inv-map registration so they only run when the read
succeeded. The NULL keyword is propagated to the calling scope, which
already handles a missing keyword gracefully.
2026-06-10 17:46:13 +02:00
Magne Sjaastad 668b844051 #14144 Guard against buffer overflow when reading corrupt well data records
A truncated or corrupt restart file could provide a Fortran record-length header larger than the destination buffer, causing fortio_fread_record to fread past the heap allocation and crash. Bound each record read to the remaining buffer capacity and treat an oversized record as a read failure, which propagates up as a normal failed read instead of a segfault.
2026-06-08 15:54:52 +02:00
Magne Sjaastad 022d77bef8 macOS: Initial Apple Silicon and x86_64 build support
* Refactor: add MACOSX_BUNDLE option to qt_add_executable in multiple CMakeLists.txt files
* #14045 macOS: Guard std::stacktrace usage and skip ucontext on Apple platforms
* #14045 macOS: Guard std::ispanstream with std::istringstream fallback
* #14045 macOS: Add vcpkg overlay triplets for osx and exclude grpc on osx
* #14045 macOS: CMake macOS build support and openzgy OpenMP-disable patch
* #14045 CI: Add macOS build workflow
* #14045 macOS: Use feature-test macros to detect <stacktrace> and <spanstream>
* #14045 macOS: Make MAX_STIMPLAN_LAYERS constexpr to fix arm64 link error
* #14045 CI: Ship README-macOS.txt with artifact to document Gatekeeper workaround
* #14045 CI: Pin macOS runner to macos-14 and set deployment target to 14.0
* #14045 CI: Move macOS runner to macos-15 and fix README step on configure failure
2026-06-01 12:38:55 +02:00
Magne Sjaastad 4e65583425 #14004 resdata: Backport robustness fixes from equinor/resdata#1166
Guard zero-length keywords in ecl_kw_max_min, increase grdecl buffer to 256 and bound sscanf widths, and validate dimensions and keyword sizes (COORD, ZCORN, MAPAXES, CORSNUM, ACTNUM) when loading GRDECL grids.
2026-05-19 07:58:37 +02:00
Magne Sjaastad 3efdbafa0c #14004 surfio: Update to 0.0.20 and link fast_float from vcpkg 2026-05-19 07:58:37 +02:00
Magne Sjaastad e6cc90a7b5 Update vcpkg to fix CMake 4 issues on Linux
Update the vcpkg submodule to resolve compatibility issues encountered when using CMake 4 on Linux.
2026-04-14 12:44:36 +02:00
Magne Sjaastad 60f2ede781 Fix crash in ecl_file_scan when UNRST file is locked or being written
Add NULL stream guards in fortio_ftell and fortio_fseek__ to prevent SIGSEGV when fortio->stream is NULL during ecl_file_scan. This mirrors
the defensive fix applied to ESmry::loadData for UNSMRY files.
2026-03-17 14:03:11 +01:00
Magne Sjaastad ec7470d1e6 Fix ESmry::loadData crash when UNSMRY file is locked or being written
Update custom-opm-common submodule with guards against crashes in ESmry::loadData(vectList) when ensemble summary files are incomplete or inaccessible during project load.
2026-03-17 14:03:11 +01:00
Magne Sjaastad 46b56a800c #12560 Surface: Add export to GRI format with UI dialog and context menu integration
CMake: Change mdspan link from PRIVATE to PUBLIC for surfio_lib
2026-03-16 14:00:07 +01:00
Kristian Bendiksen d9e331f560 Update regression-analysis (fixes missing assert.h include) 2026-03-13 12:45:13 +01:00
Jon Jenssen f7154a8146 Fix crash issue with empty blocks when removing block keywords from file deck 2026-03-13 11:41:20 +01:00
David Landa Marban 188a52cd1e Removing unused boost::system 2026-03-13 10:38:57 +01:00
Magne Sjaastad 56fc450543 opm-flowdiagnostics-applications: Improvements to relative perm curves
Integrate PR https://github.com/OPM/opm-flowdiagnostics-applications/pull/116 for testing
2026-03-09 14:43:21 +01:00
Magne Sjaastad ab1cd9bb22 #13603 Replace bool/errorText with std::expected in ExpressionParser
evaluate() and expandIfStatementsAndEvaluate() now return std::expected<void, QString>: the error message is always part of the return value rather than an optional out-parameter, making it impossible for callers to silently discard errors.

Update RimGridCalculation and RimSummaryCalculation to use evaluateResult.error() instead of a separate errorText variable.
2026-02-23 19:19:09 +01:00
copilot-swe-agent[bot] 8bbd0d2551 Improve support for aggregating functions
When aggregating functions (min, max, sum, avg) are applied to a single vector variable, they compute a scalar result over the whole vector. These must be pre-computed before the element-wise for loop, otherwise the variable gets replaced with its indexed version (e.g. min(b) -> min(b[i])) which changes the semantics: min(b[i]) returns b[i], not min of all b.

Add check for pattern: c := agg_func(if(condition, true_expr, false_expr)).  Computes a scalar aggregate of the element-wise if-result and assigns it as a constant to all elements of c.
2026-02-23 19:19:09 +01:00
Magne Sjaastad cb8a069ccd Add support for custom validation callbacks on fields
* Add support for custom validation callbacks on fields

Introduce setCustomValidationCallback to PdmFieldHandle, allowing custom validation logic via user-provided lambdas or functions. The validate() method now invokes this callback if set, in addition to built-in checks. Includes comprehensive unit tests for custom and combined validation scenarios. Backward compatible: default behavior unchanged if no callback is set.
2026-02-09 16:48:42 +01:00
Magne Sjaastad adc450ead8 Update opm-common submodule to latest commit 2026-02-03 17:14:45 +01:00
Kristian Bendiksen 116c3b83a5 #13530 Fix RMS well path import with spaces in well names
The RMS well parser now correctly handles well names containing spaces.
Previously, ReadNext<std::string>() stopped at the first whitespace,
causing parsing failures. The fix reads line 3 as a whole and parses
coordinates from the end, treating remaining tokens as the well name.
2026-02-02 14:26:19 +01:00
Magne Sjaastad f06bd7f129 Fix missing display of legends in Qt 6.9
Updates the Qwt subproject to the latest commit to incorporate necessary fixes and improvements for legend-related issues in Qt6.
2026-01-13 17:15:33 +01:00
Kristian BendiksenandMagne Sjaastad d80ada607f #11807 Upgrade to Clipper2
Replaces the deprecated Clipper library with the actively maintained Clipper2 library.

Removes the local copy of the Clipper library and uses vcpkg to manage the dependency.

Fixes #11807

Co-authored-by: Magne Sjaastad <magne.sjaastad@ceetronsolutions.com>
2026-01-07 16:07:09 +01:00
JJ 6eea1f023a Update to latest Qt Advanced Docking (#13344)
* Update to latest Qt Advanced Docking
2025-12-15 20:41:08 +01:00
Kristian Bendiksen 8f9b416563 #12876 Include RKB distance when importing RMSwell.
Fixes #12876.
2025-12-15 13:56:41 +01:00
jonjenssen e7ac0675db Handle IF keyword in any upper/lowercase variation 2025-12-13 08:53:47 +01:00
Kristian Bendiksen a6298b1b30 Allow 'm' as mapunits for opm-common 2025-12-05 14:18:45 +01:00
jonjenssen bcb930f36a Handle empty blocks in FileDeck iterator++ 2025-12-03 14:19:26 +01:00
JJ 39c2282904 Handle active cells in files with thermal data (rockv) (#13159)
* Handle active cells in files with thermal data from intersect
2025-11-12 07:13:24 +01:00
Magne Sjaastad 6df569850d Remove unintended install files
* Exclude mdspan from INSTALL target
* Exclude zfp from INSTALL target
* Avoid install of googletest
2025-11-11 13:51:28 +01:00
Magne Sjaastad 5fd210e4c5 Update opm-flowdiagnostics to support imbibition curves 2025-11-07 16:00:35 +01:00