Commit Graph
19844 Commits
Author SHA1 Message Date
Magne Sjaastad 64361c2f78 #14746 Fix duplicate AppEnum serialization text and detect it in addItem
RimGridCalculation::AdditionalCasesType::ALL_CASES and
RimIntersectionFilterEnum::INTERSECT_FILTER_BETWEEN both reused the
serialization text of a sibling enum value (NONE and
INTERSECT_SHOW_BELOW respectively), so they would silently round-trip
as the wrong value when read back from a project file.

AppEnumMapperBase::addItem only asserted alias uniqueness, not text
uniqueness, so this class of bug went undetected. Add a CAF_ASSERT
checking that a new enum value's serialization text does not match an
existing value's text or aliases.

Found while investigating the AppEnum alias-duplication note in #14654.
2026-09-14 08:14:19 -04:00
dependabot[bot] 98c84cde99 Bump astral-sh/setup-uv from 10.0.1 to 10.1.0
Bumps [astral-sh/setup-uv](https://github.com/astral-sh/setup-uv) from 10.0.1 to 10.1.0.
- [Release notes](https://github.com/astral-sh/setup-uv/releases)
- [Commits](https://github.com/astral-sh/setup-uv/compare/20cfd1bf945f4377ade1205e4dbc17946fc9a30d...bec219d24cd3e171d82865faccec33120bb574f4)

---
updated-dependencies:
- dependency-name: astral-sh/setup-uv
  dependency-version: 10.1.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-09-14 08:01:58 -04:00
Kristian Bendiksen 58b9f46a95 RifReaderOpmCommon: Compute restart data size locally 2026-09-14 11:59:32 +02:00
Magne Sjaastad 90a4282783 #14727 Fix ensemble filter by summary value for oscillating rate vectors
RimEnsembleCurveFilter::applyFilter() (SUMMARY_VALUE mode) only compared
the value at the last time step inside the selected time range against
the filter's value range, discarding the result of every earlier time
step. For monotonically increasing cumulative vectors (e.g. FOPT) this
coincidentally matched user expectations, but for rate vectors (e.g.
FOPR) that oscillate at high frequency between zero and a non-zero
value, the outcome depended arbitrarily on whether the last time step
happened to land on zero or not.

The filter now excludes a realization if any time step inside the
selected time range has a value outside the selected value range, i.e.
all time steps in range must be inside the value range for the
realization to be kept. This makes the behavior consistent between
FOPT and FOPR style vectors.

Added a regression test reproducing the oscillating-rate scenario, and
updated the existing performance test to describe and exercise the new
semantics.
2026-09-14 03:10:24 -04:00
Magne Sjaastad 8776a2e2bf #14703 Grid statistics: Fix missing results for computed dynamic results like riPORV*SOIL
RimEclipseStatisticsCaseEvaluator::addNamedResult() sized the destination
statistics containers (MEAN/P10/P50/P90/etc.) using the time step count of
an arbitrary first result found in the source case (existingResults()[0]).

Results computed by ResInsight, such as riPORV*SOIL and riPORV*SGAS, do not
have their own time step info populated until they are actually computed,
so existingResults()[0] can end up being an unrelated result, including a
static one (e.g. PORV) with only a single time step. Using its size to
size the destination containers collapsed the statistics for all dynamic
results to a single time step, silently dropping the results for every
other time step, i.e. no results were shown for riPORV*SOIL / riPORV*SGAS.

Fix by using RigCaseCellResultsData::maxTimeStepCount() to find the source
result with the most time steps, and use its time step info both for the
destination time step metadata and for sizing the destination containers,
instead of depending on an arbitrary source result.

Added a unit test reproducing the ensemble statistics computation for
riPORV*SOIL across two source cases.
2026-09-12 04:53:16 -04:00
Magne Sjaastad b922fd96a7 #14737 Add reordering support to case collections
Add caf::PdmFieldReorderCapability to the child array fields holding
RimCase objects:
- RimEclipseCaseCollection::cases (grid models in Project Tree)
- RimCaseCollection::reservoirs (statistics case groups)
- RimGeoMechModels::m_cases (geomechanical models)

This enables the built-in move up/down tree item controls for
reordering cases, matching the pattern already used for e.g.
RimSurfaceCollection and RimMultiPlot.
2026-09-12 04:11:57 -04:00
Magne Sjaastad 3ec1a2659c #14690 Restore Close context menu command for cases
RicCloseCaseFeature::isCommandEnabled() was updated to require
RimCase::isDeletable() to be true, but no case type ever set this
flag to true by default. As a result, the 'Close' context menu item
disappeared for all grid models.

Set setDeletable( true ) as the default in the RimCase constructor.
Special cases that should not be closed directly by the user (e.g.
the generated ensemble grid case in RimWellTargetMapping) already
opt out by calling setDeletable( false ) explicitly.
2026-09-12 04:10:14 -04:00
Magne Sjaastad 055fbb60fa #14709 RimReservoirGridEnsemble: Auto-import per-realization formation zone files 2026-09-12 04:05:24 -04:00
Magne Sjaastad cb6807102c Select RHEL8 vcpkg-configuration.json via CMake instead of renaming the tracked file
* Select RHEL8 vcpkg-configuration.json via CMake instead of renaming the tracked file

RHEL8 CI jobs previously ran 'cp vcpkg-configuration-rhel8.json vcpkg-configuration.json'
before configuring, temporarily overwriting the tracked default configuration
in the checkout. The vcpkg toolchain file only defaults VCPKG_MANIFEST_DIR to
CMAKE_SOURCE_DIR when it is not already defined, and reads it while processing
project(), so setting VCPKG_MANIFEST_DIR earlier -- before project() -- lets
vcpkg read a different vcpkg-configuration.json without ever touching the
tracked file.

Add a RESINSIGHT_VCPKG_PROFILE cache variable, implemented in the new
cmake/ResInsightVcpkgProfile.cmake (included from the root CMakeLists.txt
before project(), which is required for VCPKG_MANIFEST_DIR to take effect).
When set (e.g. to 'rhel8'), it copies vcpkg.json and
vcpkg-configuration-<profile>.json into a profile-specific directory under
the build tree and points VCPKG_MANIFEST_DIR there. The copy is regenerated on
every configure, so it can never drift from the root vcpkg.json.

overlay-ports/overlay-triplets entries (e.g. 'ThirdParty/vcpkg-overlay-ports')
are resolved by vcpkg relative to the directory vcpkg-configuration.json lives
in, so repo-relative 'ThirdParty/...' paths are rewritten to absolute paths
right after the copy is generated, keeping them valid from the new location.

Update the RHEL8 workflows and Dockerfile.rhel8 build-warmup stage to pass
-DRESINSIGHT_VCPKG_PROFILE=rhel8 instead of the cp step, and update
vcpkg-readme.md to describe the new mechanism.

* #14733 Use x64-linux-release vcpkg triplet explicitly in RHEL8 CI

The RHEL8 CI workflows and the Docker image's warmup/vcpkg-cache stages
did not set VCPKG_TARGET_TRIPLET/VCPKG_HOST_TRIPLET, so vcpkg fell back
to its plain x64-linux default triplet, which builds both debug and
release variants of every dependency even though the CI build is
Release-only. Set both to x64-linux-release consistently across the
image's vcpkg install, the warmup CMake configure, and the two
consuming workflows so the baked binary cache and the CI configure use
matching ABI hashes and skip the unused debug builds.
2026-09-11 22:49:30 +02:00
Magne Sjaastad 3052d3d554 Select RHEL8 vcpkg-configuration.json via CMake instead of renaming the tracked file
* Select RHEL8 vcpkg-configuration.json via CMake instead of renaming the tracked file

RHEL8 CI jobs previously ran 'cp vcpkg-configuration-rhel8.json vcpkg-configuration.json'
before configuring, temporarily overwriting the tracked default configuration
in the checkout. The vcpkg toolchain file only defaults VCPKG_MANIFEST_DIR to
CMAKE_SOURCE_DIR when it is not already defined, and reads it while processing
project(), so setting VCPKG_MANIFEST_DIR earlier -- before project() -- lets
vcpkg read a different vcpkg-configuration.json without ever touching the
tracked file.

Add a RESINSIGHT_VCPKG_PROFILE cache variable, implemented in the new
cmake/ResInsightVcpkgProfile.cmake (included from the root CMakeLists.txt
before project(), which is required for VCPKG_MANIFEST_DIR to take effect).
When set (e.g. to 'rhel8'), it copies vcpkg.json and
vcpkg-configuration-<profile>.json into a profile-specific directory under
the build tree and points VCPKG_MANIFEST_DIR there. The copy is regenerated on
every configure, so it can never drift from the root vcpkg.json.

overlay-ports/overlay-triplets entries (e.g. 'ThirdParty/vcpkg-overlay-ports')
are resolved by vcpkg relative to the directory vcpkg-configuration.json lives
in, so repo-relative 'ThirdParty/...' paths are rewritten to absolute paths
right after the copy is generated, keeping them valid from the new location.

Update the RHEL8 workflows and Dockerfile.rhel8 build-warmup stage to pass
-DRESINSIGHT_VCPKG_PROFILE=rhel8 instead of the cp step, and update
vcpkg-readme.md to describe the new mechanism.

* #14733 Use x64-linux-release vcpkg triplet explicitly in RHEL8 CI

The RHEL8 CI workflows and the Docker image's warmup/vcpkg-cache stages
did not set VCPKG_TARGET_TRIPLET/VCPKG_HOST_TRIPLET, so vcpkg fell back
to its plain x64-linux default triplet, which builds both debug and
release variants of every dependency even though the CI build is
Release-only. Set both to x64-linux-release consistently across the
image's vcpkg install, the warmup CMake configure, and the two
consuming workflows so the baked binary cache and the CI configure use
matching ABI hashes and skip the unused debug builds.
2026-09-11 22:49:16 +02:00
Magne Sjaastad 8f65fed265 Gate cvf logging bridge behind an experimental feature flag
Register a new "cvf-logging" experimental feature keyword and guard both
RiaCvfLoggingManager::initializeCvfLogging() and shutdownCvfLogging() with
RiaPreferencesSystem::current()->isFeatureEnabled("cvf-logging"). The bridge
now stays disabled by default, and can be turned on for troubleshooting via
Preferences -> System -> Experimental Features.

Also document how to enable and use it: added a step-by-step usage note to
RiaToCvfLogging.h (enable the feature, restart, use --loglevel debug to see
cvf's debug output, look for the 'cvf[<logger-name>]: ' prefix) and expanded
the experimental feature description shown in Preferences -> System ->
Experimental Features accordingly.
2026-09-11 10:22:22 -04:00
magnesj 792e41b9f4 Bump to version 2026.09.1-dev.02 2026-09-11 08:34:11 -04:00
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 d0d472aaa2 #14723 Python: Pin grpcio-tools to keep protobuf 6 gencode loadable
grpcio-tools 1.82.0+ (including its 1.82.0 pre-releases) bundles a
protoc that emits protobuf 7.35.x gencode, which no protobuf 6 runtime
can load. Pin grpcio-tools below that (excluding pre-releases via the
'.dev0' trick, since a plain '<1.82' bound already let a 1.82.0rc
release slip through once) and add a CI check that verifies the
generated *_pb2.py files stay within the protobuf floor declared in
pyproject.toml.

Only the load-bearing bounds are kept: protobuf's '>=6.33.5' floor
(must match the emitted gencode) and grpcio-tools' '<1.82.0.dev0'
ceiling. Non-load-bearing bounds (protobuf's '<8', grpcio-tools'
'>=1.81') were dropped since they don't change dependency resolution
or protect against anything the above doesn't already cover.
2026-09-11 05:46:28 -04:00
magnesj d92091cc91 Fixes by clang-tidy 2026-09-11 01:20:47 -04:00
Magne Sjaastad ff7a6be7f4 #14722 Remove object from list before deleting it to avoid crash
RicDeleteItemExec::redo() and RicCloseCaseFeature::deleteEclipseCase()
deleted the pdm object before removing it from the owning
PdmChildArrayField. Destroying the object first could corrupt the
field's internal state before the list removal, causing a crash.

Swap the order so the object is removed from the list before it is
deleted.
2026-09-10 14:02:12 -04:00
magnesj 3f7aee5972 #14720 Probe std::stacktrace by linking instead of trusting the feature macro
libstdc++ defines __cpp_lib_stacktrace from GCC 13 on, but the implementation
lives in libstdc++exp, which some distributions do not ship (Red Hat's
gcc-toolset among them). The header-only feature test then reports the feature
as present and the link fails with undefined references to
std::__stacktrace_impl::_S_current.

Add cmake/StdStacktrace.cmake, which probes the feature by actually linking:
first with no extra library, then with stdc++exp. The result selects the link
library through RESINSIGHT_STACKTRACE_LIBRARIES, or defines
RIA_HAS_STD_STACKTRACE=0 project-wide when neither links, so the crash handler
compiles out its stack-trace capture and logs the signal only.

RiaMainTools.cpp and RiaOpenTelemetryManager.h now honour a
RIA_HAS_STD_STACKTRACE definition from the build system and only include
<stacktrace> when the feature is enabled.

Follow-up to #14045.
2026-09-10 08:33:38 -04:00
Magne Sjaastad aa3ec82e1c #14714 Add opt-in native window for 3D viewers
Two 3D views docked in the same tab group render black after switching
between tabs. Tracing the render path shows it completes correctly every
time: the offscreen FBO is complete, no OpenGL context is created or
destroyed on a tab switch, and the blit lands on the widget's own default
framebuffer in the widget's own context. The pixels are produced and never
reach the screen.

Without a native window a QOpenGLWidget is composited into the top-level
backing store, and that composition is not refreshed when the dock system
hides one viewer and shows another in the same tab group. A native surface
skips compositing, and the black view goes away.

On Wayland a native child widget becomes a subsurface with its own
rendering and stacking problems, so this is opt-in rather than default.
Set RESINSIGHT_ENABLE_NATIVE_GL_WIDGET=1 to enable it.

cafViewer now links cafPdmCore so the viewer can log through caf, which is
bridged to RiaLogging and therefore reaches the ResInsight log file.
2026-09-10 08:22:50 -04:00
Magne Sjaastad 7de74f1092 #14717 Fix spdlog silently dropping debug-level log messages
spdlog::logger objects have their own internal severity filter
(defaulting to info) independent of RiaLogging's own level checks.
Without explicitly setting the spdlog logger's level to debug, .debug()
calls were silently discarded regardless of RiaLogging's configured
level, making debug-level logging invisible in the log file.
2026-09-10 08:22:29 -04:00
Magne Sjaastad 4b0e03d7fc #14717 Forward cvf logging to RiaLogging
cvf loggers default to LL_WARNING on a console destination and are never
wired to RiaLogging, so cvf's own diagnostics never reach the log file. A
rendering failure is therefore silent, with no artefact a user can send us.

Add RiaToCvfLoggingBridge (cvf::LogDestination) and RiaCvfLoggingManager,
mirroring RiaToCafLoggingBridge, to forward cvf log events into RiaLogging.
Wire initialize/shutdown into RiaApplication.

cee.cvf, cee.cvf.OpenGL and cee.cvf.qt follow the application log level:
LL_INFO normally, LL_DEBUG only when the application itself is set to debug,
so normal runs stay quiet.
2026-09-10 08:22:29 -04:00
Jørgen Herje c49f298a7d [ri-cloud-api]: Add grid data from sumo using api (#14653)
Add grid data from Sumo using ri-cloud-api

Load Eclipse grid data (roff) from Sumo as RimReservoirGridEnsemble, one case per realization, with async fetch of grid properties per timestep.

- New: RiaSumoGrid (transport), RifReaderSumoGridProperty (lazy property reader), RimReservoirGridEnsembleSumo, RimRoffCaseSumo, and a "Create Reservoir Grid Ensemble" command.
- Shared grid: IJK dimensions compared before download; one RigMainGrid is reused across the ensemble when they match, each realization still parses its own ACTNUM before releasing geometry.
- Rename folders: Summary/Sumo -> Summary/Cloud, RimSumoDataSource -> Cloud/ (PDM keywords unchanged, old project files still load).
- UI: cloud data sources also shown in the 3D window's Data Sources dock.
- Fix: realizations no longer lost on project reload; realizations missing data are now reported instead of silently skipped.
2026-09-10 10:33:58 +02:00
Kristian Bendiksen 71c5b5a97d #14612 Simulator Events: Remove Orion project naming 2026-09-09 13:01:26 +02:00
Magne Sjaastad 1fc5e424e4 #14539 Schedule tree updates and release user defined axis ranges for all plot types
Axis range and auto-zoom setters now schedule the editor update instead of
performing it immediately. Every immediate update rebuilds the tags of the whole
project tree, and zoom-all releases the range and re-enables auto zoom for every
axis of every subplot. Scheduling also avoids deleting the tag whose clicked
signal is still being emitted from onPinnedTagClicked().

Remove the m_isAutoZoom branches in fieldChangedByUi(). The field is not part of
any UI ordering, and both orderings end with skipRemainingFields(), so the
branches were unreachable. Comments referring to a "Set Range Automatically"
checkbox are updated accordingly.

The pinned tag no longer reuses pinned.svg, which is also the Quick Access dock
icon and must keep following the widget palette. The gray tag variant lives in
PinnedAxisRange.svg.

Zoom All is an explicit request for automatic ranges, but only summary plots
released the user defined range. Histogram, grid cross, VFP and analysis plots
share RimPlotAxisProperties and set the range as user defined when a min or max
is typed, so Zoom All left them with a stale pinned tag and permanently blocked
enableAutoValueMinMax().

Release the range for every axis owned by the window in RimViewWindow instead,
which makes the summary specific overrides redundant.
2026-09-09 12:08:10 +02:00
Magne Sjaastad 3284fd200a #14539 Add shared-axis, pinned-range indicators and Auto Zoom command for axis objects
Replace the chain/padlock icon with a simple two-headed-arrow icon
(SharedAxis.svg) for linked time/property axes.

Add a pinned-range project-tree tag shown when an axis range is
user-defined, using the standard gray pinned.svg icon. The tag
refreshes immediately regardless of the code path that changes the
range/auto-zoom state (Zoom All, data source changes, axis linking,
UI edits), and clicking the tag releases the user-defined range so
the axis auto-zooms again.

Add RicToggleAxisAutoZoomFeature, a checkable context-menu command
on Y-axis and time-axis objects that toggles auto-zoom and keeps the
pinned/user-defined-range tag in sync in both directions.

Move axis-specific context-menu entries out of RimContextCommandBuilder
into appendMenuItems() overrides on RimPlotAxisProperties and
RimSummaryTimeAxisProperties, per the project convention of keeping
object-specific menu logic in the object.

Fix RimSummaryPlot::timeAxisSettingsChanged() to actually re-apply
auto-scale to the plot widget when auto-zoom is re-enabled on the
time axis; previously only the property was updated, and no
recompute of the plotted range was triggered.
2026-09-09 12:08:10 +02:00
Magne Sjaastad 110bdbe0c7 #14539 Summary Plot: Preserve user defined axis ranges when the data source changes
An axis range defined by the user is now kept when a summary case or ensemble is added, reloaded or replaced. The range is marked as user defined when the user edits the min/max values, unchecks "Set Range Automatically" or zooms interactively in the plot.

The user defined range is released by "Zoom All", by double click in a plot, by checking "Set Range Automatically" or by changing the Y axis range aggregation of a summary multi plot.
2026-09-09 12:08:10 +02:00
Kristian Bendiksen f38332b2e6 #14648 Reduce the risk of changed behaviour for text values in lists
A quote or an opening bracket is only given special meaning when it is the first character of a value. Brackets and parentheses are treated as ordinary characters for text based values, as nested containers are not possible for these types. Text values are then parsed as before, also when they contain unbalanced brackets, parentheses or quotes.

Items in a tuple are not quoted by the Python client, as the tuple parser does not support quoted strings.

Add unit tests for text values containing separator characters, white space, file paths, numbers, nested containers and 3D vectors.
2026-09-09 11:19:44 +02:00
Kristian Bendiksen 5ed45b8f19 #14648 Python: Support strings containing commas in list arguments
Lists sent from Python over gRPC are serialized as text, and the list parser split on every comma, also commas inside a string. A category name like "Coal,Calcite" was therefore split in two, and set_discrete_property_category_names() failed with "CategoryValues and CategoryNames must have matching sizes".

The list parser is now quote-aware, and ignores commas inside quoted strings and inside nested brackets and parentheses. A quoted item is parsed as a quoted string also when the surrounding text is unquoted, as is the case for text coming from Python. The Python client quotes and escapes strings in lists and tuples when they contain separator characters.

Add unit tests for the field serialization and a Python test for the category names.
2026-09-09 11:19:44 +02:00
Magne Sjaastad b02d95bf95 #14698 Add regression tests for NaN/Inf/overflow guard in parameter correlations
Add RimSummaryEnsemble-Test.cpp with tests verifying that:
- a realization whose calculated summary vector value is NaN or Inf
  at the selected timestep is excluded from the Pearson correlation
  result instead of corrupting it
- extremely large but finite parameter/result magnitudes, which
  overflow the sum-of-squares in RigStatisticsTools::pearsonCorrelation()
  and RigEnsembleParameter::stdDeviation(), do not surface a NaN/Inf
  correlation value and are not silently dropped from the result

Add RigStatisticsTools.OverflowProducesNan reproducing the pearsonCorrelation()
overflow directly.

Verified each new test fails without its corresponding production fix
and passes with it.
2026-09-09 10:47:54 +02:00
Magne Sjaastad aee80deb30 #14698 Guard against NaN/Inf in ensemble parameter correlation
Realizations whose calculated summary vector value is NaN or Inf at
the selected timestep are now excluded from the Pearson correlation
computation instead of propagating NaN through the whole result,
which corrupted the correlation tornado plot. Also guard the final
correlation value against NaN, since the previous check only compared
against +Infinity.

RigEnsembleParameter::stdDeviation() sums squared parameter values,
which can overflow to +Inf for extreme (but finite) magnitudes,
turning normalizedStdDeviation() into NaN. Since NaN compares false
against the variation epsilon, such parameters were silently treated
as having no variation and dropped from parameterCorrelations(),
producing an empty tornado plot for that parameter and calculated
vector combination. Fall back to a range-based variation estimate
when the standard deviation calculation overflows, so the parameter
is retained and the Pearson correlation guard above can take over
instead.
2026-09-09 10:47:54 +02:00
Kristian Bendiksen d81e1e69f4 #14345 Route ensemble data filters to ensemble views
Use the ensemble data filter collection as the source for views owned by a reservoir grid ensemble. Apply the source for newly inserted views, case changes, and project-load initialization while preserving case-level sources for ordinary case views.

Add a regression test verifying that an ensemble view switches from its case collection to the ensemble collection.
2026-09-09 10:14:41 +02:00
Kristian Bendiksen d332a9bfdc #14345 Update ensemble data filter case after file-set refresh
Rebind the ensemble data filter collection after file-set cases are recreated. This ensures the collection uses the new main case and clears its source when no replacement cases are found.
2026-09-09 10:14:41 +02:00
Kristian Bendiksen 7ae3543e76 #14345 Refresh the owning object when data filters are added or removed
The data filter collection node is hidden in the project tree while the
collection is empty, and the owner must be refreshed to re-run its tree
ordering when the first filter appears. The refresh targeted the source
case, which for a grid ensemble collection is the main case of the
ensemble, not the ensemble owning the tree node. Newly created ensemble
data filters were therefore not visible in the tree.

Refresh the PDM parent object instead, which is the case or the grid
ensemble. Also refresh from the programmatic removeFilter path.
2026-09-09 10:14:41 +02:00
Kristian Bendiksen ab43e67f0f #14345 Add Data Filters to grid ensembles
Add a data filter collection to RimReservoirGridEnsemble, so filters can be defined once for the ensemble. The filters are bound to the main case of the ensemble for configuration.

Expose filter creation commands from a Data Filters submenu on the ensemble node, and hide the collection node while empty, matching the case-level behavior. Grid calculation integration is intentionally left for the dependent calculation-filtering change.
2026-09-09 10:14:41 +02:00
Kristian Bendiksen 2f2f0fd4e8 #14345 Add polygon filter creation to the Data Filters menu
RicNewPolygonFilterFeature already supports adding polygon filters to
the case-level data filter collection, but the collection menu did not
offer it. Add the polygon filter entries to the menu, matching the cell
filter collection menu in a view. The polygon filter computes its cells
lazily from the collection's source case, so no view is required.
2026-09-09 10:14:41 +02:00
Magne Sjaastad dd28b595ea Fix crash in RimSeismicSection::wellPathToSectionPoints when points is empty
Guard against calling points.back() on an empty vector when all well
path points are filtered out (e.g. due to the zmin check), which
previously caused undefined behavior/crash.
2026-09-08 15:10:58 +02:00
Magne Sjaastad 561bb35bd5 #14704 Guard against zero time-step count in findOrLoadKnownScalarResultForTimeStep
The bounds check on timeStepIndex was only applied when timeStepCount
was greater than zero. When a DYNAMIC_NATIVE result has zero known
time steps for a case, the check was skipped entirely and the
function still returned scalarResultIndex as valid, even though
m_cellScalarResults for it was never resized. Callers such as
RigSoilResultCalculator::calculate then indexed it out of bounds via
a CAF_ASSERT-only check (a no-op in Release builds), causing a
segfault.
2026-09-08 13:14:24 +02:00
Magne Sjaastad 6b4620715c #14699 Guard against null-pointer derefs during view/dock teardown 2026-09-08 11:18:33 +02:00
Magne Sjaastad 18e8b5545d #14699 Add unit tests for PdmUiTreeViewEditor 2026-09-08 11:18:33 +02: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
Kristian Bendiksen 15fe3a3656 #14680 Contour map: Restore property filter creation 2026-09-08 08:20:38 +02:00
Kristian Bendiksen 2462170647 #14683 Share OPM parser for keyword lookups 2026-09-07 18:58:05 +02:00
Kristian Bendiksen 275b120688 #14683 Python: Generalize gRPC resource limit error 2026-09-07 18:58:05 +02:00
Kristian Bendiksen 2e5a3a3d17 #14683 Python: Preserve positional heartbeat callback 2026-09-07 18:58:05 +02:00
Kristian Bendiksen 35614d160e #14683 Serve liveness requests on the gRPC server thread
Requests are queued by the completion queue thread and processed from the main
thread. A long running request, or an open progress dialog in the GUI, therefore
left every request unanswered for as long as that operation lasted, including
the liveness checks a client uses to decide whether ResInsight is still there.

Let a callback declare that it touches no application state, and serve those
directly on the completion queue thread instead of queueing them. GetVersion is
the only such callback, since it reads compile-time constants only. Everything
that touches the project or the data model is still processed on the main
thread, so no request can observe or modify the data model while another one is
running.

The allocated callback list is now used from both threads and is guarded by a
mutex. Shutdown takes a lock before flagging that it is in progress, so that it
waits for any dispatch already running on the completion queue thread and no new
request handler can be registered on a queue that is about to be shut down.

During a blocking call of 3.25 s, 65 pings were answered with a maximum latency
of 6.2 ms. Before this change none of them were answered until the call
completed.
2026-09-07 18:58:05 +02:00
Kristian Bendiksen 32f97bd862 #14683 Raise the gRPC message size limit for large payloads
A schedule generated from a full production history, or a large raw text block
imported into the event timeline, easily exceeds the gRPC default limit of 4 MB.
Such a call failed with "Received message larger than max (5119402 vs 4194304)"
even though both sides were healthy.

Raise the limit to 128 MB on the server and use a matching limit for the client
channels. A schedule of 19.5 MB is now returned without error.
2026-09-07 18:58:05 +02:00
Kristian Bendiksen 16ad832689 #14683 Python: Add context to connection and message size errors
A call that failed because the connection went away surfaced the raw gRPC text,
typically "Channel closed!", which says nothing about what happened. Translate
such failures through a single helper that explains that the connection to
ResInsight was lost while the call was running, and that names the message size
limit when that is the cause. The gRPC code and details are still carried on the
RipsError for callers that branch on them.
2026-09-07 18:58:05 +02:00
Kristian Bendiksen b0496f82d6 #14683 Python: Do not treat a busy ResInsight as a dead one
ResInsight serves gRPC requests from its main thread, so a long running call
leaves the heartbeat pings unanswered for as long as that call runs. The
heartbeat counted those timeouts as connection failures and closed the channel,
which aborted the very call the user was waiting for. The client reported
"RipsError: Channel closed!" while the ResInsight process was alive and well.

Classify a ping that fails with DEADLINE_EXCEEDED or RESOURCE_EXHAUSTED as a
busy server and never count it towards the failure threshold. Only failures
that indicate a broken connection declare the connection lost. A new
busy_warning_sec argument controls when a warning is logged for a server that
has been unresponsive for a while, so long operations are visible without being
killed.

Keep the process handle from Instance.launch so the heartbeat can check whether
ResInsight actually exited. A dead process is now detected immediately and
reported with its exit code instead of a bare channel error, and check_alive()
repeats that diagnosis.
2026-09-07 18:58:05 +02:00
Kristian Bendiksen 30254df9e9 #14683 Avoid building an Opm::Parser per keyword in schedule generation
Constructing an Opm::Parser populates the complete keyword database (2774
keywords, measured at 2.4 ms per construction) and this was done once per
keyword event in RifEventKeywordFormatter::buildKeyword, and twice more per
keyword in the column-aligned serialisation in RimKeywordFactory. Schedule
generation was therefore completely dominated by parser construction and grew
directly with the number of events on the timeline. Use a single shared parser
instance instead, since the parser is stateless once constructed.

Also compute the events for a date once in generateDateSection and pass them to
the per-well helpers, instead of calling RimWellEventTimeline::getEventsAtDate
four times per well and date, which scaled as dates x wells x events.

Generating a schedule for a production data set with 1737 events over 490 dates
goes from 4.2 s to 0.1 s, and 21000 events over 14 wells now complete in 0.5 s.
2026-09-07 18:58:05 +02:00