Multi-monitors causes blank display

Following the advice of other posts on this forum I am editing main.cpp to get multi-monitor fullscreen (oF 084):

#include "ofMain.h"
#include "ofApp.h"
#include "ofAppGLFWWindow.h"
int main( ){
    ofAppGLFWWindow window;
    window.setMultiDisplayFullscreen(true);
    ofSetupOpenGL(&window,1024,768,OF_FULLSCREEN);
    ofRunApp(new ofApp());
}

It works at first, but then intermittently (and non-deterministically) it will compile an app which renders no output. That is, it fills both screens but with gray, the default when you don’t render anything.

I have of course, disabled ‘Displays have separate spaces’ in Mission control preferences pane. This problem occurs on my MacBook Late 2011, but doesn’t occur on my MacBook Late 2013.
(which doesn’t help as I need both laptops)

I’m still having his problem, but I discover it only fails on my mac. Must be something with OS settings or setup?

First build&run it runs multi-monitor just fine, next time onwards it renders empty window.

I have uploaded the project to github:

But you can get a sense of the (simple) code in this gist.

Hope somebody has any suggestions…

I was never able to ‘fix’ this, but I got around it. I used Gene Kogan’s ofxSecondWindow

You can see my implementation here.