Fix crash when deleting script runner#1958
Conversation
|
No, I have never encountered any issues related to such crashes while working on the @daves003 Can you provide a concrete example of this issue or Steps To Reproduce? Or did you just notice it during code review – be it manual, using a linter, or an AI tool? Furthermore, #1933 just adapts to I did a quick test on a branch where both this commit and the one from #1933 had been applied and this seems to work fine as well. |
|
I just came across the crash when building some really short looping scripts. So instead of the AppImage I built it locally in debug mode and that showed a Repro that crashes consistently for me:
#1933 also looks not directly related to me. I've quickly tested a version with both of the changes and it seems to be running fine. |
|
Thank you for the information. Using the steps, I was able to reproduce the behaviour described above. However, your fix does not solve this issue for me – QLC+ still crashes in various different I was unable to find the root cause in the time available. |
|
Interesting, it looked stable for me so far. I'll keep using this branch and see if I can catch crashes in other places. |
|
Merged, thanks 👍 |
Description
Avoid deleting the script runner immediately in the slot connected to finished() .
QThread is not quite done executing, so this crashed. Using deleteLater() is explicitly mentioned by Qt to avoid this problem and only delete the thread when it's fully done.
Checklist
{on a new line for functions and class definitions.