New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
MakeScreenshot locking is broken when called from outside of VideoDriver::Tick #9147
Comments
I managed to trigger the crash, which resulted in the following error: First crash log from commit 49aa392 (assertion failed)
Crash files from assertion failure: crash.zip I also managed to trigger a (similar) crash, but this time without the assertion. Note that the crash produced a broken image, which is also attached. Crash log without the assertion failure
Crash files from non-assert crash: crash.zip As far as I can tell, the crash occurs only with the |
This is the same problem which ended in delaying blitter switching till the main thread runs: Normal screenshot needs video buffer, which is an OpenGL call. OpenGL calls on the game thread fail because no valid context is set. Additionally, currently only locking the video buffer when holding the game lock is also necessary to avoid bad thread interaction. Possible solutions:
|
…s we may not access the video buffer from the game thread.
…s we may not access the video buffer from the game thread.
…y not access the video buffer from the game thread.
Version of OpenTTD
master, 49aa392
Steps to reproduce
rcon <password> screenshot
few times until first instance crashesThe text was updated successfully, but these errors were encountered: