State:New|TargetRelease:No Target|icon_bug|database:public|icon_mari|Resolution:Fixed|BugID:388715|
Problem summary:
Mari crashes when running a specific Python script for garbage cleanup.
Customer reported version:
Mari 4.2v1
Customer reported platform:
n/a
Steps to reproduce:
1) In Mari, open the Python console [Ctrl+Alt+P].
2) Copy/paste the following code:
import gcimport sysimport threadingimport ctypesimport timefrom PySide2 import QtWidgetsfrom PySide2 import QtCoredef gcloop(): time.sleep(1.0) # YMMV while 1: gc.collect() time.sleep(0.1)def circular(): label = QtWidgets.QWidget() o1 = [label] o2 = [o1] o1.append(o2) label.show()label = QtWidgets.QWidget()label.show()tm = QtCore.QTimer()tm.timeout.connect(circular)tm.start(100)sys.modules['killer'] = threading.Thread(target=gcloop)sys.modules['killer'].start()
3) Run the command by clicking Evaluate or by pressing the hotkey [Ctrl+Enter], and observe performance.
Expected behavior:
Mari should continue running without crashing.
Actual behavior:
Mari will crash after creating/closing approximately 2500 individual windows in ~5min.
Workaround:
A workaround is not available at this time.
Reproduced by Support in:
Mari 4.5v1 - Windows 10
Mari 4.2v1 - Windows 10
Mari 4.1v2 - Windows 10
Mari 4.0v4 - Windows 10
Mari 4.0v1 - Windows 10
Unable to reproduce bug in:
Mari 3.4v2 - Pyside2 was not available in versions prior to 4.0v1.
Earliest version tested:
Mari 3.4v2 - This feature did not exist before this version.
We're sorry to hear that
Please tell us why