Created attachment 124988 [details] kig crash report SUMMARY STEPS TO REPRODUCE 1. start kig 2. use python scripting 3. select exit menu entry OBSERVED RESULT kig crash EXPECTED RESULT SOFTWARE/OS VERSIONS Windows: macOS: Linux/KDE Plasma: (available in About System) KDE Plasma Version: KDE Frameworks Version: Qt Version: ADDITIONAL INFORMATION
I can confirm this behaviour: if a kig construction contains a PythonScript object, then kig crashes upon closing it. As reported to me by Franco, the problem is apparently in the destructor PythonScripter::~PythonScripter() { PyErr_Clear(); Py_Finalize(); delete d; } As noted by Franco, the problem disappears upon moving the 'delete d' before the Py_Finalize() call
Git commit 211f8501ec4cf77ed68253783d58a662b5513612 by Maurizio Paolini. Committed on 11/01/2020 at 18:50. Pushed by paolini into branch 'master'. Fix crash upon exit after transition python2 -> python3 when using scripting (bug #416037) Reviewed By: kkevin Differential Revision: https://phabricator.kde.org/D12833 M +1 -1 scripting/python_scripter.cc https://commits.kde.org/kig/211f8501ec4cf77ed68253783d58a662b5513612
For next time: my KDE username is actually kkofler, not kkevin. :-)
Git commit faec9ac0f6f73e312dc051ce34eaf3154d456e96 by Maurizio Paolini. Committed on 18/01/2020 at 05:47. Pushed by paolini into branch 'master'. Going back to original Py_Finalize() to maintain compatibility with pithon2 and earlier versions of python3 Reviewed By: wbauer Differential Revision: https://phabricator.kde.org/D26550 M +2 -1 scripting/python_scripter.cc https://commits.kde.org/kig/faec9ac0f6f73e312dc051ce34eaf3154d456e96