Discovered a strange bug in QML
-
wrote 22 days ago last edited by Pleafles 5 Dec 2025, 05:19
Environment: Windows 10+Msys2+Qt5.15.10-5.15.16 (MinGW).
Please refer to the attachment for the code and debugging.
Trigger situation: Appears after a fixed number of runs.
Explanation: This issue occurs in Qt5.15.11-5.15.16, but was not found in the version 5.15.2(official) and 5.15.10(MSYS2).
Code:
Output:tpromise is a Promise object in JavaScript, while game, d, and $pymo are all regular JavaScript objects.
Actually, after my step-by-step debugging, I found that the code(game.d.$pymo.wait_promise = tpromise;) placed the tpromise object in game.d.$pymo.background, which is a serious error. If I run 'game.d.$pymo.wait_promise = tpromise;' again, the game.d.$pymo.wait_promise value will be correct.
-
Please try a more recent Qt version. 5.15 is EOL. I can’t reproduce this on 6.5.
2/2