mrview: Proposed mitigation for segfault on -overlay.load#3343
mrview: Proposed mitigation for segfault on -overlay.load#3343Lestropie wants to merge 1 commit into
Conversation
Generated-by: Claude Opus 4.7 <noreply@anthropic.com>
|
I investigated the issue in #1506 some time ago. I think the solution proposed by the AI is very hacky and honestly not satisfactory. It's effectively proposing a very ugly band-aid for what really needs a deeper architectural change IMO, without even considering that the changes proposed don't fully address the problem. One might think that this prevents a recursive call of Qt's event processing, but it doesn't. This is because QProgressDialog::setValue() itself calls Furthermore, the code written as above is not exception safe. What happens if Even addressing these issues, I think the direction proposed is here isn't really idiomatic Qt/C++ code. The problem that needs addressing is we're doing sustained GL work while manually pumping the GUI event loop (which in turn triggers callbacks that mess with state that was touched by the function from This would avoid the need of manually calling On this note, I would like to add that, while I completely understand the temptation of delegating these very annoying to debug issues to AI agents, I do think that one needs to be careful with the solutions they propose (at least in their current state). This is exactly the sort of issue where a superficially plausible fix can look convincing while not actually addressing the underlying failure mode. |
|
Under no illusion that this one is a panacea. Just couldn't reproduce the fault after generating the candidate, so putting it here out of my work directory so that if I or anyone else encounters the fault specifically with I think there's general agreement that there's considerable fragility around the Qt code. But it's very difficult to fully wrap one's head around unless it becomes the sole focus for a period of time. Deeper refactoring would be great but not going to happen for 3.1. |
Closes #1506.
Gave a verbose description of the fault to Claude, and this is what it came up with.
Have not been able to verify that it fixes the problem because I've not been successful in reproducing the problem; maybe something has been rectified in the Qt internals. So might benefit from a couple of people with different platforms testing.