The Author Online Book Forums are Moving

The Author Online Book Forums will soon redirect to Manning's liveBook and liveVideo. All book forum content will migrate to liveBook's discussion forum and all video forum content will migrate to liveVideo. Log in to liveBook or liveVideo with your Manning credentials to join the discussion!

Thank you for your engagement in the AoF over the years! We look forward to offering you a more enhanced forum experience.

334967 (1) [Avatar] Offline

Following is my dev environment:
Mac OSX Yosemite
XCode version 6.1.1
Oculus Rift DK2
I am mirroring my display to Rift

I am having problems running Example_2_3_Display, I get a malloc error on line 318 of sources/3rdParty/glfw/Source Files/cocoa_monitor.m (_glfwPlatformGetMonitors function):

for (j = 0;  j < [screens count];  j++)
    NSScreen* screen = [screens objectAtIndex:j];
    NSDictionary* dictionary = [screen deviceDescription];
    NSNumber* number = [dictionary objectForKey:@"NSScreenNumber"];

    if (monitors[i]->ns.displayID == [number unsignedIntegerValue])
        monitors[i]->ns.screen = screen;

if (monitors[i]->ns.screen == nil)
    _glfwDestroyMonitors(monitors, monitorCount);
                    "Cocoa: Failed to find NSScreen for CGDisplay %s",

    free(monitors); // <- throws error here
    return NULL;

Debug: [NetClient] Connected to a server running version 1.2.0 (my version=1.2.0)
Example_2_3_Display(66109,0x7fff7cd85300) malloc: *** error for object 0x608000000de0: pointer being freed was not allocated
*** set a breakpoint in malloc_error_break to debug