Opened 11 years ago
Last modified 11 years ago
#2075 new defect
[ATLAS] Deadlock in sys_display_error on Windows
Reported by: | historic_bruno | Owned by: | |
---|---|---|---|
Priority: | Should Have | Milestone: | Backlog |
Component: | Atlas editor | Keywords: | |
Cc: | Patch: |
Description
(Was discussed on #1729 but it should have its own ticket):
Currently, debug errors in Atlas are displayed using the same code as for the game, from the engine thread. This is unreliable - when an error happens early in init (e.g. shader error), deadlock occurs in DialogBoxParamW
. It's likely the user won't be running in a debugger and will miss any relevant debug output.
There is code in GameLoop.cpp
to override the ah_display_error
hook with a wx-compatible Atlas error display on the UI thread. But it's not currently used because the override is overriden again by the engine (see r13724). We shouldn't use it anyway because the engine thread continues running in the background, so further errors might be ignored, plus it's very ugly and offers no Continue/Suppress/Break/Exit options to the user.
We need a proper solution that solves the deadlock, works even if the Atlas UI thread is waiting on the message passer semaphore, and provides a nice looking error window.
Discussed on IRC 2013-08-20 from 21:02.