From 0d22695ff5ae45cd1ed26b3bf3c1699d8da900ad Mon Sep 17 00:00:00 2001
From: Daniel Savchenko <dsavchenko@schulz.informatik.rwth-aachen.de>
Date: Tue, 30 Jul 2024 14:32:59 +0200
Subject: [PATCH 01/60] added deprecated status to QwtHistogram

---
 libs_required/ACG/QwtWidgets/QwtHistogramm.hh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libs_required/ACG/QwtWidgets/QwtHistogramm.hh b/libs_required/ACG/QwtWidgets/QwtHistogramm.hh
index 662d9b9e..a055b285 100644
--- a/libs_required/ACG/QwtWidgets/QwtHistogramm.hh
+++ b/libs_required/ACG/QwtWidgets/QwtHistogramm.hh
@@ -60,7 +60,7 @@ class QString;
  * via HistogramItem::setData(). Additionally you can set colors for each bar,
  * which are provided via HistogramItem::setColors()
  */
-class ACGDLLEXPORT Histogram: public QwtPlotItem
+class [[deprecated("Use QCharts instead!")]] ACGDLLEXPORT Histogram: public QwtPlotItem
 {
 public:
     /// Constructor
-- 
GitLab


From afc203d9fbec929be5120db1a4fd214f05631b4c Mon Sep 17 00:00:00 2001
From: Daniel Savchenko <dsavchenko@carlos.informatik.rwth-aachen.de>
Date: Tue, 3 Sep 2024 10:40:26 +0200
Subject: [PATCH 02/60] Added a Base Histogram class, that allows colorcoding
 for each bar.

---
 libs_required/ACG/CMakeLists.txt              |   2 +
 .../ACG/QtWidgets/QtChartHistogram.cc         | 293 ++++++++++++++++++
 .../ACG/QtWidgets/QtChartHistogram.hh         | 125 ++++++++
 3 files changed, 420 insertions(+)
 create mode 100644 libs_required/ACG/QtWidgets/QtChartHistogram.cc
 create mode 100644 libs_required/ACG/QtWidgets/QtChartHistogram.hh

diff --git a/libs_required/ACG/CMakeLists.txt b/libs_required/ACG/CMakeLists.txt
index df8c5814..f3846b4e 100644
--- a/libs_required/ACG/CMakeLists.txt
+++ b/libs_required/ACG/CMakeLists.txt
@@ -93,6 +93,7 @@ set ( headers
     Math/QuaternionT.hh
     Math/VectorT.hh
     QtWidgets/QtApplication.hh
+    QtWidgets/QtChartHistogram.hh
     QtWidgets/QtClippingDialog.hh
     QtWidgets/QtColorChooserButton.hh
     QtWidgets/QtColorTranslator.hh
@@ -209,6 +210,7 @@ set (sources
     GL/stipple_alpha.cc
     Math/BSplineBasis.cc
     QtWidgets/QtApplication.cc
+    QtWidgets/QtChartHistogram.cc
     QtWidgets/QtClippingDialog.cc
     QtWidgets/QtColorChooserButton.cc
     QtWidgets/QtColorTranslator.cc
diff --git a/libs_required/ACG/QtWidgets/QtChartHistogram.cc b/libs_required/ACG/QtWidgets/QtChartHistogram.cc
new file mode 100644
index 00000000..d0d987a6
--- /dev/null
+++ b/libs_required/ACG/QtWidgets/QtChartHistogram.cc
@@ -0,0 +1,293 @@
+/*===========================================================================*\
+ *                                                                           *
+ *                              OpenFlipper                                  *
+ *           Copyright (c) 2001-2024, RWTH-Aachen University                 *
+ *           Department of Computer Graphics and Multimedia                  *
+ *                          All rights reserved.                             *
+ *                            www.openflipper.org                            *
+ *                                                                           *
+ *---------------------------------------------------------------------------*
+ * This file is part of OpenFlipper.                                         *
+ *---------------------------------------------------------------------------*
+ *                                                                           *
+ * Redistribution and use in source and binary forms, with or without        *
+ * modification, are permitted provided that the following conditions        *
+ * are met:                                                                  *
+ *                                                                           *
+ * 1. Redistributions of source code must retain the above copyright notice, *
+ *    this list of conditions and the following disclaimer.                  *
+ *                                                                           *
+ * 2. Redistributions in binary form must reproduce the above copyright      *
+ *    notice, this list of conditions and the following disclaimer in the    *
+ *    documentation and/or other materials provided with the distribution.   *
+ *                                                                           *
+ * 3. Neither the name of the copyright holder nor the names of its          *
+ *    contributors may be used to endorse or promote products derived from   *
+ *    this software without specific prior written permission.               *
+ *                                                                           *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS       *
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED *
+ * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A           *
+ * PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER *
+ * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,  *
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,       *
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR        *
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF    *
+ * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING      *
+ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS        *
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.              *
+ *                                                                           *
+\*===========================================================================*/
+
+
+//=============================================================================
+//
+//  CLASS QtChart - IMPLEMENTATION
+//
+//=============================================================================
+
+//== INCLUDES =================================================================
+
+#include "QtChartHistogram.hh"
+#include <QChart>
+#include <QValueAxis>
+#include <QBarSeries>
+#include <QLineSeries>
+#include <QStackedBarSeries>
+#include <QBarCategoryAxis>
+#include <QBarSet>
+#include <QChartView>
+#include <QRubberBand>
+
+#include <cfloat>
+
+#include <Utils/ColorCoder.hh>
+//== NAMESPACES ===============================================================
+
+namespace ACG {
+namespace QtWidgets {
+
+//This class creates a Histogram in a QChartView. The Histogram can be zoomed in and out by using a rubberband. 
+//The x-axis values are updated when the rubberband is moved. The y-axis values are updated automatically.
+//The Histogram can be color coded.
+//!!!!!IMPORTANT!!!! This class allows for colored bars in the Histogram, which is not possible with QCharts alone. 
+//In order to achieve that we have to create a new QBarSet for each bar. And "stack" them on top of each other.
+//This is not very efficient and should be avoided if possible. In addition to that, the x-axis is detached in order to allow 
+//a correct zoom behavior. (This is also very hacky and should be avoided but I didnt see any other way to make it work)
+//However I think there is a bug in the QCharts library and as soon as it is fixed, the workaround is not needed anymore..
+QtChartHistogram::QtChartHistogram(QString title_X, QString title_Y, const std::vector<double>& _values, QWidget* _parent) : QChartView(_parent)
+{
+    //create chart
+    chart_ = new QChart();
+  
+    //create x-axis 
+    axisX = new QValueAxis();
+    axisX->setTitleText(title_X);
+    axisX->setRange(0, 100);
+    chart_->addAxis(axisX, Qt::AlignBottom);
+
+    // Create y-axis
+    axisY = new QValueAxis();
+    axisY->setTitleText(title_Y);
+    axisY->setRange(0, 500);
+    chart_->addAxis(axisY, Qt::AlignLeft);
+
+    // Set the chart to the chartView(this widget)
+    setChart(chart_);
+    setRubberBand(QChartView::RectangleRubberBand);
+
+    // Create the series and attach it to the chart
+    series = new QStackedBarSeries();
+    chart_->addSeries(series);
+    series->attachAxis(axisY);
+
+    // Set the values
+    setValues(_values);
+
+    // Get the rubberband from the chartView
+    rubberBand_ = findChild<QRubberBand *>();
+    rubberBand_->installEventFilter(this);
+
+    // Install eventfilter for the chartView, so we can update the cursor type if inside the chart 
+    this->installEventFilter(this);
+
+    // Connect the rubberband signal to the slot
+    connect(this, &QtChartHistogram::rubberBandChanged, this, &QtChartHistogram::rubberBandChangedSlot);
+    
+    // Set the render hint to antialiasing, so the chart looks nicer
+    setRenderHint(QPainter::Antialiasing);
+
+    // Hide the legend
+    chart_->legend()->setVisible(false);
+
+    replot();
+
+}
+
+//destructor 
+QtChartHistogram::~QtChartHistogram()
+{}
+
+//------------------------------------------------------------------------------
+
+// Override the mouseReleaseEvent to emit a signal when the right mouse button is released 
+void QtChartHistogram::mouseReleaseEvent(QMouseEvent *event)
+{
+    if (event->button() == Qt::RightButton) {
+       // There might be a more elegant way to reset the zoom, but this is simple and works well
+       replot();
+    }
+    else {
+       QChartView::mouseReleaseEvent(event);
+    }
+}
+
+//------------------------------------------------------------------------------
+
+// Event filter
+bool QtChartHistogram::eventFilter(QObject *obj, QEvent *event)
+{
+    if (obj == this && event->type() == QEvent::Enter){
+        // if we are inside the chart, we wanna change the cursor to a cross
+        setCursor(Qt::CrossCursor);
+    }
+    else if (obj == chart_ && event->type() == QEvent::Leave){
+        // if we leave the chart, we wanna change the cursor back to the default
+        setCursor(Qt::ArrowCursor);
+    }
+
+    // if we use rubberband on the chartView, we wanna update the x-axis values (as the x-axis is detached from the series)
+    if (obj == rubberBand_ && (event->type() == QEvent::HideToParent)){
+        //transform the rubberband coordinates to the x-axis values
+        auto rubberminX = rubberBand_->geometry().x() - chart_->plotArea().x();
+        auto rubbermaxX = rubberBand_->geometry().x() - chart_->plotArea().x() + rubberBand_->geometry().width();
+        
+        emit rubberBandChanged(rubberminX, rubbermaxX);
+    } 
+    return false;
+
+}
+
+//------------------------------------------------------------------------------
+
+void QtChartHistogram::rubberBandChangedSlot(double rubberminX, double rubbermaxX)
+{
+
+  //get the x values of the chart
+  qreal minX = static_cast<const QValueAxis*>(chart_->axes(Qt::Horizontal).back())->min();
+  qreal maxX = static_cast<const QValueAxis*>(chart_->axes(Qt::Horizontal).back())->max();
+  
+  //compute the new x-axis values
+  double newMin = minX + ((rubberminX)/ chart_->plotArea().width()) * (maxX - minX);
+  double newMax = minX + (rubbermaxX / chart_->plotArea().width()) * (maxX - minX);
+
+  //set the new x-axis values
+  dynamic_cast<QValueAxis*>(chart_->axes(Qt::Horizontal).back())->setRange(newMin, newMax);
+
+}
+
+//------------------------------------------------------------------------------
+
+// Set the values
+void QtChartHistogram::setValues(const std::vector<double>& _values)
+{
+  values_ = _values;
+}
+
+//------------------------------------------------------------------------------
+
+// Replot the chart
+void QtChartHistogram::replot()
+{
+    // Create intervals
+    const int intervalCount = 101;
+
+    std::vector<int> intervals(intervalCount, 0);
+
+    double realMin = FLT_MAX;
+    double realMax = -FLT_MAX;
+
+    // Compute realMin and realMax
+    for (const auto& value : values_) {
+        if (!std::isnan(value)) { // Check for NaN
+            realMin = std::min(realMin, value);
+            realMax = std::max(realMax, value);
+        }
+    }
+
+    // Check for the edge case where realMin equals realMax
+    // In this case we have only one value and we want to create some margins around the value
+    // In order to display the value correctly in the histogram
+    if (realMin == realMax) {
+        realMax = realMin + 50;
+        realMin = realMin - 50;
+    }
+
+    float width = (realMax - realMin) / intervalCount;
+
+    // Populate the intervals
+    for (const auto& value : values_) {
+        if (!std::isnan(value)) { // Check for NaN
+            int index = std::min(intervalCount - 1, static_cast<int>((value - realMin) / width));
+            intervals[index]++;
+        }
+    }
+    
+    std::vector<QColor> colors;
+
+    // If we want to color code the histogram
+    if (colorCoding_){
+        // Create Colors for the intervals
+        ACG::ColorCoder cCoder(realMin,realMax);
+        for (int i = 0; i < intervalCount; i++) {
+            const double intervalCenter = realMin + (i + 0.5) * width;
+            colors.push_back(cCoder.color_qcolor(intervalCenter));
+        }
+    } 
+    else {
+        // Use just one color
+        for (int i = 0; i < intervalCount; i++) {
+            const double intervalCenter = realMin + (i + 0.5) * width;
+            colors.push_back(Qt::black);
+        }
+    } 
+    
+    // Remove the old series and create a new one. For some reason you have to remove the series. Simply clearing the series and appending new values does not work.
+    chart_->removeSeries(series);
+
+    // Clear the series
+    series = new QStackedBarSeries();
+    
+    // Set the axes range
+    axisX->setRange(realMin, realMax);
+    axisY->setRange(0, *std::max_element(intervals.begin(), intervals.end()));
+
+    // Create for each Bar a new set. This is needed to add different colors to each bar.
+    for (int i = 0; i < intervalCount; i++) {
+        QBarSet* set = new QBarSet("Values");
+        for (int j = 0; j < intervalCount; j++){
+            if (j == i){
+            *set << intervals[j];
+            set->setColor(colors[j]);
+            }
+            else{
+            *set << 0;
+            }
+        }
+        set->setColor(colors[i]);
+        series->append(set);
+    }
+    chart_->addSeries(series);
+    series->attachAxis(axisY);
+}
+
+void QtChartHistogram::setColorCoding(bool _colorCoding)
+{
+    colorCoding_ = _colorCoding;
+}
+
+} // namespace QtWidgets
+
+} // namespace ACG
+
+
diff --git a/libs_required/ACG/QtWidgets/QtChartHistogram.hh b/libs_required/ACG/QtWidgets/QtChartHistogram.hh
new file mode 100644
index 00000000..30a636c2
--- /dev/null
+++ b/libs_required/ACG/QtWidgets/QtChartHistogram.hh
@@ -0,0 +1,125 @@
+/*===========================================================================*\
+ *                                                                           *
+ *                              OpenFlipper                                  *
+ *           Copyright (c) 2001-2024, RWTH-Aachen University                 *
+ *           Department of Computer Graphics and Multimedia                  *
+ *                          All rights reserved.                             *
+ *                            www.openflipper.org                            *
+ *                                                                           *
+ *---------------------------------------------------------------------------*
+ * This file is part of OpenFlipper.                                         *
+ *---------------------------------------------------------------------------*
+ *                                                                           *
+ * Redistribution and use in source and binary forms, with or without        *
+ * modification, are permitted provided that the following conditions        *
+ * are met:                                                                  *
+ *                                                                           *
+ * 1. Redistributions of source code must retain the above copyright notice, *
+ *    this list of conditions and the following disclaimer.                  *
+ *                                                                           *
+ * 2. Redistributions in binary form must reproduce the above copyright      *
+ *    notice, this list of conditions and the following disclaimer in the    *
+ *    documentation and/or other materials provided with the distribution.   *
+ *                                                                           *
+ * 3. Neither the name of the copyright holder nor the names of its          *
+ *    contributors may be used to endorse or promote products derived from   *
+ *    this software without specific prior written permission.               *
+ *                                                                           *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS       *
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED *
+ * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A           *
+ * PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER *
+ * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,  *
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,       *
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR        *
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF    *
+ * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING      *
+ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS        *
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.              *
+ *                                                                           *
+\*===========================================================================*/
+
+
+//=============================================================================
+//
+//  CLASS QtChart - IMPLEMENTATION
+//
+//=============================================================================
+
+//== INCLUDES =================================================================
+#include <QChart>
+#include <QBarSeries>
+#include <QLineSeries>
+#include <QStackedBarSeries>
+#include <QChartView>
+#include <QRubberBand>
+#include <cfloat>
+#include <QValueAxis>
+
+
+#include <QBarSet>
+
+
+
+//== NAMESPACES ===============================================================
+namespace ACG {
+namespace QtWidgets {
+
+//This class creates a Histogram in a QChartView. The Histogram can be zoomed in and out by using a rubberband. 
+//The x-axis values are updated when the rubberband is moved. The y-axis values are updated automatically.
+//The Histogram can be color coded.
+//!!!!!IMPORTANT!!!! This class allows for colored bars in the Histogram, which is not possible with QCharts alone. 
+//In order to achieve that we have to create a new QBarSet for each bar. And "stack" them on top of each other.
+//This is not very efficient and should be avoided if possible. In addition to that, the x-axis is detached in order to allow 
+//a correct zoom behavior. (This is also very hacky and should be avoided but I didnt see any other way to make it work)
+//However I think there is a bug in the QCharts library and as soon as it is fixed, the workaround is not needed anymore.
+class QtChartHistogram : public QChartView {
+    Q_OBJECT
+
+public:
+
+    /// Default constructor
+    explicit QtChartHistogram(QString title_X, QString title_Y, const std::vector<double>& _values, QWidget* _parent = 0);
+
+    /// Destructor
+    ~QtChartHistogram();
+
+    void setColorCoding(bool _colorCoding);
+
+    void setValues(const std::vector<double>& _values);
+
+    void replot();
+
+public slots:
+
+  void rubberBandChangedSlot(double rubber_min, double rubber_max);
+
+signals:  
+
+  void rubberBandChanged(double rubber_min, double rubber_max);
+
+private:
+
+    //variables
+    QChart* chart_;
+    QValueAxis* axisX;
+    QValueAxis* axisY;
+    QStackedBarSeries* series;
+    QRubberBand* rubberBand_;
+    bool colorCoding_;
+    std::vector<double> values_;
+
+protected:
+
+    bool eventFilter(QObject *obj, QEvent *event) override;
+    void mouseReleaseEvent(QMouseEvent *event) override;
+
+};
+
+} // namespace QtWidgets
+} // namespace ACG
+
+
+
+
+
-- 
GitLab


From 59e944738e512fa44e18e378ade460627998ad98 Mon Sep 17 00:00:00 2001
From: Daniel Savchenko <dsavchenko@carlos.informatik.rwth-aachen.de>
Date: Tue, 3 Sep 2024 19:50:11 +0200
Subject: [PATCH 03/60] Linked QCharts to ACG_tests

---
 libs_required/ACG/CMakeLists.txt | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libs_required/ACG/CMakeLists.txt b/libs_required/ACG/CMakeLists.txt
index f3846b4e..5c071bc3 100644
--- a/libs_required/ACG/CMakeLists.txt
+++ b/libs_required/ACG/CMakeLists.txt
@@ -438,7 +438,7 @@ if ( ACG_BUILD_UNIT_TESTS )
   )
 
   target_link_libraries(ACG_tests
-    GTest::gtest GTest::gtest_main ${OPENMESH_LIBRARIES} ACG ${GLEW_TARGET}
+    GTest::gtest GTest::gtest_main ${OPENMESH_LIBRARIES} ACG ${GLEW_TARGET} QChart
   )
 
   add_test(NAME AllTestsIn_ACG_tests COMMAND ${OUT_DIR}/ACG_tests)
-- 
GitLab


From 776ae2695e16cd1645a2876916adcfcd0480186d Mon Sep 17 00:00:00 2001
From: Daniel Savchenko <dsavchenko@carlos.informatik.rwth-aachen.de>
Date: Tue, 3 Sep 2024 19:57:58 +0200
Subject: [PATCH 04/60] Linked QtCharts to ACG_tests try2

---
 libs_required/ACG/CMakeLists.txt | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libs_required/ACG/CMakeLists.txt b/libs_required/ACG/CMakeLists.txt
index 5c071bc3..eec6ac22 100644
--- a/libs_required/ACG/CMakeLists.txt
+++ b/libs_required/ACG/CMakeLists.txt
@@ -438,7 +438,7 @@ if ( ACG_BUILD_UNIT_TESTS )
   )
 
   target_link_libraries(ACG_tests
-    GTest::gtest GTest::gtest_main ${OPENMESH_LIBRARIES} ACG ${GLEW_TARGET} QChart
+    GTest::gtest GTest::gtest_main ${OPENMESH_LIBRARIES} ACG ${GLEW_TARGET} Qt6::Charts
   )
 
   add_test(NAME AllTestsIn_ACG_tests COMMAND ${OUT_DIR}/ACG_tests)
-- 
GitLab


From 23629688ce5c83bdc1539ad9815c18721d1f1426 Mon Sep 17 00:00:00 2001
From: Daniel Savchenko <dsavchenko@carlos.informatik.rwth-aachen.de>
Date: Tue, 3 Sep 2024 21:53:43 +0200
Subject: [PATCH 05/60] Try to link QtCharts to Mac and Windows

---
 libs_required/ACG/CMakeLists.txt | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/libs_required/ACG/CMakeLists.txt b/libs_required/ACG/CMakeLists.txt
index eec6ac22..84d2cd20 100644
--- a/libs_required/ACG/CMakeLists.txt
+++ b/libs_required/ACG/CMakeLists.txt
@@ -366,7 +366,7 @@ target_link_libraries ( ACG  ${OPENMESH_LIBRARIES}
                              ${GLEW_TARGET} )
 
 if (QT6_FOUND)
-  target_link_libraries( ACG ${QT_TARGET}::OpenGLWidgets )
+  target_link_libraries( ACG ${QT_TARGET}::OpenGLWidgets ${QT_TARGET}::Charts) )
 endif()
 
 
@@ -415,7 +415,7 @@ if ( ACG_BUILD_UNIT_TESTS )
         Algorithm/DBSCANT_impl.hh
       )
 
-  include_directories(${GTEST_INCLUDE_DIRS} )
+  include_directories(${GTEST_INCLUDE_DIRS}  )
   link_directories ( ${GTEST_LIBRARY_DIR})
 
   if ( CMAKE_GENERATOR MATCHES "^Visual Studio 11.*" )
-- 
GitLab


From 63fde6cc541f04d0ab026af684862191ed991d6c Mon Sep 17 00:00:00 2001
From: Daniel Savchenko <dsavchenko@carlos.informatik.rwth-aachen.de>
Date: Tue, 3 Sep 2024 22:01:26 +0200
Subject: [PATCH 06/60] fixed typo

---
 libs_required/ACG/CMakeLists.txt | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libs_required/ACG/CMakeLists.txt b/libs_required/ACG/CMakeLists.txt
index 84d2cd20..66ad4778 100644
--- a/libs_required/ACG/CMakeLists.txt
+++ b/libs_required/ACG/CMakeLists.txt
@@ -366,7 +366,7 @@ target_link_libraries ( ACG  ${OPENMESH_LIBRARIES}
                              ${GLEW_TARGET} )
 
 if (QT6_FOUND)
-  target_link_libraries( ACG ${QT_TARGET}::OpenGLWidgets ${QT_TARGET}::Charts) )
+  target_link_libraries( ACG ${QT_TARGET}::OpenGLWidgets ${QT_TARGET}::Charts)
 endif()
 
 
-- 
GitLab


From 344bfd796429cda1dfaae2d7b902113f6b9e5483 Mon Sep 17 00:00:00 2001
From: Daniel Savchenko <dsavchenko@carlos.informatik.rwth-aachen.de>
Date: Tue, 3 Sep 2024 23:43:56 +0200
Subject: [PATCH 07/60] try redirecting stdin and stdout to avoid error

---
 tests/CMakeLists.txt | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt
index a689ff53..49559dc0 100644
--- a/tests/CMakeLists.txt
+++ b/tests/CMakeLists.txt
@@ -85,7 +85,11 @@ SET (CTEST_DROP_SITE_CDASH FALSE)
   # ========================================================================
   # ========================================================================
 
-  ADD_TEST(BatchStart "${OPENFLIPPER_EXECUTABLE}" -b -c )
+  if(WIN32)
+    ADD_TEST(BatchStart "${OPENFLIPPER_EXECUTABLE}" -b -c < NUL > output.log 2>&1)
+  else()
+    ADD_TEST(BatchStart "${OPENFLIPPER_EXECUTABLE}" -b -c < /dev/null > output.log 2>&1)
+  endif()
 
   # Timeout after 180 seconds if we have an endless loop
   # Should be run serial to avoid collisons with other instances
-- 
GitLab


From 815a574fdc4b5477753898dfc5964802900e6283 Mon Sep 17 00:00:00 2001
From: Daniel Savchenko <dsavchenko@carlos.informatik.rwth-aachen.de>
Date: Wed, 4 Sep 2024 09:58:27 +0200
Subject: [PATCH 08/60] enforce python<3.12

---
 cmake/CMakeLists.txt | 2 +-
 tests/CMakeLists.txt | 6 +-----
 2 files changed, 2 insertions(+), 6 deletions(-)

diff --git a/cmake/CMakeLists.txt b/cmake/CMakeLists.txt
index 2897728c..7fbbb327 100644
--- a/cmake/CMakeLists.txt
+++ b/cmake/CMakeLists.txt
@@ -95,7 +95,7 @@ if (NOT DISABLE_OPENFLIPPER_PYTHON_SYSTEM)
 endif()
 
 if (NOT DISABLE_OPENFLIPPER_PYTHON_SYSTEM)
-  find_package(Python3 COMPONENTS Interpreter Development)
+  find_package(Python3 COMPONENTS Interpreter Development VERSION_LESS 3.12)
 
   if (NOT TARGET pybind11::module OR NOT TARGET pybind11::embed)
       include(FetchContent)
diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt
index 49559dc0..52434263 100644
--- a/tests/CMakeLists.txt
+++ b/tests/CMakeLists.txt
@@ -85,11 +85,7 @@ SET (CTEST_DROP_SITE_CDASH FALSE)
   # ========================================================================
   # ========================================================================
 
-  if(WIN32)
-    ADD_TEST(BatchStart "${OPENFLIPPER_EXECUTABLE}" -b -c < NUL > output.log 2>&1)
-  else()
-    ADD_TEST(BatchStart "${OPENFLIPPER_EXECUTABLE}" -b -c < /dev/null > output.log 2>&1)
-  endif()
+  ADD_TEST(BatchStart "${OPENFLIPPER_EXECUTABLE}" -b -c)
 
   # Timeout after 180 seconds if we have an endless loop
   # Should be run serial to avoid collisons with other instances
-- 
GitLab


From 43b87f7d073176d0521a668cbc2de71b80976a5a Mon Sep 17 00:00:00 2001
From: Daniel Savchenko <dsavchenko@carlos.informatik.rwth-aachen.de>
Date: Wed, 4 Sep 2024 10:33:09 +0200
Subject: [PATCH 09/60] try2 enforce python 3.9...3.12

---
 cmake/CMakeLists.txt | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/cmake/CMakeLists.txt b/cmake/CMakeLists.txt
index 7fbbb327..a88856f5 100644
--- a/cmake/CMakeLists.txt
+++ b/cmake/CMakeLists.txt
@@ -95,7 +95,7 @@ if (NOT DISABLE_OPENFLIPPER_PYTHON_SYSTEM)
 endif()
 
 if (NOT DISABLE_OPENFLIPPER_PYTHON_SYSTEM)
-  find_package(Python3 COMPONENTS Interpreter Development VERSION_LESS 3.12)
+  find_package(Python3 3.9...3.12 COMPONENTS Interpreter Development)
 
   if (NOT TARGET pybind11::module OR NOT TARGET pybind11::embed)
       include(FetchContent)
-- 
GitLab


From 13afa2888405b5c4f1b9e511485f0bdc98c6c7f1 Mon Sep 17 00:00:00 2001
From: Daniel Savchenko <dsavchenko@carlos.informatik.rwth-aachen.de>
Date: Wed, 4 Sep 2024 11:54:23 +0200
Subject: [PATCH 10/60] removed python version constraint and added more debug
 info

---
 cmake/CMakeLists.txt | 2 +-
 tests/CMakeLists.txt | 1 +
 2 files changed, 2 insertions(+), 1 deletion(-)

diff --git a/cmake/CMakeLists.txt b/cmake/CMakeLists.txt
index a88856f5..2897728c 100644
--- a/cmake/CMakeLists.txt
+++ b/cmake/CMakeLists.txt
@@ -95,7 +95,7 @@ if (NOT DISABLE_OPENFLIPPER_PYTHON_SYSTEM)
 endif()
 
 if (NOT DISABLE_OPENFLIPPER_PYTHON_SYSTEM)
-  find_package(Python3 3.9...3.12 COMPONENTS Interpreter Development)
+  find_package(Python3 COMPONENTS Interpreter Development)
 
   if (NOT TARGET pybind11::module OR NOT TARGET pybind11::embed)
       include(FetchContent)
diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt
index 52434263..2afd3581 100644
--- a/tests/CMakeLists.txt
+++ b/tests/CMakeLists.txt
@@ -95,6 +95,7 @@ SET (CTEST_DROP_SITE_CDASH FALSE)
       TIMEOUT 180
       RUN_SERIAL TRUE
       PROCESSORS 1
+      ENVIRONMENT "PYTHONUNBUFFERED=1"
   ) 
 
   # ========================================================================
-- 
GitLab


From fd1867e53bb8877af75fd28657dda5a31fdc0ed0 Mon Sep 17 00:00:00 2001
From: Daniel Savchenko <dsavchenko@carlos.informatik.rwth-aachen.de>
Date: Thu, 5 Sep 2024 13:37:46 +0200
Subject: [PATCH 11/60] check vranitzky with python39

---
 cmake/CMakeLists.txt | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/cmake/CMakeLists.txt b/cmake/CMakeLists.txt
index 2897728c..b5bfcccd 100644
--- a/cmake/CMakeLists.txt
+++ b/cmake/CMakeLists.txt
@@ -95,7 +95,7 @@ if (NOT DISABLE_OPENFLIPPER_PYTHON_SYSTEM)
 endif()
 
 if (NOT DISABLE_OPENFLIPPER_PYTHON_SYSTEM)
-  find_package(Python3 COMPONENTS Interpreter Development)
+  find_package(Python3 3.9 COMPONENTS Interpreter Development)
 
   if (NOT TARGET pybind11::module OR NOT TARGET pybind11::embed)
       include(FetchContent)
-- 
GitLab


From df270a01c37d322e4ff247bf918144dd1b3754b9 Mon Sep 17 00:00:00 2001
From: Daniel Savchenko <dsavchenko@carlos.informatik.rwth-aachen.de>
Date: Thu, 5 Sep 2024 14:14:56 +0200
Subject: [PATCH 12/60] try again

---
 cmake/CMakeLists.txt | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/cmake/CMakeLists.txt b/cmake/CMakeLists.txt
index b5bfcccd..dd85f15a 100644
--- a/cmake/CMakeLists.txt
+++ b/cmake/CMakeLists.txt
@@ -95,7 +95,7 @@ if (NOT DISABLE_OPENFLIPPER_PYTHON_SYSTEM)
 endif()
 
 if (NOT DISABLE_OPENFLIPPER_PYTHON_SYSTEM)
-  find_package(Python3 3.9 COMPONENTS Interpreter Development)
+  find_package(Python3 3.9 COMPONENTS Interpreter Development PATHS "C:/Program Files/Python39/")
 
   if (NOT TARGET pybind11::module OR NOT TARGET pybind11::embed)
       include(FetchContent)
-- 
GitLab


From 67424b0dfd8a3e763dd1fc51b6a9fdadac8a95e7 Mon Sep 17 00:00:00 2001
From: Daniel Savchenko <dsavchenko@carlos.informatik.rwth-aachen.de>
Date: Thu, 5 Sep 2024 15:05:02 +0200
Subject: [PATCH 13/60] change find_package order

---
 cmake/CMakeLists.txt | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/cmake/CMakeLists.txt b/cmake/CMakeLists.txt
index dd85f15a..48e4b76a 100644
--- a/cmake/CMakeLists.txt
+++ b/cmake/CMakeLists.txt
@@ -95,7 +95,6 @@ if (NOT DISABLE_OPENFLIPPER_PYTHON_SYSTEM)
 endif()
 
 if (NOT DISABLE_OPENFLIPPER_PYTHON_SYSTEM)
-  find_package(Python3 3.9 COMPONENTS Interpreter Development PATHS "C:/Program Files/Python39/")
 
   if (NOT TARGET pybind11::module OR NOT TARGET pybind11::embed)
       include(FetchContent)
@@ -107,6 +106,8 @@ if (NOT DISABLE_OPENFLIPPER_PYTHON_SYSTEM)
       set(FETCHCONTENT_FULLY_DISCONNECTED OFF)
       FetchContent_MakeAvailable(pybind11)
   endif()
+
+  find_package(Python3 COMPONENTS Interpreter Development)
 endif()
 
 
-- 
GitLab


From cf9c25b2936d0eb60685c6bec88572722ae80f07 Mon Sep 17 00:00:00 2001
From: Daniel Savchenko <dsavchenko@carlos.informatik.rwth-aachen.de>
Date: Thu, 5 Sep 2024 16:22:22 +0200
Subject: [PATCH 14/60] only find python3 if no pybind

---
 cmake/CMakeLists.txt | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/cmake/CMakeLists.txt b/cmake/CMakeLists.txt
index 48e4b76a..3d2826c3 100644
--- a/cmake/CMakeLists.txt
+++ b/cmake/CMakeLists.txt
@@ -105,9 +105,11 @@ if (NOT DISABLE_OPENFLIPPER_PYTHON_SYSTEM)
       )
       set(FETCHCONTENT_FULLY_DISCONNECTED OFF)
       FetchContent_MakeAvailable(pybind11)
+  else()
+      find_package(Python3 COMPONENTS Interpreter Development)   
   endif()
 
-  find_package(Python3 COMPONENTS Interpreter Development)
+  
 endif()
 
 
-- 
GitLab


From 997d822747ee418c054e39d2cc3b7389abcf32fb Mon Sep 17 00:00:00 2001
From: Daniel Savchenko <dsavchenko@carlos.informatik.rwth-aachen.de>
Date: Thu, 5 Sep 2024 21:22:41 +0200
Subject: [PATCH 15/60] findpackage only if not found yet

---
 cmake/CMakeLists.txt | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/cmake/CMakeLists.txt b/cmake/CMakeLists.txt
index 3d2826c3..4433bb00 100644
--- a/cmake/CMakeLists.txt
+++ b/cmake/CMakeLists.txt
@@ -95,7 +95,9 @@ if (NOT DISABLE_OPENFLIPPER_PYTHON_SYSTEM)
 endif()
 
 if (NOT DISABLE_OPENFLIPPER_PYTHON_SYSTEM)
-
+  if (NOT Python3_FOUND)
+      find_package(Python3 COMPONENTS Interpreter Development)
+  endif()
   if (NOT TARGET pybind11::module OR NOT TARGET pybind11::embed)
       include(FetchContent)
       FetchContent_Declare(
@@ -105,8 +107,6 @@ if (NOT DISABLE_OPENFLIPPER_PYTHON_SYSTEM)
       )
       set(FETCHCONTENT_FULLY_DISCONNECTED OFF)
       FetchContent_MakeAvailable(pybind11)
-  else()
-      find_package(Python3 COMPONENTS Interpreter Development)   
   endif()
 
   
-- 
GitLab


From 6cfa86c0b0cc401db0b9a44de4d00bf3cefd689a Mon Sep 17 00:00:00 2001
From: Daniel Savchenko <dsavchenko@carlos.informatik.rwth-aachen.de>
Date: Mon, 30 Sep 2024 17:50:07 +0200
Subject: [PATCH 16/60] turn on logs in release modes

---
 PythonInterpreter/PythonInterpreter.cc | 72 +++++++++++++-------------
 1 file changed, 36 insertions(+), 36 deletions(-)

diff --git a/PythonInterpreter/PythonInterpreter.cc b/PythonInterpreter/PythonInterpreter.cc
index 2c6053d3..315999fb 100644
--- a/PythonInterpreter/PythonInterpreter.cc
+++ b/PythonInterpreter/PythonInterpreter.cc
@@ -104,44 +104,44 @@ bool PythonInterpreter::modulesInitialized() {
 void PythonInterpreter::initPython() {
 
   if (Py_IsInitialized()  ) {
-    #ifdef PYTHON_DEBUG
+    //#ifdef PYTHON_DEBUG
       std::cerr << "Python already Initialized!" << std::endl;
-    #endif
+    //#endif
     return;
   }
 
-  #ifdef PYTHON_DEBUG
+  //#ifdef PYTHON_DEBUG
     std::cerr << "Initialize interpreter ... " ;
-  #endif
+  //#endif
 
   py::initialize_interpreter();
 
-  #ifdef PYTHON_DEBUG
+  //#ifdef PYTHON_DEBUG
      std::cerr << " Done" << std::endl;
      std::cerr << "[PyInfo] Python " << Py_GetVersion() << std::endl;
      std::wcerr << "[PyInfo] Binary: " << Py_GetProgramFullPath() << std::endl;
      std::wcerr << "[PyInfo] Path: " << Py_GetPath() << std::endl;
      std::cerr << "Initialize Threads ...";
-  #endif
+  //#endif
 
   //PyEval_InitThreads();
 
-  #ifdef PYTHON_DEBUG
+  //#ifdef PYTHON_DEBUG
      std::cerr << " Done" << std::endl;
-  #endif
+  //#endif
 
   if (!modulesInitialized()) {
-    #ifdef PYTHON_DEBUG
+    //#ifdef PYTHON_DEBUG
       std::cerr << "Import __main__" ;
-    #endif
+    //#endif
 
     //dlopen("libpython3.5m.so.1.0", RTLD_LAZY | RTLD_GLOBAL);
     py::module* main = new py::module( py::module::import("__main__") );
 
-    #ifdef PYTHON_DEBUG
+    //#ifdef PYTHON_DEBUG
       std::cerr << " Done" << std::endl;
       std::cerr << "Redirect Outputs ...";
-    #endif
+    //#endif
 
 
     // Redirect python output to integrated logger functions
@@ -151,27 +151,27 @@ void PythonInterpreter::initPython() {
       tyti::pylog::redirect_stdout([this](const char* w) {this->pyOutput(w); });
     }
 
-    #ifdef PYTHON_DEBUG
+    //#ifdef PYTHON_DEBUG
       std::cerr << " Done" << std::endl;
       std::cerr << "Get __dict__ from  main namespace ...";
-    #endif
+    //#endif
 
     // =========================================================
     // Add OpenFlipper Core module to main namespace
     // =========================================================
     py::object main_namespace = main->attr("__dict__");
 
-    #ifdef PYTHON_DEBUG
+    //#ifdef PYTHON_DEBUG
       std::cerr << " Done" << std::endl;
       std::cerr << "Importing OpenFlipper core module ...";
-    #endif
+    //#endif
 
     py::module of_module(py::module::import("openflipper"));
     main_namespace["openflipper"] = of_module;
 
-    #ifdef PYTHON_DEBUG
+    //#ifdef PYTHON_DEBUG
       std::cerr << " Done" << std::endl;
-    #endif
+    //#endif
 
     // =========================================================
     // Import with python interface to main namespace
@@ -181,43 +181,43 @@ void PythonInterpreter::initPython() {
 
     for ( int i = 0 ; i < pythonPlugins.size() ; ++i ) {
 
-      #ifdef PYTHON_DEBUG
+      //#ifdef PYTHON_DEBUG
         std::cerr << "Importing "+ pythonPlugins[i].toStdString() + " module ...";
-      #endif
+      //#endif
 
       py::module om_module(py::module::import(pythonPlugins[i].toStdString().c_str()));
       main_namespace[pythonPlugins[i].toStdString().c_str()] = om_module;
 
-      #ifdef PYTHON_DEBUG
+      //#ifdef PYTHON_DEBUG
         std::cerr << " Done" << std::endl;
-      #endif
+      //#endif
     }
 
-    #ifdef PYTHON_DEBUG
+    //#ifdef PYTHON_DEBUG
       std::cerr << "Copy dict ...";
-    #endif
+    //#endif
 
     global_dict_clean_ = PyDict_Copy(PyModule_GetDict(main->ptr()));
 
-    #ifdef PYTHON_DEBUG
+    //#ifdef PYTHON_DEBUG
       std::cerr << " Done" << std::endl;
       std::cerr << "Set to validate state ...";
-    #endif
+    //#endif
 
     // set the main module member to a validate state, shows, that all modules are successfully initialized
     mainModule_ = main;
 
-    #ifdef PYTHON_DEBUG
+    //#ifdef PYTHON_DEBUG
       std::cerr << " Done" << std::endl;
       std::cerr << "Save thread ...";
-    #endif
+    //#endif
 
     // Do not release the GIL until all modules are initalzed
     PyEval_SaveThread();
 
-    #ifdef PYTHON_DEBUG
+    //#ifdef PYTHON_DEBUG
       std::cerr << " Done" << std::endl;
-    #endif
+    //#endif
 
     // =========================================================
     // Test for numpy
@@ -249,9 +249,9 @@ void PythonInterpreter::resetInterpreter()
 
 bool PythonInterpreter::runScript(const QString& _script) {
 
-#ifdef PYTHON_DEBUG
+//#ifdef PYTHON_DEBUG
   std::cerr << "runScript" << std::endl;
-#endif
+//#endif
 
   //============================================================
   // Prepend module instance getter to the script
@@ -271,15 +271,15 @@ bool PythonInterpreter::runScript(const QString& _script) {
   try
   {
 
-    #ifdef PYTHON_DEBUG
+    //#ifdef PYTHON_DEBUG
       std::cerr << "Initialize Python" << std::endl;
-    #endif
+    //#endif
 
     initPython();
 
-    #ifdef PYTHON_DEBUG
+    //#ifdef PYTHON_DEBUG
       std::cerr << "Done initializing Python" << std::endl;
-    #endif
+    //#endif
   }
   catch (py::error_already_set &e)
   {
-- 
GitLab


From f9645ad3e977996734f7cb324e234f87163b8dc4 Mon Sep 17 00:00:00 2001
From: Daniel Savchenko <dsavchenko@carlos.informatik.rwth-aachen.de>
Date: Mon, 30 Sep 2024 18:47:57 +0200
Subject: [PATCH 17/60] some adjustments

---
 PythonInterpreter/PythonInterpreter.cc | 17 ++++++++++++-----
 1 file changed, 12 insertions(+), 5 deletions(-)

diff --git a/PythonInterpreter/PythonInterpreter.cc b/PythonInterpreter/PythonInterpreter.cc
index 315999fb..42fefd16 100644
--- a/PythonInterpreter/PythonInterpreter.cc
+++ b/PythonInterpreter/PythonInterpreter.cc
@@ -124,7 +124,7 @@ void PythonInterpreter::initPython() {
      std::cerr << "Initialize Threads ...";
   //#endif
 
-  //PyEval_InitThreads();
+  PyEval_InitThreads();
 
   //#ifdef PYTHON_DEBUG
      std::cerr << " Done" << std::endl;
@@ -166,8 +166,15 @@ void PythonInterpreter::initPython() {
       std::cerr << "Importing OpenFlipper core module ...";
     //#endif
 
-    py::module of_module(py::module::import("openflipper"));
-    main_namespace["openflipper"] = of_module;
+    try{
+      py::module of_module(py::module::import("openflipper"));
+      main_namespace["openflipper"] = of_module;
+    }
+    catch (py::error_already_set &e)
+    {
+      pyError(e.what());
+      return;
+    }
 
     //#ifdef PYTHON_DEBUG
       std::cerr << " Done" << std::endl;
@@ -272,13 +279,13 @@ bool PythonInterpreter::runScript(const QString& _script) {
   {
 
     //#ifdef PYTHON_DEBUG
-      std::cerr << "Initialize Python" << std::endl;
+      std::cout << "Initialize Python" << std::endl;
     //#endif
 
     initPython();
 
     //#ifdef PYTHON_DEBUG
-      std::cerr << "Done initializing Python" << std::endl;
+      std::cout << "Done initializing Python" << std::endl;
     //#endif
   }
   catch (py::error_already_set &e)
-- 
GitLab


From b833f37c94601762f19f615556e52ab3c4fd6b69 Mon Sep 17 00:00:00 2001
From: Daniel Savchenko <dsavchenko@carlos.informatik.rwth-aachen.de>
Date: Fri, 11 Oct 2024 08:58:03 +0200
Subject: [PATCH 18/60] revert log changes

---
 PythonInterpreter/PythonInterpreter.cc | 72 +++++++++++++-------------
 1 file changed, 36 insertions(+), 36 deletions(-)

diff --git a/PythonInterpreter/PythonInterpreter.cc b/PythonInterpreter/PythonInterpreter.cc
index 42fefd16..cb630f83 100644
--- a/PythonInterpreter/PythonInterpreter.cc
+++ b/PythonInterpreter/PythonInterpreter.cc
@@ -104,44 +104,44 @@ bool PythonInterpreter::modulesInitialized() {
 void PythonInterpreter::initPython() {
 
   if (Py_IsInitialized()  ) {
-    //#ifdef PYTHON_DEBUG
+    #ifdef PYTHON_DEBUG
       std::cerr << "Python already Initialized!" << std::endl;
-    //#endif
+    #endif
     return;
   }
 
-  //#ifdef PYTHON_DEBUG
+  #ifdef PYTHON_DEBUG
     std::cerr << "Initialize interpreter ... " ;
-  //#endif
+  #endif
 
   py::initialize_interpreter();
 
-  //#ifdef PYTHON_DEBUG
+  #ifdef PYTHON_DEBUG
      std::cerr << " Done" << std::endl;
      std::cerr << "[PyInfo] Python " << Py_GetVersion() << std::endl;
      std::wcerr << "[PyInfo] Binary: " << Py_GetProgramFullPath() << std::endl;
      std::wcerr << "[PyInfo] Path: " << Py_GetPath() << std::endl;
      std::cerr << "Initialize Threads ...";
-  //#endif
+  #endif
 
   PyEval_InitThreads();
 
-  //#ifdef PYTHON_DEBUG
+  #ifdef PYTHON_DEBUG
      std::cerr << " Done" << std::endl;
-  //#endif
+  #endif
 
   if (!modulesInitialized()) {
-    //#ifdef PYTHON_DEBUG
+    #ifdef PYTHON_DEBUG
       std::cerr << "Import __main__" ;
-    //#endif
+    #endif
 
     //dlopen("libpython3.5m.so.1.0", RTLD_LAZY | RTLD_GLOBAL);
     py::module* main = new py::module( py::module::import("__main__") );
 
-    //#ifdef PYTHON_DEBUG
+    #ifdef PYTHON_DEBUG
       std::cerr << " Done" << std::endl;
       std::cerr << "Redirect Outputs ...";
-    //#endif
+    #endif
 
 
     // Redirect python output to integrated logger functions
@@ -151,20 +151,20 @@ void PythonInterpreter::initPython() {
       tyti::pylog::redirect_stdout([this](const char* w) {this->pyOutput(w); });
     }
 
-    //#ifdef PYTHON_DEBUG
+    #ifdef PYTHON_DEBUG
       std::cerr << " Done" << std::endl;
       std::cerr << "Get __dict__ from  main namespace ...";
-    //#endif
+    #endif
 
     // =========================================================
     // Add OpenFlipper Core module to main namespace
     // =========================================================
     py::object main_namespace = main->attr("__dict__");
 
-    //#ifdef PYTHON_DEBUG
+    #ifdef PYTHON_DEBUG
       std::cerr << " Done" << std::endl;
       std::cerr << "Importing OpenFlipper core module ...";
-    //#endif
+    #endif
 
     try{
       py::module of_module(py::module::import("openflipper"));
@@ -176,9 +176,9 @@ void PythonInterpreter::initPython() {
       return;
     }
 
-    //#ifdef PYTHON_DEBUG
+    #ifdef PYTHON_DEBUG
       std::cerr << " Done" << std::endl;
-    //#endif
+    #endif
 
     // =========================================================
     // Import with python interface to main namespace
@@ -188,43 +188,43 @@ void PythonInterpreter::initPython() {
 
     for ( int i = 0 ; i < pythonPlugins.size() ; ++i ) {
 
-      //#ifdef PYTHON_DEBUG
+      #ifdef PYTHON_DEBUG
         std::cerr << "Importing "+ pythonPlugins[i].toStdString() + " module ...";
-      //#endif
+      #endif
 
       py::module om_module(py::module::import(pythonPlugins[i].toStdString().c_str()));
       main_namespace[pythonPlugins[i].toStdString().c_str()] = om_module;
 
-      //#ifdef PYTHON_DEBUG
+      #ifdef PYTHON_DEBUG
         std::cerr << " Done" << std::endl;
-      //#endif
+      #endif
     }
 
-    //#ifdef PYTHON_DEBUG
+    #ifdef PYTHON_DEBUG
       std::cerr << "Copy dict ...";
-    //#endif
+    #endif
 
     global_dict_clean_ = PyDict_Copy(PyModule_GetDict(main->ptr()));
 
-    //#ifdef PYTHON_DEBUG
+    #ifdef PYTHON_DEBUG
       std::cerr << " Done" << std::endl;
       std::cerr << "Set to validate state ...";
-    //#endif
+    #endif
 
     // set the main module member to a validate state, shows, that all modules are successfully initialized
     mainModule_ = main;
 
-    //#ifdef PYTHON_DEBUG
+    #ifdef PYTHON_DEBUG
       std::cerr << " Done" << std::endl;
       std::cerr << "Save thread ...";
-    //#endif
+    #endif
 
     // Do not release the GIL until all modules are initalzed
     PyEval_SaveThread();
 
-    //#ifdef PYTHON_DEBUG
+    #ifdef PYTHON_DEBUG
       std::cerr << " Done" << std::endl;
-    //#endif
+    #endif
 
     // =========================================================
     // Test for numpy
@@ -256,9 +256,9 @@ void PythonInterpreter::resetInterpreter()
 
 bool PythonInterpreter::runScript(const QString& _script) {
 
-//#ifdef PYTHON_DEBUG
+#ifdef PYTHON_DEBUG
   std::cerr << "runScript" << std::endl;
-//#endif
+#endif
 
   //============================================================
   // Prepend module instance getter to the script
@@ -278,15 +278,15 @@ bool PythonInterpreter::runScript(const QString& _script) {
   try
   {
 
-    //#ifdef PYTHON_DEBUG
+    #ifdef PYTHON_DEBUG
       std::cout << "Initialize Python" << std::endl;
-    //#endif
+    #endif
 
     initPython();
 
-    //#ifdef PYTHON_DEBUG
+    #ifdef PYTHON_DEBUG
       std::cout << "Done initializing Python" << std::endl;
-    //#endif
+    #endif
   }
   catch (py::error_already_set &e)
   {
-- 
GitLab


From 917ad2df3dedcfc7a2986ceda4203fcb9d1af8fa Mon Sep 17 00:00:00 2001
From: Daniel Savchenko <dsavchenko@carlos.informatik.rwth-aachen.de>
Date: Fri, 11 Oct 2024 19:37:56 +0200
Subject: [PATCH 19/60] change ctest exec to debug

---
 tests/run_tests.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/tests/run_tests.py b/tests/run_tests.py
index d1c5f65d..096a5ef1 100644
--- a/tests/run_tests.py
+++ b/tests/run_tests.py
@@ -128,7 +128,7 @@ elif sys.platform == "win32":
 
     print(cmake_configuration_list)
 
-    cmake_parameters = [cmake_executable, gtest_prefix , "-G", cmake_generator ,"-DCMAKE_BUILD_TYPE=Release","-DOPENFLIPPER_BUILD_UNIT_TESTS=TRUE" ]
+    cmake_parameters = [cmake_executable, gtest_prefix , "-G", cmake_generator ,"-DCMAKE_BUILD_TYPE=Debug","-DOPENFLIPPER_BUILD_UNIT_TESTS=TRUE" ]
 
     cmake_parameters.extend(cmake_configuration_list)
     cmake_parameters.append("..")
@@ -184,7 +184,7 @@ print("Working directory for test execution: " + os.getcwd(), flush=True)
 
 # call ctest
 ctest = subprocess.run(
-    [ctest_executable, "-C", "Release", "--no-tests=error", "--no-compress-output", "--output-on-failure","--gtest_output=xml:report.xml"])
+    [ctest_executable, "-C", "Debug", "--no-tests=error", "--no-compress-output", "--output-on-failure","--gtest_output=xml:report.xml"])
 
 print("Return Code: ", ctest.returncode)
 
-- 
GitLab


From c21589bd5b2285c152424ac1aac8c25c73f54449 Mon Sep 17 00:00:00 2001
From: Daniel Savchenko <dsavchenko@carlos.informatik.rwth-aachen.de>
Date: Fri, 11 Oct 2024 20:09:05 +0200
Subject: [PATCH 20/60] add stdin/stdout parameters for subprocess

---
 tests/run_tests.py | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/tests/run_tests.py b/tests/run_tests.py
index 096a5ef1..36685f5c 100644
--- a/tests/run_tests.py
+++ b/tests/run_tests.py
@@ -184,7 +184,10 @@ print("Working directory for test execution: " + os.getcwd(), flush=True)
 
 # call ctest
 ctest = subprocess.run(
-    [ctest_executable, "-C", "Debug", "--no-tests=error", "--no-compress-output", "--output-on-failure","--gtest_output=xml:report.xml"])
+    [ctest_executable, "-C", "Debug", "--no-tests=error", "--no-compress-output", "--output-on-failure","--gtest_output=xml:report.xml"],
+    stdin=subprocess.DEVNULL,
+    stdout=subprocess.PIPE,
+    stderr=subprocess.PIPE)
 
 print("Return Code: ", ctest.returncode)
 
-- 
GitLab


From 6f66a62c87766d9993d2b65451b248d1874e2a19 Mon Sep 17 00:00:00 2001
From: Daniel Savchenko <dsavchenko@carlos.informatik.rwth-aachen.de>
Date: Fri, 11 Oct 2024 20:34:11 +0200
Subject: [PATCH 21/60] remove the stdin part

---
 tests/run_tests.py | 1 -
 1 file changed, 1 deletion(-)

diff --git a/tests/run_tests.py b/tests/run_tests.py
index 36685f5c..0bde76b8 100644
--- a/tests/run_tests.py
+++ b/tests/run_tests.py
@@ -185,7 +185,6 @@ print("Working directory for test execution: " + os.getcwd(), flush=True)
 # call ctest
 ctest = subprocess.run(
     [ctest_executable, "-C", "Debug", "--no-tests=error", "--no-compress-output", "--output-on-failure","--gtest_output=xml:report.xml"],
-    stdin=subprocess.DEVNULL,
     stdout=subprocess.PIPE,
     stderr=subprocess.PIPE)
 
-- 
GitLab


From 7632bf68facdb9a2ad2c4f735fd623d84802a1be Mon Sep 17 00:00:00 2001
From: Daniel Savchenko <dsavchenko@carlos.informatik.rwth-aachen.de>
Date: Tue, 15 Oct 2024 08:49:40 +0200
Subject: [PATCH 22/60] add verbose to subprocess

---
 tests/run_tests.py | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/tests/run_tests.py b/tests/run_tests.py
index 0bde76b8..c0be0bd2 100644
--- a/tests/run_tests.py
+++ b/tests/run_tests.py
@@ -184,9 +184,7 @@ print("Working directory for test execution: " + os.getcwd(), flush=True)
 
 # call ctest
 ctest = subprocess.run(
-    [ctest_executable, "-C", "Debug", "--no-tests=error", "--no-compress-output", "--output-on-failure","--gtest_output=xml:report.xml"],
-    stdout=subprocess.PIPE,
-    stderr=subprocess.PIPE)
+    [ctest_executable, "-C", "Debug", "--no-tests=error", "--no-compress-output", "--output-on-failure","--gtest_output=xml:report.xml" "--verbose"])
 
 print("Return Code: ", ctest.returncode)
 
-- 
GitLab


From c911549ef8e7956d1dee5bae41835e6d08d65a9b Mon Sep 17 00:00:00 2001
From: Daniel Savchenko <dsavchenko@carlos.informatik.rwth-aachen.de>
Date: Tue, 15 Oct 2024 09:33:20 +0200
Subject: [PATCH 23/60] more logging hopefully

---
 tests/run_tests.py | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/tests/run_tests.py b/tests/run_tests.py
index c0be0bd2..c00b452f 100644
--- a/tests/run_tests.py
+++ b/tests/run_tests.py
@@ -187,6 +187,8 @@ ctest = subprocess.run(
     [ctest_executable, "-C", "Debug", "--no-tests=error", "--no-compress-output", "--output-on-failure","--gtest_output=xml:report.xml" "--verbose"])
 
 print("Return Code: ", ctest.returncode)
+print("Stdout: ", ctest.stdout)
+print("Stderr: ", ctest.stderr)
 
 if not os.path.exists(os.path.join(os.getcwd(),"report.xml")):
   print("No report found! Directory content:")
-- 
GitLab


From 62f778518bdb2a58044c755168c20a96d67e03d3 Mon Sep 17 00:00:00 2001
From: Daniel Savchenko <dsavchenko@carlos.informatik.rwth-aachen.de>
Date: Tue, 15 Oct 2024 10:13:52 +0200
Subject: [PATCH 24/60] fix typo

---
 tests/run_tests.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tests/run_tests.py b/tests/run_tests.py
index c00b452f..24858dff 100644
--- a/tests/run_tests.py
+++ b/tests/run_tests.py
@@ -184,7 +184,7 @@ print("Working directory for test execution: " + os.getcwd(), flush=True)
 
 # call ctest
 ctest = subprocess.run(
-    [ctest_executable, "-C", "Debug", "--no-tests=error", "--no-compress-output", "--output-on-failure","--gtest_output=xml:report.xml" "--verbose"])
+    [ctest_executable, "-C", "Debug", "--no-tests=error", "--no-compress-output", "--output-on-failure","--gtest_output=xml:report.xml", "--verbose"])
 
 print("Return Code: ", ctest.returncode)
 print("Stdout: ", ctest.stdout)
-- 
GitLab


From 22e378d3b2054e588d84c67ae9b2e13dd5fb4ed4 Mon Sep 17 00:00:00 2001
From: Daniel Savchenko <dsavchenko@carlos.informatik.rwth-aachen.de>
Date: Tue, 15 Oct 2024 13:27:07 +0200
Subject: [PATCH 25/60] add more verbosity

---
 tests/run_tests.py | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/tests/run_tests.py b/tests/run_tests.py
index 24858dff..a6a0d972 100644
--- a/tests/run_tests.py
+++ b/tests/run_tests.py
@@ -130,6 +130,11 @@ elif sys.platform == "win32":
 
     cmake_parameters = [cmake_executable, gtest_prefix , "-G", cmake_generator ,"-DCMAKE_BUILD_TYPE=Debug","-DOPENFLIPPER_BUILD_UNIT_TESTS=TRUE" ]
 
+    # debugging
+    #--------
+    cmake_parameters.append("--verbose")
+    #--------
+
     cmake_parameters.extend(cmake_configuration_list)
     cmake_parameters.append("..")
 
@@ -187,8 +192,6 @@ ctest = subprocess.run(
     [ctest_executable, "-C", "Debug", "--no-tests=error", "--no-compress-output", "--output-on-failure","--gtest_output=xml:report.xml", "--verbose"])
 
 print("Return Code: ", ctest.returncode)
-print("Stdout: ", ctest.stdout)
-print("Stderr: ", ctest.stderr)
 
 if not os.path.exists(os.path.join(os.getcwd(),"report.xml")):
   print("No report found! Directory content:")
-- 
GitLab


From 66563f177849e88dd9b595bd7bd23cd9a2a5cf87 Mon Sep 17 00:00:00 2001
From: Daniel Savchenko <dsavchenko@carlos.informatik.rwth-aachen.de>
Date: Tue, 15 Oct 2024 13:49:43 +0200
Subject: [PATCH 26/60] trace instead of verbose

---
 tests/run_tests.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tests/run_tests.py b/tests/run_tests.py
index a6a0d972..9f1fb1be 100644
--- a/tests/run_tests.py
+++ b/tests/run_tests.py
@@ -132,7 +132,7 @@ elif sys.platform == "win32":
 
     # debugging
     #--------
-    cmake_parameters.append("--verbose")
+    cmake_parameters.append("--trace")
     #--------
 
     cmake_parameters.extend(cmake_configuration_list)
-- 
GitLab


From b662e9e6283c46f3a2dd6f72c80d9f81871cc7d7 Mon Sep 17 00:00:00 2001
From: Daniel Savchenko <dsavchenko@carlos.informatik.rwth-aachen.de>
Date: Tue, 15 Oct 2024 16:34:25 +0200
Subject: [PATCH 27/60] trace only run_tests.py

---
 tests/run_tests.py | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/tests/run_tests.py b/tests/run_tests.py
index 9f1fb1be..d63658fd 100644
--- a/tests/run_tests.py
+++ b/tests/run_tests.py
@@ -132,7 +132,7 @@ elif sys.platform == "win32":
 
     # debugging
     #--------
-    cmake_parameters.append("--trace")
+    cmake_parameters.append("--trace-source = run_tests.py")
     #--------
 
     cmake_parameters.extend(cmake_configuration_list)
@@ -159,9 +159,9 @@ elif sys.platform == "win32":
        message("Error: the folder ../Build has not been found!")
        exit(1)
 
-    src_files = os.listdir("../Build")
+    src_files = os.listdir("..\Build")
     for file_name in src_files:
-        full_file_name = os.path.join("../Build", file_name)
+        full_file_name = os.path.join("..\Build", file_name)
         if os.path.isfile(full_file_name) and full_file_name.endswith(".dll"):
            print("Copyining" + full_file_name + " to testBinaries")
            shutil.copy(full_file_name, "testBinaries")
-- 
GitLab


From 10af971ad92f598d847a1d53ed28db99acb3bec2 Mon Sep 17 00:00:00 2001
From: Daniel Savchenko <dsavchenko@carlos.informatik.rwth-aachen.de>
Date: Tue, 15 Oct 2024 17:39:29 +0200
Subject: [PATCH 28/60] use --debug

---
 tests/run_tests.py | 7 +------
 1 file changed, 1 insertion(+), 6 deletions(-)

diff --git a/tests/run_tests.py b/tests/run_tests.py
index d63658fd..5877eb18 100644
--- a/tests/run_tests.py
+++ b/tests/run_tests.py
@@ -130,11 +130,6 @@ elif sys.platform == "win32":
 
     cmake_parameters = [cmake_executable, gtest_prefix , "-G", cmake_generator ,"-DCMAKE_BUILD_TYPE=Debug","-DOPENFLIPPER_BUILD_UNIT_TESTS=TRUE" ]
 
-    # debugging
-    #--------
-    cmake_parameters.append("--trace-source = run_tests.py")
-    #--------
-
     cmake_parameters.extend(cmake_configuration_list)
     cmake_parameters.append("..")
 
@@ -189,7 +184,7 @@ print("Working directory for test execution: " + os.getcwd(), flush=True)
 
 # call ctest
 ctest = subprocess.run(
-    [ctest_executable, "-C", "Debug", "--no-tests=error", "--no-compress-output", "--output-on-failure","--gtest_output=xml:report.xml", "--verbose"])
+    [ctest_executable, "-C", "Debug", "--no-tests=error", "--no-compress-output", "--output-on-failure","--gtest_output=xml:report.xml", "--debug"])
 
 print("Return Code: ", ctest.returncode)
 
-- 
GitLab


From b516dcef4794e05a52c27791dacda7e7b6da6f81 Mon Sep 17 00:00:00 2001
From: Daniel Savchenko <dsavchenko@carlos.informatik.rwth-aachen.de>
Date: Tue, 15 Oct 2024 18:18:05 +0200
Subject: [PATCH 29/60] add more verbose options

---
 tests/run_tests.py | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/tests/run_tests.py b/tests/run_tests.py
index 5877eb18..5e4adb21 100644
--- a/tests/run_tests.py
+++ b/tests/run_tests.py
@@ -130,6 +130,8 @@ elif sys.platform == "win32":
 
     cmake_parameters = [cmake_executable, gtest_prefix , "-G", cmake_generator ,"-DCMAKE_BUILD_TYPE=Debug","-DOPENFLIPPER_BUILD_UNIT_TESTS=TRUE" ]
 
+    cmake_parameters.append("-DCMAKE_VERBOSE_MAKEFILE=ON")
+
     cmake_parameters.extend(cmake_configuration_list)
     cmake_parameters.append("..")
 
-- 
GitLab


From a9a70165f565a2326b6723fe58aa2857442c151a Mon Sep 17 00:00:00 2001
From: Daniel Savchenko <dsavchenko@carlos.informatik.rwth-aachen.de>
Date: Tue, 15 Oct 2024 18:39:38 +0200
Subject: [PATCH 30/60] even more verbose? And try to remove library check for
 debugging

---
 Core/Core.cc       | 20 ++++++++++----------
 tests/run_tests.py |  4 +---
 2 files changed, 11 insertions(+), 13 deletions(-)

diff --git a/Core/Core.cc b/Core/Core.cc
index f6d936ef..edb91318 100644
--- a/Core/Core.cc
+++ b/Core/Core.cc
@@ -1949,20 +1949,20 @@ bool Core::checkLibraryVersions()  {
 //  bool ok   = true;
 //  bool warn = false;
 
-  QString messages;
+//   QString messages;
 
-  QString qtCompiledVersion = QString( QT_VERSION_STR );
-  QString qtCurrentVersion = qVersion();
+//   QString qtCompiledVersion = QString( QT_VERSION_STR );
+//   QString qtCurrentVersion = qVersion();
 
-  if ( qtCompiledVersion != qtCurrentVersion ) {
-    messages += tr("QT Library Version mismatch!\n");
+//   if ( qtCompiledVersion != qtCurrentVersion ) {
+//     messages += tr("QT Library Version mismatch!\n");
 
-    messages += tr("Currently used QT Version:\t") + qVersion() + "\n";
-    messages += tr("Link time QT Version:\t\t") + QString( QT_VERSION_STR ) + "\n";
-    messages += tr("This inconsistency may lead to an unstable behavior of OpenFlipper!");
+//     messages += tr("Currently used QT Version:\t") + qVersion() + "\n";
+//     messages += tr("Link time QT Version:\t\t") + QString( QT_VERSION_STR ) + "\n";
+//     messages += tr("This inconsistency may lead to an unstable behavior of OpenFlipper!");
 
-//    warn = true;
-  }
+// //    warn = true;
+//   }
 
 //  if ( !ok ) {
 //    QString message = tr("Error! Library tests failed!\n");
diff --git a/tests/run_tests.py b/tests/run_tests.py
index 5e4adb21..583f4512 100644
--- a/tests/run_tests.py
+++ b/tests/run_tests.py
@@ -130,8 +130,6 @@ elif sys.platform == "win32":
 
     cmake_parameters = [cmake_executable, gtest_prefix , "-G", cmake_generator ,"-DCMAKE_BUILD_TYPE=Debug","-DOPENFLIPPER_BUILD_UNIT_TESTS=TRUE" ]
 
-    cmake_parameters.append("-DCMAKE_VERBOSE_MAKEFILE=ON")
-
     cmake_parameters.extend(cmake_configuration_list)
     cmake_parameters.append("..")
 
@@ -186,7 +184,7 @@ print("Working directory for test execution: " + os.getcwd(), flush=True)
 
 # call ctest
 ctest = subprocess.run(
-    [ctest_executable, "-C", "Debug", "--no-tests=error", "--no-compress-output", "--output-on-failure","--gtest_output=xml:report.xml", "--debug"])
+    [ctest_executable, "-C", "Debug", "--no-tests=error", "--no-compress-output", "--output-on-failure","--gtest_output=xml:report.xml", "--extra-verbose"])
 
 print("Return Code: ", ctest.returncode)
 
-- 
GitLab


From f8bdb8f9539c0f30712a0229bf4cb43ab7b34d47 Mon Sep 17 00:00:00 2001
From: Daniel Savchenko <dsavchenko@carlos.informatik.rwth-aachen.de>
Date: Tue, 15 Oct 2024 18:41:30 +0200
Subject: [PATCH 31/60] fix typo..

---
 Core/Core.cc | 14 ++++++++------
 1 file changed, 8 insertions(+), 6 deletions(-)

diff --git a/Core/Core.cc b/Core/Core.cc
index edb91318..d81e5229 100644
--- a/Core/Core.cc
+++ b/Core/Core.cc
@@ -1995,12 +1995,14 @@ bool Core::checkLibraryVersions()  {
 //
 //  }
 
-  #ifndef NDEBUG
-  else {
-    std::cerr << "Library Check succeeded" << std::endl;
-    return true;
-  }
-  #endif
+  // #ifndef NDEBUG
+  // else {
+  //   std::cerr << "Library Check succeeded" << std::endl;
+  //   return true;
+  // }
+  // #endif
+
+  std::cerr << "Library Check succeeded" << std::endl;
 
   return true;
 }
-- 
GitLab


From bc705dadc01e8f571bc67250d05b219bcba052cd Mon Sep 17 00:00:00 2001
From: Daniel Savchenko <dsavchenko@carlos.informatik.rwth-aachen.de>
Date: Tue, 15 Oct 2024 19:25:29 +0200
Subject: [PATCH 32/60] remove std from Core.cc

---
 Core/Core.cc | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/Core/Core.cc b/Core/Core.cc
index d81e5229..abc87d7b 100644
--- a/Core/Core.cc
+++ b/Core/Core.cc
@@ -2002,7 +2002,7 @@ bool Core::checkLibraryVersions()  {
   // }
   // #endif
 
-  std::cerr << "Library Check succeeded" << std::endl;
+  //std::cerr << "Library Check succeeded" << std::endl;
 
   return true;
 }
-- 
GitLab


From 5782662c6e5265b35d0cfcb15732e66b450f1fe4 Mon Sep 17 00:00:00 2001
From: Daniel Savchenko <dsavchenko@luxemburg.informatik.rwth-aachen.de>
Date: Wed, 16 Oct 2024 08:44:58 +0200
Subject: [PATCH 33/60] return to debug instead of extra verbose

---
 tests/run_tests.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tests/run_tests.py b/tests/run_tests.py
index 583f4512..5877eb18 100644
--- a/tests/run_tests.py
+++ b/tests/run_tests.py
@@ -184,7 +184,7 @@ print("Working directory for test execution: " + os.getcwd(), flush=True)
 
 # call ctest
 ctest = subprocess.run(
-    [ctest_executable, "-C", "Debug", "--no-tests=error", "--no-compress-output", "--output-on-failure","--gtest_output=xml:report.xml", "--extra-verbose"])
+    [ctest_executable, "-C", "Debug", "--no-tests=error", "--no-compress-output", "--output-on-failure","--gtest_output=xml:report.xml", "--debug"])
 
 print("Return Code: ", ctest.returncode)
 
-- 
GitLab


From 1694c5bcda622a26087db173d1c3401ef206505f Mon Sep 17 00:00:00 2001
From: Daniel Savchenko <dsavchenko@luxemburg.informatik.rwth-aachen.de>
Date: Wed, 16 Oct 2024 09:33:15 +0200
Subject: [PATCH 34/60] try verbose settings again

---
 tests/run_tests.py | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/tests/run_tests.py b/tests/run_tests.py
index 5877eb18..59e5ec38 100644
--- a/tests/run_tests.py
+++ b/tests/run_tests.py
@@ -128,7 +128,9 @@ elif sys.platform == "win32":
 
     print(cmake_configuration_list)
 
-    cmake_parameters = [cmake_executable, gtest_prefix , "-G", cmake_generator ,"-DCMAKE_BUILD_TYPE=Debug","-DOPENFLIPPER_BUILD_UNIT_TESTS=TRUE" ]
+    cmake_parameters = [cmake_executable, gtest_prefix , "-G", cmake_generator ,"-DCMAKE_BUILD_TYPE=Debug","-DOPENFLIPPER_BUILD_UNIT_TESTS=TRUE"]
+
+    cmake_parameters.append("--trace-expand")
 
     cmake_parameters.extend(cmake_configuration_list)
     cmake_parameters.append("..")
-- 
GitLab


From a593b789f01cb0f940baecce92a73d3d57a1452c Mon Sep 17 00:00:00 2001
From: Daniel Savchenko <dsavchenko@luxemburg.informatik.rwth-aachen.de>
Date: Wed, 16 Oct 2024 09:39:36 +0200
Subject: [PATCH 35/60] try again tracing only 1 file (CMakeLists)

---
 tests/run_tests.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tests/run_tests.py b/tests/run_tests.py
index 59e5ec38..53c37173 100644
--- a/tests/run_tests.py
+++ b/tests/run_tests.py
@@ -130,7 +130,7 @@ elif sys.platform == "win32":
 
     cmake_parameters = [cmake_executable, gtest_prefix , "-G", cmake_generator ,"-DCMAKE_BUILD_TYPE=Debug","-DOPENFLIPPER_BUILD_UNIT_TESTS=TRUE"]
 
-    cmake_parameters.append("--trace-expand")
+    cmake_parameters.append("--trace-source=CMakeLists.txt")
 
     cmake_parameters.extend(cmake_configuration_list)
     cmake_parameters.append("..")
-- 
GitLab


From c779342f00027ada696b1528e9da22adbae03452 Mon Sep 17 00:00:00 2001
From: Daniel Savchenko <dsavchenko@luxemburg.informatik.rwth-aachen.de>
Date: Wed, 16 Oct 2024 10:16:41 +0200
Subject: [PATCH 36/60] trace cmCTestRunTest.cxx

---
 tests/run_tests.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tests/run_tests.py b/tests/run_tests.py
index 53c37173..6093779a 100644
--- a/tests/run_tests.py
+++ b/tests/run_tests.py
@@ -130,7 +130,7 @@ elif sys.platform == "win32":
 
     cmake_parameters = [cmake_executable, gtest_prefix , "-G", cmake_generator ,"-DCMAKE_BUILD_TYPE=Debug","-DOPENFLIPPER_BUILD_UNIT_TESTS=TRUE"]
 
-    cmake_parameters.append("--trace-source=CMakeLists.txt")
+    cmake_parameters.append("--trace-source=cmCTestRunTest.cxx")
 
     cmake_parameters.extend(cmake_configuration_list)
     cmake_parameters.append("..")
-- 
GitLab


From 21bb999702c1d5e6b09fbe7ddcc6a25586757e1d Mon Sep 17 00:00:00 2001
From: Daniel Savchenko <dsavchenko@carlos.informatik.rwth-aachen.de>
Date: Thu, 17 Oct 2024 13:03:16 +0200
Subject: [PATCH 37/60] try --debug-output

---
 tests/run_tests.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tests/run_tests.py b/tests/run_tests.py
index 6093779a..594269af 100644
--- a/tests/run_tests.py
+++ b/tests/run_tests.py
@@ -130,7 +130,7 @@ elif sys.platform == "win32":
 
     cmake_parameters = [cmake_executable, gtest_prefix , "-G", cmake_generator ,"-DCMAKE_BUILD_TYPE=Debug","-DOPENFLIPPER_BUILD_UNIT_TESTS=TRUE"]
 
-    cmake_parameters.append("--trace-source=cmCTestRunTest.cxx")
+    cmake_parameters.append("--debug-output")
 
     cmake_parameters.extend(cmake_configuration_list)
     cmake_parameters.append("..")
-- 
GitLab


From 4e1bfb22b2354746bc13b480f628f1d1f3ab8e37 Mon Sep 17 00:00:00 2001
From: Daniel Savchenko <dsavchenko@carlos.informatik.rwth-aachen.de>
Date: Thu, 17 Oct 2024 14:34:02 +0200
Subject: [PATCH 38/60] ensure python 3.12

---
 cmake/CMakeLists.txt | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/cmake/CMakeLists.txt b/cmake/CMakeLists.txt
index 4433bb00..b6ec6d2d 100644
--- a/cmake/CMakeLists.txt
+++ b/cmake/CMakeLists.txt
@@ -96,7 +96,7 @@ endif()
 
 if (NOT DISABLE_OPENFLIPPER_PYTHON_SYSTEM)
   if (NOT Python3_FOUND)
-      find_package(Python3 COMPONENTS Interpreter Development)
+      find_package(Python3  3.12 COMPONENTS Interpreter Development)
   endif()
   if (NOT TARGET pybind11::module OR NOT TARGET pybind11::embed)
       include(FetchContent)
-- 
GitLab


From 28b6e9f4b28736b6c6359e50f1acedb2c7d17cdb Mon Sep 17 00:00:00 2001
From: Daniel Savchenko <dsavchenko@carlos.informatik.rwth-aachen.de>
Date: Thu, 17 Oct 2024 14:46:46 +0200
Subject: [PATCH 39/60] fix

---
 cmake/CMakeLists.txt | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/cmake/CMakeLists.txt b/cmake/CMakeLists.txt
index b6ec6d2d..41e89024 100644
--- a/cmake/CMakeLists.txt
+++ b/cmake/CMakeLists.txt
@@ -96,7 +96,7 @@ endif()
 
 if (NOT DISABLE_OPENFLIPPER_PYTHON_SYSTEM)
   if (NOT Python3_FOUND)
-      find_package(Python3  3.12 COMPONENTS Interpreter Development)
+      find_package(Python3 3.11...3.12.9 COMPONENTS Interpreter Development)
   endif()
   if (NOT TARGET pybind11::module OR NOT TARGET pybind11::embed)
       include(FetchContent)
-- 
GitLab


From d34d9f3a583c575f30010b233bcdd00c25366ec6 Mon Sep 17 00:00:00 2001
From: Daniel Savchenko <dsavchenko@carlos.informatik.rwth-aachen.de>
Date: Thu, 17 Oct 2024 15:24:02 +0200
Subject: [PATCH 40/60] python min 3.12?

---
 cmake/CMakeLists.txt | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/cmake/CMakeLists.txt b/cmake/CMakeLists.txt
index 41e89024..88a37136 100644
--- a/cmake/CMakeLists.txt
+++ b/cmake/CMakeLists.txt
@@ -96,7 +96,7 @@ endif()
 
 if (NOT DISABLE_OPENFLIPPER_PYTHON_SYSTEM)
   if (NOT Python3_FOUND)
-      find_package(Python3 3.11...3.12.9 COMPONENTS Interpreter Development)
+      find_package(Python3 3.12 COMPONENTS Interpreter Development)
   endif()
   if (NOT TARGET pybind11::module OR NOT TARGET pybind11::embed)
       include(FetchContent)
-- 
GitLab


From b9ab94abc0e37feb3a640795dabc92d0123d7c94 Mon Sep 17 00:00:00 2001
From: Daniel Savchenko <dsavchenko@carlos.informatik.rwth-aachen.de>
Date: Thu, 17 Oct 2024 16:57:58 +0200
Subject: [PATCH 41/60] also add python paths to cmake options in test file

---
 tests/run_tests.py | 1 +
 1 file changed, 1 insertion(+)

diff --git a/tests/run_tests.py b/tests/run_tests.py
index 594269af..e012b2e2 100644
--- a/tests/run_tests.py
+++ b/tests/run_tests.py
@@ -131,6 +131,7 @@ elif sys.platform == "win32":
     cmake_parameters = [cmake_executable, gtest_prefix , "-G", cmake_generator ,"-DCMAKE_BUILD_TYPE=Debug","-DOPENFLIPPER_BUILD_UNIT_TESTS=TRUE"]
 
     cmake_parameters.append("--debug-output")
+    cmake_parameters.append("-DPython3_INCLUDE_DIR=C:\Program Files\Python312\include -DPython3_LIBRARY=C:\Program Files\Python312\libs\python312.lib -DPython3_EXECUTABLE=C:\Program Files\Python312\python.exe")
 
     cmake_parameters.extend(cmake_configuration_list)
     cmake_parameters.append("..")
-- 
GitLab


From 8c65a0bdc4d337df02539b8e3c947493a1ec8dba Mon Sep 17 00:00:00 2001
From: Daniel Savchenko <dsavchenko@carlos.informatik.rwth-aachen.de>
Date: Thu, 17 Oct 2024 17:31:13 +0200
Subject: [PATCH 42/60] fix syntax

---
 tests/run_tests.py | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/tests/run_tests.py b/tests/run_tests.py
index e012b2e2..e68b311a 100644
--- a/tests/run_tests.py
+++ b/tests/run_tests.py
@@ -131,7 +131,9 @@ elif sys.platform == "win32":
     cmake_parameters = [cmake_executable, gtest_prefix , "-G", cmake_generator ,"-DCMAKE_BUILD_TYPE=Debug","-DOPENFLIPPER_BUILD_UNIT_TESTS=TRUE"]
 
     cmake_parameters.append("--debug-output")
-    cmake_parameters.append("-DPython3_INCLUDE_DIR=C:\Program Files\Python312\include -DPython3_LIBRARY=C:\Program Files\Python312\libs\python312.lib -DPython3_EXECUTABLE=C:\Program Files\Python312\python.exe")
+    cmake_parameters.append("-DPython3_INCLUDE_DIR=C:\Program Files\Python312\include")
+    cmake_parameters.append("-DPython3_LIBRARY=C:\Program Files\Python312\libs\python312.lib")
+    cmake_parameters.append("-DPython3_EXECUTABLE=C:\Program Files\Python312\python.exe")
 
     cmake_parameters.extend(cmake_configuration_list)
     cmake_parameters.append("..")
-- 
GitLab


From cec93ad989f737ff33fa51d460f67ae6879447af Mon Sep 17 00:00:00 2001
From: Daniel Savchenko <dsavchenko@carlos.informatik.rwth-aachen.de>
Date: Fri, 18 Oct 2024 09:08:20 +0200
Subject: [PATCH 43/60] upgrade to python3.13

---
 cmake/CMakeLists.txt | 2 +-
 tests/run_tests.py   | 6 +++---
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/cmake/CMakeLists.txt b/cmake/CMakeLists.txt
index 88a37136..f8d60561 100644
--- a/cmake/CMakeLists.txt
+++ b/cmake/CMakeLists.txt
@@ -96,7 +96,7 @@ endif()
 
 if (NOT DISABLE_OPENFLIPPER_PYTHON_SYSTEM)
   if (NOT Python3_FOUND)
-      find_package(Python3 3.12 COMPONENTS Interpreter Development)
+      find_package(Python3 3.13 COMPONENTS Interpreter Development)
   endif()
   if (NOT TARGET pybind11::module OR NOT TARGET pybind11::embed)
       include(FetchContent)
diff --git a/tests/run_tests.py b/tests/run_tests.py
index e68b311a..fccc7d77 100644
--- a/tests/run_tests.py
+++ b/tests/run_tests.py
@@ -131,9 +131,9 @@ elif sys.platform == "win32":
     cmake_parameters = [cmake_executable, gtest_prefix , "-G", cmake_generator ,"-DCMAKE_BUILD_TYPE=Debug","-DOPENFLIPPER_BUILD_UNIT_TESTS=TRUE"]
 
     cmake_parameters.append("--debug-output")
-    cmake_parameters.append("-DPython3_INCLUDE_DIR=C:\Program Files\Python312\include")
-    cmake_parameters.append("-DPython3_LIBRARY=C:\Program Files\Python312\libs\python312.lib")
-    cmake_parameters.append("-DPython3_EXECUTABLE=C:\Program Files\Python312\python.exe")
+    cmake_parameters.append("-DPython3_INCLUDE_DIR=C:\Program Files\Python313\include")
+    cmake_parameters.append("-DPython3_LIBRARY=C:\Program Files\Python313\libs\python313.lib")
+    cmake_parameters.append("-DPython3_EXECUTABLE=C:\Program Files\Python313\python.exe")
 
     cmake_parameters.extend(cmake_configuration_list)
     cmake_parameters.append("..")
-- 
GitLab


From 6e1708bf62cca731b08f78ab5954a92ab5c88f2a Mon Sep 17 00:00:00 2001
From: Daniel Savchenko <dsavchenko@carlos.informatik.rwth-aachen.de>
Date: Fri, 18 Oct 2024 09:45:33 +0200
Subject: [PATCH 44/60] catch error if pythonplugins dont import

---
 PythonInterpreter/PythonInterpreter.cc | 12 ++++++++++--
 1 file changed, 10 insertions(+), 2 deletions(-)

diff --git a/PythonInterpreter/PythonInterpreter.cc b/PythonInterpreter/PythonInterpreter.cc
index cb630f83..7292e544 100644
--- a/PythonInterpreter/PythonInterpreter.cc
+++ b/PythonInterpreter/PythonInterpreter.cc
@@ -192,8 +192,16 @@ void PythonInterpreter::initPython() {
         std::cerr << "Importing "+ pythonPlugins[i].toStdString() + " module ...";
       #endif
 
-      py::module om_module(py::module::import(pythonPlugins[i].toStdString().c_str()));
-      main_namespace[pythonPlugins[i].toStdString().c_str()] = om_module;
+      //try catching an error here for debugging purposes
+      try{
+        py::module om_module(py::module::import(pythonPlugins[i].toStdString().c_str()));
+        main_namespace[pythonPlugins[i].toStdString().c_str()] = om_module;
+      }
+      catch (py::error_already_set &e)
+      {
+        pyError(e.what());
+        return;
+      }
 
       #ifdef PYTHON_DEBUG
         std::cerr << " Done" << std::endl;
-- 
GitLab


From 102f29b9cba3d8d3ffb19cea9fe457ec7d19ecc4 Mon Sep 17 00:00:00 2001
From: Daniel Savchenko <dsavchenko@carlos.informatik.rwth-aachen.de>
Date: Thu, 24 Oct 2024 12:50:01 +0200
Subject: [PATCH 45/60] revert changes to python312

---
 tests/run_tests.py | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/tests/run_tests.py b/tests/run_tests.py
index fccc7d77..e68b311a 100644
--- a/tests/run_tests.py
+++ b/tests/run_tests.py
@@ -131,9 +131,9 @@ elif sys.platform == "win32":
     cmake_parameters = [cmake_executable, gtest_prefix , "-G", cmake_generator ,"-DCMAKE_BUILD_TYPE=Debug","-DOPENFLIPPER_BUILD_UNIT_TESTS=TRUE"]
 
     cmake_parameters.append("--debug-output")
-    cmake_parameters.append("-DPython3_INCLUDE_DIR=C:\Program Files\Python313\include")
-    cmake_parameters.append("-DPython3_LIBRARY=C:\Program Files\Python313\libs\python313.lib")
-    cmake_parameters.append("-DPython3_EXECUTABLE=C:\Program Files\Python313\python.exe")
+    cmake_parameters.append("-DPython3_INCLUDE_DIR=C:\Program Files\Python312\include")
+    cmake_parameters.append("-DPython3_LIBRARY=C:\Program Files\Python312\libs\python312.lib")
+    cmake_parameters.append("-DPython3_EXECUTABLE=C:\Program Files\Python312\python.exe")
 
     cmake_parameters.extend(cmake_configuration_list)
     cmake_parameters.append("..")
-- 
GitLab


From 3541d0fb57e63e10a4ea72e90835be2abfce5ce5 Mon Sep 17 00:00:00 2001
From: Daniel Savchenko <dsavchenko@carlos.informatik.rwth-aachen.de>
Date: Thu, 24 Oct 2024 12:57:31 +0200
Subject: [PATCH 46/60] min python 313 -> 312

---
 cmake/CMakeLists.txt | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/cmake/CMakeLists.txt b/cmake/CMakeLists.txt
index f8d60561..88a37136 100644
--- a/cmake/CMakeLists.txt
+++ b/cmake/CMakeLists.txt
@@ -96,7 +96,7 @@ endif()
 
 if (NOT DISABLE_OPENFLIPPER_PYTHON_SYSTEM)
   if (NOT Python3_FOUND)
-      find_package(Python3 3.13 COMPONENTS Interpreter Development)
+      find_package(Python3 3.12 COMPONENTS Interpreter Development)
   endif()
   if (NOT TARGET pybind11::module OR NOT TARGET pybind11::embed)
       include(FetchContent)
-- 
GitLab


From c47019808054bc56a5fd09da79be41a1e9178827 Mon Sep 17 00:00:00 2001
From: Daniel Savchenko <dsavchenko@carlos.informatik.rwth-aachen.de>
Date: Thu, 24 Oct 2024 15:22:20 +0200
Subject: [PATCH 47/60] update back to python 3.13 and update pybind to newest
 version

---
 cmake/CMakeLists.txt | 4 ++--
 tests/run_tests.py   | 6 +++---
 2 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/cmake/CMakeLists.txt b/cmake/CMakeLists.txt
index 88a37136..38254b83 100644
--- a/cmake/CMakeLists.txt
+++ b/cmake/CMakeLists.txt
@@ -96,14 +96,14 @@ endif()
 
 if (NOT DISABLE_OPENFLIPPER_PYTHON_SYSTEM)
   if (NOT Python3_FOUND)
-      find_package(Python3 3.12 COMPONENTS Interpreter Development)
+      find_package(Python3 3.13 COMPONENTS Interpreter Development)
   endif()
   if (NOT TARGET pybind11::module OR NOT TARGET pybind11::embed)
       include(FetchContent)
       FetchContent_Declare(
         pybind11
         GIT_REPOSITORY https://github.com/pybind/pybind11
-        GIT_TAG v2.10.4
+        GIT_TAG v2.13.6
       )
       set(FETCHCONTENT_FULLY_DISCONNECTED OFF)
       FetchContent_MakeAvailable(pybind11)
diff --git a/tests/run_tests.py b/tests/run_tests.py
index e68b311a..fccc7d77 100644
--- a/tests/run_tests.py
+++ b/tests/run_tests.py
@@ -131,9 +131,9 @@ elif sys.platform == "win32":
     cmake_parameters = [cmake_executable, gtest_prefix , "-G", cmake_generator ,"-DCMAKE_BUILD_TYPE=Debug","-DOPENFLIPPER_BUILD_UNIT_TESTS=TRUE"]
 
     cmake_parameters.append("--debug-output")
-    cmake_parameters.append("-DPython3_INCLUDE_DIR=C:\Program Files\Python312\include")
-    cmake_parameters.append("-DPython3_LIBRARY=C:\Program Files\Python312\libs\python312.lib")
-    cmake_parameters.append("-DPython3_EXECUTABLE=C:\Program Files\Python312\python.exe")
+    cmake_parameters.append("-DPython3_INCLUDE_DIR=C:\Program Files\Python313\include")
+    cmake_parameters.append("-DPython3_LIBRARY=C:\Program Files\Python313\libs\python313.lib")
+    cmake_parameters.append("-DPython3_EXECUTABLE=C:\Program Files\Python313\python.exe")
 
     cmake_parameters.extend(cmake_configuration_list)
     cmake_parameters.append("..")
-- 
GitLab


From bbfc59390c7ee833eae8ddcddcd07bca5d862e3b Mon Sep 17 00:00:00 2001
From: Daniel Savchenko <dsavchenko@carlos.informatik.rwth-aachen.de>
Date: Thu, 24 Oct 2024 15:46:51 +0200
Subject: [PATCH 48/60] change to python 312, because pybind cant find 313

---
 cmake/CMakeLists.txt | 2 +-
 tests/run_tests.py   | 6 +++---
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/cmake/CMakeLists.txt b/cmake/CMakeLists.txt
index 38254b83..81bd64be 100644
--- a/cmake/CMakeLists.txt
+++ b/cmake/CMakeLists.txt
@@ -96,7 +96,7 @@ endif()
 
 if (NOT DISABLE_OPENFLIPPER_PYTHON_SYSTEM)
   if (NOT Python3_FOUND)
-      find_package(Python3 3.13 COMPONENTS Interpreter Development)
+      find_package(Python3 3.12 COMPONENTS Interpreter Development)
   endif()
   if (NOT TARGET pybind11::module OR NOT TARGET pybind11::embed)
       include(FetchContent)
diff --git a/tests/run_tests.py b/tests/run_tests.py
index fccc7d77..e68b311a 100644
--- a/tests/run_tests.py
+++ b/tests/run_tests.py
@@ -131,9 +131,9 @@ elif sys.platform == "win32":
     cmake_parameters = [cmake_executable, gtest_prefix , "-G", cmake_generator ,"-DCMAKE_BUILD_TYPE=Debug","-DOPENFLIPPER_BUILD_UNIT_TESTS=TRUE"]
 
     cmake_parameters.append("--debug-output")
-    cmake_parameters.append("-DPython3_INCLUDE_DIR=C:\Program Files\Python313\include")
-    cmake_parameters.append("-DPython3_LIBRARY=C:\Program Files\Python313\libs\python313.lib")
-    cmake_parameters.append("-DPython3_EXECUTABLE=C:\Program Files\Python313\python.exe")
+    cmake_parameters.append("-DPython3_INCLUDE_DIR=C:\Program Files\Python312\include")
+    cmake_parameters.append("-DPython3_LIBRARY=C:\Program Files\Python312\libs\python312.lib")
+    cmake_parameters.append("-DPython3_EXECUTABLE=C:\Program Files\Python312\python.exe")
 
     cmake_parameters.extend(cmake_configuration_list)
     cmake_parameters.append("..")
-- 
GitLab


From dc1344871a401587e78b06c5f9bb246440c4586a Mon Sep 17 00:00:00 2001
From: Daniel Savchenko <dsavchenko@carlos.informatik.rwth-aachen.de>
Date: Thu, 7 Nov 2024 13:30:16 +0100
Subject: [PATCH 49/60] add NumPy to find_package for Python3

---
 cmake/CMakeLists.txt | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/cmake/CMakeLists.txt b/cmake/CMakeLists.txt
index 81bd64be..53382f4c 100644
--- a/cmake/CMakeLists.txt
+++ b/cmake/CMakeLists.txt
@@ -96,7 +96,7 @@ endif()
 
 if (NOT DISABLE_OPENFLIPPER_PYTHON_SYSTEM)
   if (NOT Python3_FOUND)
-      find_package(Python3 3.12 COMPONENTS Interpreter Development)
+      find_package(Python3 3.12 COMPONENTS Interpreter Development NumPy)
   endif()
   if (NOT TARGET pybind11::module OR NOT TARGET pybind11::embed)
       include(FetchContent)
-- 
GitLab


From 3a8c5b5016b13e81a84894c783ca334f5e1f73e6 Mon Sep 17 00:00:00 2001
From: Daniel Savchenko <dsavchenko@carlos.informatik.rwth-aachen.de>
Date: Thu, 7 Nov 2024 16:48:42 +0100
Subject: [PATCH 50/60] remove verbose output, as error should be fixed now.

---
 cmake/CMakeLists.txt | 2 +-
 tests/run_tests.py   | 1 -
 2 files changed, 1 insertion(+), 2 deletions(-)

diff --git a/cmake/CMakeLists.txt b/cmake/CMakeLists.txt
index 53382f4c..81bd64be 100644
--- a/cmake/CMakeLists.txt
+++ b/cmake/CMakeLists.txt
@@ -96,7 +96,7 @@ endif()
 
 if (NOT DISABLE_OPENFLIPPER_PYTHON_SYSTEM)
   if (NOT Python3_FOUND)
-      find_package(Python3 3.12 COMPONENTS Interpreter Development NumPy)
+      find_package(Python3 3.12 COMPONENTS Interpreter Development)
   endif()
   if (NOT TARGET pybind11::module OR NOT TARGET pybind11::embed)
       include(FetchContent)
diff --git a/tests/run_tests.py b/tests/run_tests.py
index e68b311a..b2b5dbcd 100644
--- a/tests/run_tests.py
+++ b/tests/run_tests.py
@@ -130,7 +130,6 @@ elif sys.platform == "win32":
 
     cmake_parameters = [cmake_executable, gtest_prefix , "-G", cmake_generator ,"-DCMAKE_BUILD_TYPE=Debug","-DOPENFLIPPER_BUILD_UNIT_TESTS=TRUE"]
 
-    cmake_parameters.append("--debug-output")
     cmake_parameters.append("-DPython3_INCLUDE_DIR=C:\Program Files\Python312\include")
     cmake_parameters.append("-DPython3_LIBRARY=C:\Program Files\Python312\libs\python312.lib")
     cmake_parameters.append("-DPython3_EXECUTABLE=C:\Program Files\Python312\python.exe")
-- 
GitLab


From 3fe3f92260549dbe3eb3906aad159ca8562c5767 Mon Sep 17 00:00:00 2001
From: Daniel Savchenko <dsavchenko@carlos.informatik.rwth-aachen.de>
Date: Fri, 8 Nov 2024 09:50:56 +0100
Subject: [PATCH 51/60] remove python path in cmake parameters, as it might
 break tests for linux

---
 tests/run_tests.py | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/tests/run_tests.py b/tests/run_tests.py
index b2b5dbcd..92ad6cff 100644
--- a/tests/run_tests.py
+++ b/tests/run_tests.py
@@ -130,9 +130,10 @@ elif sys.platform == "win32":
 
     cmake_parameters = [cmake_executable, gtest_prefix , "-G", cmake_generator ,"-DCMAKE_BUILD_TYPE=Debug","-DOPENFLIPPER_BUILD_UNIT_TESTS=TRUE"]
 
-    cmake_parameters.append("-DPython3_INCLUDE_DIR=C:\Program Files\Python312\include")
-    cmake_parameters.append("-DPython3_LIBRARY=C:\Program Files\Python312\libs\python312.lib")
-    cmake_parameters.append("-DPython3_EXECUTABLE=C:\Program Files\Python312\python.exe")
+    # This might break the linux tests as the path is not correct, so remove this for now.
+    # cmake_parameters.append("-DPython3_INCLUDE_DIR=C:\Program Files\Python312\include")
+    # cmake_parameters.append("-DPython3_LIBRARY=C:\Program Files\Python312\libs\python312.lib")
+    # cmake_parameters.append("-DPython3_EXECUTABLE=C:\Program Files\Python312\python.exe")
 
     cmake_parameters.extend(cmake_configuration_list)
     cmake_parameters.append("..")
-- 
GitLab


From 319620d269baa9a3ffb9adc824d4c26c3cacee76 Mon Sep 17 00:00:00 2001
From: Daniel Savchenko <dsavchenko@carlos.informatik.rwth-aachen.de>
Date: Fri, 8 Nov 2024 10:15:54 +0100
Subject: [PATCH 52/60] remove unnesassary pythonunbuffered flag

---
 tests/CMakeLists.txt | 1 -
 1 file changed, 1 deletion(-)

diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt
index 2afd3581..52434263 100644
--- a/tests/CMakeLists.txt
+++ b/tests/CMakeLists.txt
@@ -95,7 +95,6 @@ SET (CTEST_DROP_SITE_CDASH FALSE)
       TIMEOUT 180
       RUN_SERIAL TRUE
       PROCESSORS 1
-      ENVIRONMENT "PYTHONUNBUFFERED=1"
   ) 
 
   # ========================================================================
-- 
GitLab


From c5c6b4fced7e7da2c2012ef4decf3a690e5b8a23 Mon Sep 17 00:00:00 2001
From: Daniel Savchenko <dsavchenko@carlos.informatik.rwth-aachen.de>
Date: Fri, 8 Nov 2024 10:51:46 +0100
Subject: [PATCH 53/60] change the min. Python version to 3.11, also remove
 cmake parameters, they are set in the CI

---
 cmake/CMakeLists.txt | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/cmake/CMakeLists.txt b/cmake/CMakeLists.txt
index 81bd64be..89934d76 100644
--- a/cmake/CMakeLists.txt
+++ b/cmake/CMakeLists.txt
@@ -96,7 +96,7 @@ endif()
 
 if (NOT DISABLE_OPENFLIPPER_PYTHON_SYSTEM)
   if (NOT Python3_FOUND)
-      find_package(Python3 3.12 COMPONENTS Interpreter Development)
+      find_package(Python3 3.11 COMPONENTS Interpreter Development)
   endif()
   if (NOT TARGET pybind11::module OR NOT TARGET pybind11::embed)
       include(FetchContent)
-- 
GitLab


From 879e8e124ace3a0509246db2bb678935ed788719 Mon Sep 17 00:00:00 2001
From: Daniel Savchenko <dsavchenko@carlos.informatik.rwth-aachen.de>
Date: Fri, 8 Nov 2024 10:52:36 +0100
Subject: [PATCH 54/60] forgot to add this to last commit(cmake parameter
 change)

---
 tests/run_tests.py | 5 -----
 1 file changed, 5 deletions(-)

diff --git a/tests/run_tests.py b/tests/run_tests.py
index 92ad6cff..871da8c8 100644
--- a/tests/run_tests.py
+++ b/tests/run_tests.py
@@ -130,11 +130,6 @@ elif sys.platform == "win32":
 
     cmake_parameters = [cmake_executable, gtest_prefix , "-G", cmake_generator ,"-DCMAKE_BUILD_TYPE=Debug","-DOPENFLIPPER_BUILD_UNIT_TESTS=TRUE"]
 
-    # This might break the linux tests as the path is not correct, so remove this for now.
-    # cmake_parameters.append("-DPython3_INCLUDE_DIR=C:\Program Files\Python312\include")
-    # cmake_parameters.append("-DPython3_LIBRARY=C:\Program Files\Python312\libs\python312.lib")
-    # cmake_parameters.append("-DPython3_EXECUTABLE=C:\Program Files\Python312\python.exe")
-
     cmake_parameters.extend(cmake_configuration_list)
     cmake_parameters.append("..")
 
-- 
GitLab


From ecf5170166572fddb118ef7ecab27655f0ba93b6 Mon Sep 17 00:00:00 2001
From: Daniel Savchenko <dsavchenko@carlos.informatik.rwth-aachen.de>
Date: Thu, 14 Nov 2024 11:41:08 +0100
Subject: [PATCH 55/60] remove debug output from ctest again

---
 tests/run_tests.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tests/run_tests.py b/tests/run_tests.py
index 871da8c8..5d01c47a 100644
--- a/tests/run_tests.py
+++ b/tests/run_tests.py
@@ -184,7 +184,7 @@ print("Working directory for test execution: " + os.getcwd(), flush=True)
 
 # call ctest
 ctest = subprocess.run(
-    [ctest_executable, "-C", "Debug", "--no-tests=error", "--no-compress-output", "--output-on-failure","--gtest_output=xml:report.xml", "--debug"])
+    [ctest_executable, "-C", "Debug", "--no-tests=error", "--no-compress-output", "--output-on-failure","--gtest_output=xml:report.xml"])
 
 print("Return Code: ", ctest.returncode)
 
-- 
GitLab


From 33b8eb29f0d0c8c430d658c452b951e71530fd3e Mon Sep 17 00:00:00 2001
From: Daniel Savchenko <dsavchenko@carlos.informatik.rwth-aachen.de>
Date: Thu, 14 Nov 2024 11:54:06 +0100
Subject: [PATCH 56/60] changed '\' to '/' such that Mac does not give warning

---
 tests/run_tests.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tests/run_tests.py b/tests/run_tests.py
index 5d01c47a..689b8b38 100644
--- a/tests/run_tests.py
+++ b/tests/run_tests.py
@@ -154,7 +154,7 @@ elif sys.platform == "win32":
        message("Error: the folder ../Build has not been found!")
        exit(1)
 
-    src_files = os.listdir("..\Build")
+    src_files = os.listdir("../Build")
     for file_name in src_files:
         full_file_name = os.path.join("..\Build", file_name)
         if os.path.isfile(full_file_name) and full_file_name.endswith(".dll"):
-- 
GitLab


From 523a0171ce7a376ac251cfc0146cd420ba8f40ba Mon Sep 17 00:00:00 2001
From: Daniel Savchenko <dsavchenko@delors.informatik.rwth-aachen.de>
Date: Tue, 17 Dec 2024 13:38:03 +0100
Subject: [PATCH 57/60] updated gtest version and fixed Mac Codesigning Issue

---
 cmake/fixbundle.cmake.in         | 6 ++++++
 libs_required/ACG/CMakeLists.txt | 2 +-
 2 files changed, 7 insertions(+), 1 deletion(-)

diff --git a/cmake/fixbundle.cmake.in b/cmake/fixbundle.cmake.in
index 73698d92..cb4da4d1 100644
--- a/cmake/fixbundle.cmake.in
+++ b/cmake/fixbundle.cmake.in
@@ -58,3 +58,9 @@ fixup_bundle (@CMAKE_BINARY_DIR@/Build/@OPENFLIPPER_PRODUCT_STRING@.app "${_plug
 # create qt plugin configuration file
 file(WRITE "@CMAKE_BINARY_DIR@/Build/@OPENFLIPPER_PRODUCT_STRING@.app/Contents/Resources/qt.conf" "[Paths]\nPlugins = Resources/QtPlugins")
 
+# Sign all Libraries (needed for Code Signing) 
+execute_process(COMMAND find "@CMAKE_BINARY_DIR@/Build/@OPENFLIPPER_PRODUCT_STRING@.app/Contents/Resources/QtPlugins/" -type f -name "*.dylib" -exec codesign --force --sign - --timestamp=none {} \;)
+execute_process(COMMAND find "@CMAKE_BINARY_DIR@/Build/@OPENFLIPPER_PRODUCT_STRING@.app/Contents/Libraries/" -type f -name "*.dylib" -exec codesign --force --sign - --timestamp=none {} \;)
+
+# Sign all Frameworks (Also needed for Code Signing)
+execute_process(COMMAND find "@CMAKE_BINARY_DIR@/Build/@OPENFLIPPER_PRODUCT_STRING@.app/Contents/Frameworks/" -type d -name "*.framework" -exec codesign --force --sign - --timestamp=none {} \;)
diff --git a/libs_required/ACG/CMakeLists.txt b/libs_required/ACG/CMakeLists.txt
index 66ad4778..5055dbf0 100644
--- a/libs_required/ACG/CMakeLists.txt
+++ b/libs_required/ACG/CMakeLists.txt
@@ -379,7 +379,7 @@ include(FetchContent)
 FetchContent_Declare(
   googletest
   GIT_REPOSITORY https://github.com/google/googletest.git
-  GIT_TAG f8d7d77c06936315286eb55f8de22cd23c188571 # v1.14.0
+  GIT_TAG b514bdc898e2951020cbdca1304b75f5950d1f59 # v1.15.2
 )
 if(WIN32)
     # avoid linking errors, cf https://stackoverflow.com/questions/12540970/how-to-make-gtest-build-mdd-instead-of-mtd-by-default-using-cmake
-- 
GitLab


From 6cc8cd7c5a96d8ae55a6a30a2cc6bad8df3ce00a Mon Sep 17 00:00:00 2001
From: Daniel Savchenko <dsavchenko@delors.informatik.rwth-aachen.de>
Date: Tue, 17 Dec 2024 15:41:00 +0100
Subject: [PATCH 58/60] changed gtest_output:xml= to output.junit

---
 tests/run_tests.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tests/run_tests.py b/tests/run_tests.py
index 689b8b38..e9b3ec39 100644
--- a/tests/run_tests.py
+++ b/tests/run_tests.py
@@ -184,7 +184,7 @@ print("Working directory for test execution: " + os.getcwd(), flush=True)
 
 # call ctest
 ctest = subprocess.run(
-    [ctest_executable, "-C", "Debug", "--no-tests=error", "--no-compress-output", "--output-on-failure","--gtest_output=xml:report.xml"])
+    [ctest_executable, "-C", "Debug", "--no-tests=error", "--no-compress-output", "--output-on-failure","--output-junit report.xml"])
 
 print("Return Code: ", ctest.returncode)
 
-- 
GitLab


From 9fe2ea2a503fd9d9fce0384242d1f02f94071b92 Mon Sep 17 00:00:00 2001
From: Daniel Savchenko <dsavchenko@delors.informatik.rwth-aachen.de>
Date: Wed, 18 Dec 2024 08:42:45 +0100
Subject: [PATCH 59/60] fixed syntax in subprocess.run

---
 tests/run_tests.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tests/run_tests.py b/tests/run_tests.py
index e9b3ec39..c2e32ea3 100644
--- a/tests/run_tests.py
+++ b/tests/run_tests.py
@@ -184,7 +184,7 @@ print("Working directory for test execution: " + os.getcwd(), flush=True)
 
 # call ctest
 ctest = subprocess.run(
-    [ctest_executable, "-C", "Debug", "--no-tests=error", "--no-compress-output", "--output-on-failure","--output-junit report.xml"])
+    [ctest_executable, "-C", "Debug", "--no-tests=error", "--no-compress-output", "--output-on-failure","--output-junit","report.xml"])
 
 print("Return Code: ", ctest.returncode)
 
-- 
GitLab


From 00070be537c29ed3ad980ab8dc50d759bd498241 Mon Sep 17 00:00:00 2001
From: Daniel Savchenko <dsavchenko@carlos.informatik.rwth-aachen.de>
Date: Wed, 19 Feb 2025 13:42:15 +0100
Subject: [PATCH 60/60] clean merge conflicts

---
 Core/Core.cc                           | 34 +++++++++----------
 LicenseManager/keyGen/keygenWidget.cc  | 45 ++++++++++++++------------
 PythonInterpreter/PythonInterpreter.cc |  6 ++--
 cmake/CMakeLists.txt                   |  2 --
 libs_required/ACG/CMakeLists.txt       |  2 +-
 tests/CMakeLists.txt                   |  2 +-
 tests/run_tests.py                     |  2 +-
 widgets/glWidget/QtBaseViewer.cc       |  2 ++
 8 files changed, 48 insertions(+), 47 deletions(-)

diff --git a/Core/Core.cc b/Core/Core.cc
index abc87d7b..f6d936ef 100644
--- a/Core/Core.cc
+++ b/Core/Core.cc
@@ -1949,20 +1949,20 @@ bool Core::checkLibraryVersions()  {
 //  bool ok   = true;
 //  bool warn = false;
 
-//   QString messages;
+  QString messages;
 
-//   QString qtCompiledVersion = QString( QT_VERSION_STR );
-//   QString qtCurrentVersion = qVersion();
+  QString qtCompiledVersion = QString( QT_VERSION_STR );
+  QString qtCurrentVersion = qVersion();
 
-//   if ( qtCompiledVersion != qtCurrentVersion ) {
-//     messages += tr("QT Library Version mismatch!\n");
+  if ( qtCompiledVersion != qtCurrentVersion ) {
+    messages += tr("QT Library Version mismatch!\n");
 
-//     messages += tr("Currently used QT Version:\t") + qVersion() + "\n";
-//     messages += tr("Link time QT Version:\t\t") + QString( QT_VERSION_STR ) + "\n";
-//     messages += tr("This inconsistency may lead to an unstable behavior of OpenFlipper!");
+    messages += tr("Currently used QT Version:\t") + qVersion() + "\n";
+    messages += tr("Link time QT Version:\t\t") + QString( QT_VERSION_STR ) + "\n";
+    messages += tr("This inconsistency may lead to an unstable behavior of OpenFlipper!");
 
-// //    warn = true;
-//   }
+//    warn = true;
+  }
 
 //  if ( !ok ) {
 //    QString message = tr("Error! Library tests failed!\n");
@@ -1995,14 +1995,12 @@ bool Core::checkLibraryVersions()  {
 //
 //  }
 
-  // #ifndef NDEBUG
-  // else {
-  //   std::cerr << "Library Check succeeded" << std::endl;
-  //   return true;
-  // }
-  // #endif
-
-  //std::cerr << "Library Check succeeded" << std::endl;
+  #ifndef NDEBUG
+  else {
+    std::cerr << "Library Check succeeded" << std::endl;
+    return true;
+  }
+  #endif
 
   return true;
 }
diff --git a/LicenseManager/keyGen/keygenWidget.cc b/LicenseManager/keyGen/keygenWidget.cc
index 1b945b8a..8f74df5d 100644
--- a/LicenseManager/keyGen/keygenWidget.cc
+++ b/LicenseManager/keyGen/keygenWidget.cc
@@ -45,6 +45,7 @@
 #include <QtWidgets>
 
 #include <QMessageBox>
+#include <QRegularExpression>
 
 #include "keygenWidget.hh"
 #include <iostream>
@@ -137,10 +138,11 @@ QString KeyGen::Generate(QString expiryDate) const
 }
 
 QString KeyGen::filterString(QString in) {
-    const QRegExp validChar("[a-f0-9]");
-    QString out; out.reserve(in.size());
+    const QRegularExpression validChar("[a-f0-9]");
+    QString out;
+    out.reserve(in.size());
     for (QString::iterator it = in.begin(), it_end = in.end(); it != it_end; ++it) {
-        if (validChar.exactMatch(*it))
+        if (validChar.match(*it).hasMatch())
             out.append(*it);
     }
     return out;
@@ -149,32 +151,34 @@ QString KeyGen::filterString(QString in) {
 std::vector<KeyGen> KeyGen::CreateFromMessyString(QString info)
 {
 	const QString dirt = "[\\s;>]*";
-	const QRegExp rx("\\b([\\w-]+)" + dirt + "((?:(?:[a-f0-9]" + dirt + "){40}){6,})\\b");
-	const QRegExp partRe("((?:[a-f0-9]" + dirt + "){40})");
+    const QRegularExpression rx("\\b([\\w-]+)" + dirt + "((?:(?:[a-f0-9]" + dirt + "){40}){6,})\\b");
+    const QRegularExpression partRe("((?:[a-f0-9]" + dirt + "){40})");
 
     std::vector<KeyGen> R;
+    QRegularExpressionMatch rxMatch;
 	int pos = 0;
-	while ((pos = rx.indexIn(info, pos)) != -1) {
-	    QString hashesStr = rx.cap(2);
+    while ((pos = info.indexOf(rx, pos, &rxMatch)) != -1) {
+        QString hashesStr = rxMatch.captured(2);
         QStringList hashes;
+        QRegularExpressionMatch partReMatch;
         int hashPos = 0;
-	    while ((hashPos = partRe.indexIn(hashesStr, hashPos)) != -1) {
-	        hashes.append(filterString(partRe.cap(1)));
-	        hashPos += partRe.matchedLength();
+        while ((hashPos = hashesStr.indexOf(partRe, hashPos, &partReMatch)) != -1) {
+            hashes.append(filterString(partReMatch.captured(1)));
+            hashPos += partReMatch.capturedLength(1);
 	    }
 
 	    QStringList macList;
 	    std::copy(hashes.begin() + 4, hashes.end() - 1, std::back_inserter(macList));
 
-		KeyGen K(rx.cap(1),
+        KeyGen K(rxMatch.captured(1),
 		        hashes[0],
 		        hashes[1],
 		        hashes[2],
 		        hashes[3],
 		        macList,
-		        hashes[hashes.count()-1]);
+                 hashes[hashes.count() - 1]);
 		R.push_back(K);
-		pos += rx.matchedLength();
+        pos += rxMatch.capturedLength(0);
 	}
 
 	return R;
@@ -253,20 +257,19 @@ void KeyGenWidget::slotAnalyze() {
 	keygens_ = KeyGen::CreateFromMessyString(inputData);
 
 	keyList->clear();
-	for (std::vector<KeyGen>::const_iterator it = keygens_.begin(), it_end = keygens_.end();
-	        it != it_end; ++it) {
+    for (const auto& keygen : keygens_) {
         QListWidgetItem *newItem = new QListWidgetItem( keyList);
-        newItem->setText(it->name);
+        newItem->setText(keygen.name);
         newItem->setHidden(false);
-        KeyGen::ValidationResult r = it->isValid();
+        KeyGen::ValidationResult r = keygen.isValid();
         if (!r)
-          newItem->setTextColor(QColor(255, 0, 0));
+          newItem->setForeground(QColor(255, 0, 0));
         else if (r == KeyGen::LATIN1)
-          newItem->setTextColor(QColor(128, 128, 0));
+          newItem->setForeground(QColor(128, 128, 0));
 	}
 
 	generateLocalButton->setVisible(false);
-	generateAllButton->setVisible(keygens_.size());
+    generateAllButton->setVisible(!keygens_.empty());
 }
 
 void KeyGenWidget::slotSplit() {
@@ -274,7 +277,7 @@ void KeyGenWidget::slotSplit() {
   QString inputData = requestData->toPlainText();
   
   // Split with ;
-  QStringList data = inputData.split(";",QString::SkipEmptyParts);
+  QStringList data = inputData.split(";",Qt::SkipEmptyParts);
   
   QString newText = data.join("\n");
   
diff --git a/PythonInterpreter/PythonInterpreter.cc b/PythonInterpreter/PythonInterpreter.cc
index 7292e544..492c57ac 100644
--- a/PythonInterpreter/PythonInterpreter.cc
+++ b/PythonInterpreter/PythonInterpreter.cc
@@ -124,7 +124,7 @@ void PythonInterpreter::initPython() {
      std::cerr << "Initialize Threads ...";
   #endif
 
-  PyEval_InitThreads();
+  //PyEval_InitThreads();
 
   #ifdef PYTHON_DEBUG
      std::cerr << " Done" << std::endl;
@@ -287,13 +287,13 @@ bool PythonInterpreter::runScript(const QString& _script) {
   {
 
     #ifdef PYTHON_DEBUG
-      std::cout << "Initialize Python" << std::endl;
+      std::cerr << "Initialize Python" << std::endl;
     #endif
 
     initPython();
 
     #ifdef PYTHON_DEBUG
-      std::cout << "Done initializing Python" << std::endl;
+      std::cerr << "Done initializing Python" << std::endl;
     #endif
   }
   catch (py::error_already_set &e)
diff --git a/cmake/CMakeLists.txt b/cmake/CMakeLists.txt
index 89934d76..6dbab6e8 100644
--- a/cmake/CMakeLists.txt
+++ b/cmake/CMakeLists.txt
@@ -108,8 +108,6 @@ if (NOT DISABLE_OPENFLIPPER_PYTHON_SYSTEM)
       set(FETCHCONTENT_FULLY_DISCONNECTED OFF)
       FetchContent_MakeAvailable(pybind11)
   endif()
-
-  
 endif()
 
 
diff --git a/libs_required/ACG/CMakeLists.txt b/libs_required/ACG/CMakeLists.txt
index 5055dbf0..4b16dbb4 100644
--- a/libs_required/ACG/CMakeLists.txt
+++ b/libs_required/ACG/CMakeLists.txt
@@ -415,7 +415,7 @@ if ( ACG_BUILD_UNIT_TESTS )
         Algorithm/DBSCANT_impl.hh
       )
 
-  include_directories(${GTEST_INCLUDE_DIRS}  )
+  include_directories(${GTEST_INCLUDE_DIRS} )
   link_directories ( ${GTEST_LIBRARY_DIR})
 
   if ( CMAKE_GENERATOR MATCHES "^Visual Studio 11.*" )
diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt
index 52434263..a689ff53 100644
--- a/tests/CMakeLists.txt
+++ b/tests/CMakeLists.txt
@@ -85,7 +85,7 @@ SET (CTEST_DROP_SITE_CDASH FALSE)
   # ========================================================================
   # ========================================================================
 
-  ADD_TEST(BatchStart "${OPENFLIPPER_EXECUTABLE}" -b -c)
+  ADD_TEST(BatchStart "${OPENFLIPPER_EXECUTABLE}" -b -c )
 
   # Timeout after 180 seconds if we have an endless loop
   # Should be run serial to avoid collisons with other instances
diff --git a/tests/run_tests.py b/tests/run_tests.py
index c2e32ea3..f2444d19 100644
--- a/tests/run_tests.py
+++ b/tests/run_tests.py
@@ -128,7 +128,7 @@ elif sys.platform == "win32":
 
     print(cmake_configuration_list)
 
-    cmake_parameters = [cmake_executable, gtest_prefix , "-G", cmake_generator ,"-DCMAKE_BUILD_TYPE=Debug","-DOPENFLIPPER_BUILD_UNIT_TESTS=TRUE"]
+    cmake_parameters = [cmake_executable, gtest_prefix , "-G", cmake_generator ,"-DCMAKE_BUILD_TYPE=Release","-DOPENFLIPPER_BUILD_UNIT_TESTS=TRUE" ]
 
     cmake_parameters.extend(cmake_configuration_list)
     cmake_parameters.append("..")
diff --git a/widgets/glWidget/QtBaseViewer.cc b/widgets/glWidget/QtBaseViewer.cc
index 89b70742..601c3580 100644
--- a/widgets/glWidget/QtBaseViewer.cc
+++ b/widgets/glWidget/QtBaseViewer.cc
@@ -1117,6 +1117,8 @@ void glViewer::paintGL(double _aspect)
 void glViewer::resizeEvent(QGraphicsSceneResizeEvent *)
 {
   const auto current_screen = QGuiApplication::screenAt(geometry().center().toPoint());
+  if(!current_screen)
+      return;
   /// update device pixel ratio. getters in this class will make use of it
   /// so we only need to multiply scene information
   properties()->setDevicePixelRatio(current_screen->devicePixelRatio());
-- 
GitLab