Bugzilla – Attachment 825 Details for
Bug 1398
[NSOpenGLContext setView:] must be executed on the main thread
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Corrected patch to also work on macOS 10.8
macos.jogl.patch (text/plain), 2.09 KB, created by
jani
on 2019-11-19 22:14:50 CET
(
hide
)
Description:
Corrected patch to also work on macOS 10.8
Filename:
MIME Type:
Creator:
jani
Created:
2019-11-19 22:14:50 CET
Size:
2.09 KB
patch
obsolete
>commit 5380377443527329db106b5904509c393bf60ec4 >Author: Jani Turkia <jani@nexcus.com> >Date: Tue Nov 19 15:06:58 2019 -0600 > > Moved manipulations of NSOpenGLContext and the NSView related to it to the main thread. > > In at least MacOS Catalina (10.15) the OpenGL context must be created and updated on the main thread only. > > This is from the crash report: > -[NSOpenGLContext setView:] must be called from the main thread. > >diff --git a/src/jogl/native/macosx/MacOSXWindowSystemInterface.m b/src/jogl/native/macosx/MacOSXWindowSystemInterface.m >index 462b539..43ed8e1 100644 >--- a/src/jogl/native/macosx/MacOSXWindowSystemInterface.m >+++ b/src/jogl/native/macosx/MacOSXWindowSystemInterface.m >@@ -556,7 +556,7 @@ NSOpenGLContext* createContext(NSOpenGLContext* share, > GLint zeroOpacity = 0; > [ctx setValues:&zeroOpacity forParameter:NSOpenGLCPSurfaceOpacity]; > } >- [ctx setView:view]; // Bug 1087: Set default framebuffer, hence enforce NSView realization >+ [ctx performSelectorOnMainThread:@selector(setView) withObject:view waitUntilDone:YES]; // Bug 1087: Set default framebuffer, hence enforce NSView realization > if( viewReadyAndLocked ) { > [view unlockFocus]; > } >@@ -574,7 +574,7 @@ void setContextView(NSOpenGLContext* ctx, NSView* view) { > Bool viewReadyAndLocked = lockViewIfReady(view); > DBG_PRINT("setContextView.0: ctx %p, view %p: setView: %d\n", ctx, view, viewReadyAndLocked); > if( viewReadyAndLocked ) { >- [ctx setView:view]; >+ [ctx performSelectorOnMainThread:@selector(setView) withObject:view waitUntilDone:YES]; > [view unlockFocus]; > } > } >@@ -655,7 +655,7 @@ void updateContext(NSOpenGLContext* ctx) { > NSView *nsView = [ctx view]; > if(NULL != nsView) { > DBG_PRINT("updateContext.0: ctx %p, ctx.view %p\n", ctx, nsView); >- [ctx update]; >+ [ctx performSelectorOnMainThread:@selector(update) withObject:nil waitUntilDone:YES]; > DBG_PRINT("updateContext.X\n"); > } > [pool release];
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 1398
:
824
| 825 |
838
|
839
|
840
|
841
|
842
|
843
|
844