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

[BUG] macOS Catalina: eglMakeCurrent crashes if not called on ui thread #46

Open
wang-bin opened this issue Nov 9, 2019 · 2 comments
Open
Labels

Comments

@wang-bin
Copy link

wang-bin commented Nov 9, 2019

Description

I see eglMakeCurrent() calls [NSOpenGLContext setView:], which must be called in UI thread. Before macOS 10.15 it's not a problem, but xcode will warn about UI API called on non-ui thread if you write similar opengl context code yourself.

BTW, I think setView should be called in eglCreateWindowSurface but not eglMakeCurrent.

Repro steps

  • Create a rendering thread
  • Create egl context for NSView in rendering thread
  • make current

Environment

  • SDK version: 5.3.1, 5.4
  • macOS 10.15+

Additional Info

Thread 6 Crashed:
0   com.apple.AppKit              	0x00007fff38180cbc -[NSOpenGLContext setView:] + 229
1   libEGL.dylib                  	0x0000000119687a4c cocoa_make_current(void*, void*) + 124
2   libEGL.dylib                  	0x00000001196882c4 glove::GLContext::make_current(void*) const + 20
3   libEGL.dylib                  	0x00000001196393f1 egl::Context::make_current(std::__1::shared_ptr<egl::Surface>, std::__1::shared_ptr<egl::Surface>) + 641
4   libEGL.dylib                  	0x00000001196391f9 egl::Context::make_current(std::__1::shared_ptr<egl::Surface>, std::__1::shared_ptr<egl::Surface>) + 137
5   libEGL.dylib                  	0x00000001196410f4 eglMakeCurrent + 740
@wang-bin wang-bin added the bug label Nov 9, 2019
@omarzohdi
Copy link
Contributor

Hi @wang-bin, thanks for bringing this up. The powervr SDK was not tested against macOS 10.15. We'll be looking into the issue and providing a patch as soon as possible.

@SPConrad
Copy link

Is this still being investigated?

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

No branches or pull requests

3 participants