Add preferences for HPC/Batch scheduler
Add Slurm and LSF support
Add batch job monitor
Support launcher specific user settings
Use internal timer to refresh job state
Add some more options to batch monitor
Improve naming
Add tests for job lists
Change WSL handling for processes.
Zoom All could pass a zero view direction (eye equal to view reference
point). The up vector then also became zero, giving a plane with a zero
normal and an assert in Plane::distanceToOrigin. Fall back to the Y axis
when the direction is zero or undefined. Follow-up to the parallel
dir/up fix in #14849.
Call stack:
[5] cvf::AssertHandlerConsole::handleAssert(char const*, int, char const*, char const*) at cvfAssert.cpp:125
[6] cvf::Plane::distanceToOrigin() const at cvfPlane.cpp:313
[7] cvf::Camera::computeFitViewEyePosition(cvf::BoundingBox const&, cvf::Vector3<double> const&, cvf::Vector3<double> const&, double, double, double) at cvfCamera.cpp:361
[8] caf::Viewer::zoomAll() at cafViewer.cpp:992
[9] caf::CmdFeature::actionTriggered(bool) at cafCmdFeature.cpp:176
Crash signature 0f6ddddd87ad.
On exit, showProperties( nullptr ) reaches PdmUiEditorHandle::updateUi() while m_isConfiguringUi is still true, and CAF_ASSERT( !m_isConfiguringUi ) aborts. An exception in configureAndUpdateUi() or a re-entrant update leaves the editor locked.
Skip a re-entrant update instead of aborting, and use QScopedValueRollback so the flag is reset even if configureAndUpdateUi() throws. New tests ReentrantUpdateIsSkipped and UpdateAfterExceptionInConfigure.
Call stack:
[5] caf::PdmUiEditorHandle::updateUi(QString const&) at ResInsight/Fwk/AppFwk/cafProjectDataModel/cafPdmUiCore/cafPdmUiEditorHandle.cpp:65
[6] caf::PdmUiPropertyView::showProperties(caf::PdmObjectHandle*) at ResInsight/Fwk/AppFwk/cafUserInterface/cafPdmUiPropertyView.cpp:213
[7] RiuMainWindow::cleanupGuiCaseClose() at ResInsight/ApplicationLibCode/UserInterface/RiuMainWindow.cpp:312
[8] RiaGuiApplication::onProjectBeingClosed() at ResInsight/ApplicationLibCode/Application/RiaGuiApplication.cpp:1409
[9] RiaApplication::closeProject() at ResInsight/ApplicationLibCode/Application/RiaApplication.cpp:1040
[10] RicExitApplicationFeature::onActionTriggered(bool) at ResInsight/ApplicationLibCode/Commands/ApplicationCommands/RicExitApplicationFeature.cpp:70
[11] caf::CmdFeature::actionTriggered(bool) at ResInsight/Fwk/AppFwk/cafCommand/cafCmdFeature.cpp:176
[20] RiaGuiApplication::notify(QObject*, QEvent*) at ResInsight/ApplicationLibCode/Application/RiaGuiApplication.cpp:1828
[26] RiaGuiApplication::notify(QObject*, QEvent*) at ResInsight/ApplicationLibCode/Application/RiaGuiApplication.cpp:1828
[37] main at ResInsight/ApplicationExeCode/RiaMain.cpp:267
[38] __libc_start_main at :0
- RifEclipseOutputFileTools::timeSteps: avoid integer division by zero when
the restart file has no INTEHEAD
- libecl ecl_grid: return NULL when the main EGRID grid cannot be created,
and skip NNCHEAD blocks that cannot be read
- libecl well_info: skip wells when the restart header cannot be read
- cvf::Frustum::isOutside: do not assert on an incomplete frustum, cull nothing
Fixes#14901.
A hidden label is never added to a layout, so it stayed parented to the
group box it was created in. When the field moved directly to another
group, the old group box was deleted together with the label, and the
next update hit a null label in PdmUiCheckBoxEditor.
Add GroupVisibilityByEnum to cafTestApplication to reproduce the crash.
T6 and T7 were both registered with mismatched serialization text ('T5' and
'T6' respectively), duplicating the text already used by T5 and T6. Use the
correct unique text for each enum value.
- Camera::fitView/computeFitViewEyePosition: derive one corrected, non-parallel up vector and use it consistently for right, upNorm, planeTop and the final setFromLookAt(), instead of only repairing the right vector. Previously the degenerate (parallel dir/up) case still produced a singular view matrix because up itself was never corrected. Added a regression test exercising fitView() end-to-end (not just computeFitViewEyePosition()) that checks the resulting direction/up/right form a valid orthonormal basis.
- RimViewController::updateCameraLink/updateTimeStepLink: guard against ownerViewLinker()->masterView() being null (RimViewLinker::setMasterView(nullptr) is a supported state), not only against a null view linker.
- RicHistogramPlotTools: use RiaGuiApplication::isRunning() before calling RiaGuiApplication::instance(), since instance() itself asserts when there is no running GUI application.
- RimDockWindowController::updateViewerWidget: create the view widget before the dock widget, so a failed view-widget creation does not leave a dock widget allocated without a dock manager (which deleteDockWidget() cannot clean up).
- RimStimPlanModelCalculator::calculateFormation: avoid continue via a small lambda, and reject double values outside the range of int before the static_cast to avoid undefined behavior.
dir^up becomes a zero vector when the view direction and up vector are parallel, producing an invalid zero-normal plane. Plane::distanceToOrigin() then asserts/aborts (CVF_ASSERT, always active). Fall back to an arbitrary axis to compute a valid right vector in this degenerate case.
Building the cell search tree was dominated by one small std::vector<int>
allocation per leaf, and a tree with one cell per leaf becomes very deep for
large grids.
- BoundingBoxTree: Store leaf ids in flat arrays, and move the input data
instead of copying it. The tree shape is unchanged. Queries no longer copy
the ids of each leaf.
- RigMainGrid: Always group at least 8 cells along K in each leaf.
findIntersectingCells() removes cells not intersecting the query bounding
box, so the result is the same set of cells as for a tree with one cell per
leaf. This also applies to very large grids, which previously got the
cells of the whole leaf.
- Include cells of nested LGRs and LGR cells in invalid main grid cells in
the grouped tree, as the previous tree with one cell per leaf did.
Add fetch og polygons from cloud using ri-cloud-api service as submodule
Current version of submodule fetches polygons from Sumo, prodviding polygons with standard results tag.
* #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.
Fixed missing initialization in VfpValueSelection and WellPathCellIntersectionInfo
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.
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.
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.
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.
All unnamed critical regions map to the same implicit name, so a single process wide lock was shared by summary import, geometry generation, grid bounding box computation and NNC merging. Unrelated parallel loops therefore serialized against each other.
Give each region a critical_section_ name describing what it protects. The two regions guarding RifOpmCommonEclipseSummary::sm_createdEsmryFileCount deliberately share one name, as they protect the same counter.
The pragma had no enclosing parallel region, so it did not parallelize anything and only added confusion.
This code caused a deadlock on Windows for the following workflow:
1. import a grid model
2. Import a large summary ensemble with no ESMRY that triggers display of a progress dialog. Make sure the progress dialog is displayed on top of the 3D models -> deadlock
RenderStateTextureBindings::setupTextures() ignores the return value of
Texture::setupTexture(). When setup fails, the texture is deleted and left
without a valid OpenGL id, but applyOpenGL() still calls Texture::bind(),
where CVF_ASSERT on the id aborts the application.
Skip bindings without a valid texture id and log a render error instead.
The group boxes were destroyed with a raw delete, which destroys the child widgets immediately and defeats the deleteLater() used by PdmUiFieldEditorHandle to keep field editor widgets alive. When the rebuild is triggered from fieldChangedByUi(), Qt is still using those widgets further up the stack, giving a use-after-free.
Hide and detach the group box before scheduling a deferred delete, so it leaves the layout, the visual tree and the focus chain immediately. Detaching first is what plain deleteLater() did not do in issue 9719.
The tool button and the layout are owned by m_placeholder, which is not returned as the editor widget when auto value is not supported. Nothing tracks m_placeholder in that case, so it can be destroyed together with a parent widget while the reparented m_lineEdit survives. A later configureAndUpdateUi() then found a non-null m_lineEdit and a null m_autoValueToolButton, and crashed on hide().
Guard both pointers before use, matching how m_label and m_lineEdit are already guarded in the same function. This is a separate defect from the use-after-free in issue 14505, found while reproducing it in cafTestApplication.
Adds a ReentrantEditorRebuild demo object that rebuilds all property editors from inside fieldChangedByUi(), while Qt is still executing QLineEdit::focusOutEvent. Type a value into Realization Filter and press Tab to trigger. The change handler drops both the line edit field and its parent group from the ui ordering, so PdmUiFormLayoutObjectEditor::configureAndUpdateUi() tears down widgets that are still in use further up the stack. Uncheck Rebuild Layout On Change to run the same edit without the reentrant rebuild.
Qt is distributed both with and without pdb files. When they are present,
copy them next to the Qt dlls so symbols are available when debugging.
Pass --pdb to windeployqt for the configurations built with debug
information, and copy the matching pdb file in the AppFwk test
applications and unit tests using a helper script that skips missing
files.
Deleting PDM objects on a worker thread is not safe. PdmObjectHandle::prepareForDelete()
mutates state owned by other objects, it nulls the guarded pointers held by other objects
and clears m_pointersReferencingMe, an unsynchronised std::set that every PdmPointer
construction and destruction touches. Destroying an object off the main thread therefore
races with the main thread on the shared object graph. See issue 14491.
Profiling a summary ensemble teardown shows the mechanism does not pay for itself. Releasing
397 Drogon realizations takes 0.24 s sequentially and 0.24 s in parallel, and for a heavy
case the parallel release is slower than the sequential one, because free() is serialised
inside the allocator. The PDM bookkeeping itself is 0.4 to 2.8 percent of the teardown.
Remove the class and deleteChildrenAsync(), and delete synchronously instead. The call sites
that used clearWithoutDelete() and a manual delete loop to work around the race can now call
deleteChildren() directly. Add caf::PdmObjectHandleTools::deleteObjects() for the case where
the objects are no longer owned by a child array field.
The observer disconnection from issue 12262 does not depend on clearWithoutDelete(). ~Signal()
unregisters itself from every observer, so a deleted child detaches itself. That fix addressed
the async race, where ~Signal() mutated the observer list from a worker thread. The unit test
is updated to assert the observed signal count directly instead of relying on a crash.
cvfAssert.h tests CVF_ENABLE_ASSERTS but did not include cvfConfigCore.h, which
is where that macro gets its default value of 1. A translation unit processing
cvfAssert.h before cvfConfigCore.h evaluated the undefined identifier as 0 and
silently compiled every CVF_ASSERT, CVF_ASSERT_MSG and CVF_FAIL_MSG in that unit
into a no-op, without any warning and without evaluating the expressions.
Because the header uses pragma once, including cvfConfigCore.h later in the same
unit did not recover the macros. Alphabetical include sorting actively produces
the broken order, since cvfAssert.h sorts before cvfBase.h.
Include cvfConfigCore.h before the macro definitions. It only defines macros, has
pragma once and no dependencies, so this is immune to future include reordering.
This turns the asserts back on in the affected translation units, in both debug
and release builds, and immediately exposed one assert that had never compiled:
in RigFemPartResultCalculatorNormalized::calculate, isNormalizableResult was
called unqualified even though it is a static member of
RigFemPartResultsCollection. Qualify it, matching isMatching in the same file.
CAF_ASSERT was unconditionally active in every build configuration. Make it
follow the semantics of the standard assert(): active in Debug, compiled out in
optimized builds (NDEBUG).
Add the CMake option RESINSIGHT_ENABLE_ASSERTS_IN_RELEASE (default OFF) for
developers who want the asserts to stay active in an optimized build, which is
useful when reproducing a problem in RelWithDebInfo with a debugger attached.
When compiled out, the expression is kept inside an unevaluated sizeof rather
than discarded. It is not evaluated, so there is no run-time cost and no side
effects, but it is still type checked and any variable used only by the assert
still counts as referenced, avoiding a wave of unused-variable warnings.
CAF_ENABLE_ASSERTS is given a default in cafAssert.h so the header stays
self-contained and include order can never silently switch the asserts off.
Document in docs/agents/coding-style.md that CAF_ASSERT is the assert to use,
that CVF_ASSERT is legacy, and that asserts are for broken invariants rather
than for run-time conditions that need real error handling.
* #14411 Enforce name uniqueness for surfaces, polygons and folders
Names must be unique among siblings sharing the same parent folder. Items in different folders may keep identical names, and comparison is case sensitive.
Siblings are the objects held by the same caf::PdmChildArrayField. Items and folders live in two distinct child arrays in caf::PdmNestedCollection, so a folder and an item may share a name under the same parent.
The Python API gets an OnNameConflict flag on AddFolder, CreatePolygon, ImportSurface and NewRegularSurface, supporting FAIL (default), AUTO_RENAME and OVERWRITE. NewSurface is left out, as grid case surfaces derive their tree label from the case and K index and carry no name of their own.
Dropping on an empty area of a table view calls dropMimeData with an invalid parent index, where row and column are -1. PdmUiTableViewQModel::getField() and pdmObjectForRow() used these values to index the child array field, reading out of bounds and returning a garbage object pointer.
Cloud services are configured from RiaApplication::initialize(), which runs before the subclasses append their logger instances. All messages from the cloud config file search were therefore dropped. Add a virtual initializeLoggers() called before the cloud configuration is read, and move creation of the file logger and the std out logger into the overrides. The message panel logger depends on the main windows, and is still created in RiaGuiApplication::initialize().
Do not write fields with IO disabled to the application store, mirroring the check already present when reading. This stops the cloud service configuration from being persisted into the user preferences file.
Valid Qt column indices are 0..columnCount()-1, but the bottom-right
model index was constructed with column columnCount(). Since
QAbstractItemModel::index() validates its arguments, this produced an
invalid QModelIndex(-1,-1) passed to dataChanged(), causing a console
warning on every table row update, e.g. when adding or moving 3D well
path pick targets. Fix the same off-by-one in modelIndexFromPdmObject().
Fixes#14274.
The tree view in PdmUiTreeSelectionEditor is deleted using deleteLater(),
while the models are children of the editor and are deleted immediately.
Detach the view from the models in the destructor, otherwise pending events
in the view may operate on a selection model whose model has been destroyed.
Driving caf::ProgressInfo from worker threads inside the OpenMP loop in
loadFileSummaryCaseData() marshaled setProgress() to the GUI thread via a
queued connection. These updates could be delivered after the ProgressInfo
scope had ended and the progress stacks were popped, accessing an empty stack
and resurrecting the just-closed dialog stuck at 0% with no way to close it.
Only update the progress dialog from the master thread, using an atomic
counter for a monotonic progress value, and guard the ProgressInfo mutators
against stale updates delivered after the stacks are empty.