mirror of
https://github.com/OPM/ResInsight.git
synced 2026-11-02 09:00:14 -06:00
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
49 lines
1.1 KiB
CMake
49 lines
1.1 KiB
CMake
cmake_minimum_required(VERSION 3.15)
|
|
|
|
project(cafUserInterface_UnitTests)
|
|
|
|
# Qt
|
|
find_package(
|
|
Qt6
|
|
COMPONENTS
|
|
REQUIRED Core Gui Widgets Svg
|
|
)
|
|
qt_standard_project_setup()
|
|
|
|
include_directories(${CMAKE_CURRENT_SOURCE_DIR} # required for gtest-all.cpp
|
|
)
|
|
|
|
set(PROJECT_FILES
|
|
cafUserInterface_UnitTests.cpp
|
|
cafPdmUiTreeViewModelTest.cpp
|
|
cafPdmUiTreeViewEditorTest.cpp
|
|
cafPdmUiTreeSelectionQModelTest.cpp
|
|
cafPdmUiTableViewQModelTest.cpp
|
|
cafPdmUiNumberFormatTest.cpp
|
|
cafPdmUiCheckBoxAndTextEditorTest.cpp
|
|
cafPdmUiPropertyViewDialogTest.cpp
|
|
cafPdmUiEditorHandleTest.cpp
|
|
cafIconProviderTest.cpp
|
|
cafProgressInfoTest.cpp
|
|
gtest/gtest-all.cpp
|
|
)
|
|
|
|
qt_add_executable(${PROJECT_NAME} MACOSX_BUNDLE ${PROJECT_FILES})
|
|
|
|
target_link_libraries(
|
|
${PROJECT_NAME} PRIVATE cafUserInterface ${QT_LIBRARIES} ${THREAD_LIBRARY}
|
|
)
|
|
|
|
# Install
|
|
install(
|
|
TARGETS ${PROJECT_NAME}
|
|
BUNDLE DESTINATION .
|
|
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
|
|
)
|
|
|
|
qt_generate_deploy_app_script(
|
|
TARGET ${PROJECT_NAME} OUTPUT_SCRIPT deploy_script
|
|
NO_UNSUPPORTED_PLATFORM_ERROR NO_TRANSLATIONS
|
|
)
|
|
install(SCRIPT ${deploy_script})
|