diff options
author | Sven Gothel <[email protected]> | 2014-06-12 08:20:38 +0200 |
---|---|---|
committer | Sven Gothel <[email protected]> | 2014-06-12 08:20:38 +0200 |
commit | 5626740d14554acf7a17a73ec12b0893445832d0 (patch) | |
tree | f2d68b4df87f0ecc1946d72e3d84f0b3587d2798 /make/scripts/make.jogl.all.linux-x86-clang.sh | |
parent | 94de08a2b0661d072324677c729fc8d1b3d0ef0f (diff) |
Fix Bug 1019 - Remedy of Bug 691 causes 'access/modify after free' and crashes the app
The 'magic' MyNSOpenGLContext::dealloc (MacOSXWindowSystemInterface-calayer.m)
of force destroying the underlying CGLContextObj of it's associated
NSOpenGLContext as introduced as a remedy of Bug 691 is plain wrong.
It was added in commit f6e6fab2a7ddfb5c9b614cb072c27ff697629161
to mitigate the experience behavior of delayed GL context
destruction when creating/destroying them multiple times
as exposed in unit test TestGLCanvasAddRemove01SwingAWT.
While this 'hack' worked for some reason on some OSX versions,
it caused a 'access/modify after free' issue exposed under some circumstances
and crashes the application.
The actual culprit of the delayed GL context destruction is different.
The offthread CALayer detachment and hence final destruction
issued on the main-thread is _not_ issued immediately
due to some referencing holding by NSApp.
Issuing an empty event on the NSApp (thread) will wake up the thread
and release claimed resources.
This has been found while realizing that the GL context
are released if the mouse is being moved (duh!).
This issue is also known when triggering stop on the NSApp (NEWT MainThread),
same remedy has been implemented here for a long time.
Diffstat (limited to 'make/scripts/make.jogl.all.linux-x86-clang.sh')
0 files changed, 0 insertions, 0 deletions