Switching from GLFW to GLUT?

So I’m trying to run a relatively simple app that seems to crash upon starting under certain circumstances. Basically, it opens / runs fine on a normal one-monitor setup, or when there’s an external monitor (a touchscreen) plugged in and the monitors AREN’T mirrored, but when the monitors are mirrored, or when the touchscreen is the only monitor, I get the following error:

[ error ] ofAppGLFWWindow: 65544: Cocoa: Failed to find NSScreen for CGDisplay 
booth-playerDebug(2035,0xa0a8d1a8) malloc: *** error for object 0xd50470: pointer being freed was not allocated
*** set a breakpoint in malloc_error_break to debug

I believe it’s related to this problem / bug: https://github.com/openframeworks/openFrameworks/issues/2643

As a workaround, I’ve seen it suggested that I switch from GLFW back to GLUT and use that to create my GL environment. Only problem is I have no idea how to do this. Can anyone help me out or provide an alternate solution?

The GLFW window should no longer crash when without an attached display (I take it your touchscreen connects via USB rather than DP/HDMI/Thunderbolt yeah?) What version of OF are you running?

https://github.com/openframeworks/openFrameworks/issues/2539