From b314d71c2451f81347895617bf1dedb5a7fdf5e2 Mon Sep 17 00:00:00 2001 From: wmayer Date: Thu, 14 Aug 2025 17:36:33 +0200 Subject: [PATCH] Gui: Hold the GIL when clearing the form attribute Inside TaskDialogPython::clearForm() the interpreter may execute a lot of things where at the some point the GIL must be hold. This very likely fixes https://github.com/FreeCAD/FreeCAD/issues/22863 @thyssentishman Please check this branch --- src/Gui/TaskView/TaskDialogPython.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/Gui/TaskView/TaskDialogPython.cpp b/src/Gui/TaskView/TaskDialogPython.cpp index 5bf0e2019d..fc74eb20ed 100644 --- a/src/Gui/TaskView/TaskDialogPython.cpp +++ b/src/Gui/TaskView/TaskDialogPython.cpp @@ -634,6 +634,7 @@ void TaskDialogPython::appendForm(QWidget* form, const QPixmap& icon) void TaskDialogPython::clearForm() { + Base::PyGILStateLocker lock; try { // The widgets stored in the 'form' attribute will be deleted. // Thus, set this attribute to None to make sure that when using