Skip to content
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

On macOS Mojave: Program hangs when using SDL Renderer one one thread and OpenGL on another #2994

Closed
SDLBugzilla opened this issue Feb 11, 2021 · 0 comments

Comments

@SDLBugzilla
Copy link
Collaborator

This bug report was migrated from our old Bugzilla tracker.

These attachments are available in the static archive:

Reported in version: 2.0.8
Reported for operating system, platform: Mac OS X (All), x86_64

Comments on the original bug report:

On 2018-09-28 00:00:59 +0000, Daniel Bokser wrote:

Created attachment 3320
Simple program with SDL Renderer on main thread and OpenGL on another

On Mojave and Xcode 10, my program hangs after a few seconds when rendering using an SDL Renderer on the main thread and using OpenGL on another. I have attached a simple program that demonstrates this. Looks like both thread are stuck on [nsContext flushBuffer] in Cocoa_GL_SwapWindow() in SDL_cocoaopengl.m. This is with Ryan's fix on https://bugzilla.libsdl.org/show_bug.cgi?id=4272

This program works fine when compiling with Xcode 9.

On 2018-10-19 03:39:10 +0000, Ryan C. Gordon wrote:

Mojave appears to have a deadlock if you swap two separate windows/contexts from two separate threads at the same time; I stuck a mutex around our swap code which appears to fix it.

That fix is https://hg.libsdl.org/SDL/rev/84eaa0636bac

--ryan.

On 2018-10-23 03:48:59 +0000, Daniel Bokser wrote:

Thank you! This fixed the deadlock issue for me. However, my SDL project is still not completely fixed in Mojave. I have opened up another issue here: https://bugzilla.libsdl.org/show_bug.cgi?id=4329

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant