[opensource-dev] Mac viewer and Apple maintained opensource libraries

Geir Nøklebye geir.noklebye at dayturn.com
Wed Feb 1 23:14:21 PST 2017


Oz Linden said:

> If you've got a fix, we'd love to see it.

There is no quick fix except rewriting the renderer to use the NSOpenGLProfileVersion3_2Core profile or even Metal (which would also be a first step to also run on iOS).

In Kokua we have managed to delay the crash from happening within 30 secs to 2 minutes in many scenes to 10+ minutes to not happening at all in the same scenes. This was done through a series of steps:

1. The simplest and most surprising was adding an Apple OpenGL header to llglshaderheaders.h namely <OpenGL/OpenGLAvailability.h>

2. Enabling all extensions the viewer logged as not available except GL_ARB_occlusion_query2 which we can’t get to

3. Not include llerror.h in llwindow

4. Eliminate all autoreleasepool statements from the code (which you have to do to compile the viewer with Xcode 8 anyway)

5. Advice users with NVIDIA cards and 512 Mb or less graphics memory to lower the texture memory setting in graphics preferences to 384 Mb. (this extends the delay before crash some in many scenes.)

6. Fixed the gamme used by the system from 1.8 to 2.2 which has been the system default since macOS 10.6

7. Cleaned up font loading and use the Menlo system font as fixed width font. 

8. Deployment target of 10.9 and now 10.10. - Which reminds me that some of the libraries for the 64.bit viewer builds have a 10.11 deployment target while the viewer has 10.9. This is NOT good!


The viewer still crash in the occlusion code, but not as often as without these changes. 


More information about the opensource-dev mailing list