dolphinsmalltalk / Dolphin

Dolphin Smalltalk Core Image
MIT License
301 stars 58 forks source link

Fix #928: Random #gpFault: error when closing Scintilla windows bug #1149

Closed blairmcg closed 3 years ago

blairmcg commented 3 years ago

The issue is caused by prompt to save changes showing a message box and starting another main UI process. When the prompt is answered and the message box closes, the thread continues and may destroy the window that generated the prompt. If the window is being repainted at this point, then depending on timing the background thread may destroy the window while the paint message is being processed.

The fix is simply to push the window destroy operation into the deferred action queue, so that the main UI process will destroy the window in sync with it's other activities.

I haven't been able to come up with a useful regression test for this unfortunately.