Files
test/source/blender/render
Omar Emara b9dbf2959d Fix: Crash with a BadAccess X_GLXMakeCurrent error
Blender crashes when opening files that invokes the interactive
compositor on file load with a BadAccess X_GLXMakeCurrent error.

This is caused by the same system GPU context being active in two
threads at the same time, which happens when the GPU context for the
compositor is created in the main thread, it is made current during
creation, but it is not reset to the main GPU context of the drawable
because it is null. So when the GPU compositor actually executes, it
makes the GPU context current again but in its own thread, causing a
BadAccess error in X11 and potentially other window systems.

So the root cause is that the drawable is nullptr, and an attempt to fix
this was committed in 0a70360eb6 but was reverted in 98722773da because
it caused serious issue that were not obvious.

This patch attempts another fix by simply releasing the system GPU
context created when calling the RE_system_gpu_context_ensure. This is
more robust anyways because callers do not expect the context to be
bound form an API point of view.

Pull Request: https://projects.blender.org/blender/blender/pulls/129793
2024-11-04 16:17:17 +01:00
..