Crash on startup (_glfwPlatformGetVideoMode)

Hi everybody,

I’m trying to trouble shoot a crash on a stranger’s computer and all I have to go on is a description and a crash log.

The program I am dealing with is 60HZDAYDREAM, located here:

http://racarate.itch.io

So their description is that the program crashes on startup UNLESS the OSX title bar is clicked, in which the program crashes as soon as input is received. That, to me, is completely bonkers. Here is a screenshot of the title bar:

My first thought was that I was using the ofProgrammableRenderer, but I think the specs of their computer (mid-2012 MBP at 2880x1800) should support that. I also had them run all of my other programs on itch.io, including some before I started using the programmable renderer, and they all exhibited the same behavior.

I searched around for crashes involving glfwPlatformGetVideoMode and found a few resolution-related crahes but I really can’t tell if the code they are discussing is in openFrameworks or not:


The only other thing I can think of is that I am requesting a “bad” resolution for their system. I haven’t really figured out my favorite resolution yet, so I’ve been trying a few different modes… but again all three of these crash on the stranger’s system. The code for 60HZDAYDREAM is the one requesting OF_GAME_MODE at 800x600:






And lastly, here is the crash log. Does anybody have any ideas? This is driving me bonkers.

Process: daydream [453]
Path: /Users/USER/Desktop/*/daydream.app/Contents/MacOS/daydream
Identifier: cc.openFrameworks.ofapp
Version: 1.0
Code Type: X86 (Native)
Parent Process: launchd [159]
Responsible: daydream [453]
User ID: 501

Date/Time: 2015-07-03 09:40:47.450 -0600
OS Version: Mac OS X 10.9.5 (13F1077)
Report Version: 11
Anonymous UUID: 1A8431B3-A1D8-EB2A-F569-35FE1E0150E1

Crashed Thread: 0 Dispatch queue: com.apple.main-thread

Exception Type: EXC_BAD_ACCESS (SIGBUS)
Exception Codes: KERN_PROTECTION_FAILURE at 0x000000000000004c

VM Regions Near 0x4c:
–> __PAGEZERO 0000000000000000-0000000000001000 [ 4K] —/--- SM=NUL /Users/USER/Desktop//daydream.app/Contents/MacOS/daydream
__TEXT 0000000000001000-0000000000611000 [ 6208K] r-x/rwx SM=COW /Users/USER/Desktop/
/daydream.app/Contents/MacOS/daydream

Thread 0 Crashed:: Dispatch queue: com.apple.main-thread
0 cc.openFrameworks.ofapp 0x002e3239 _glfwPlatformGetVideoMode + 25
1 cc.openFrameworks.ofapp 0x002e131f glfwGetVideoMode + 111
2 cc.openFrameworks.ofapp 0x0047fb90 ofAppGLFWWindow::getWindowSize() + 48
3 cc.openFrameworks.ofapp 0x00481c96 ofMatrixStack::viewport(float, float, float, float, bool) + 214
4 cc.openFrameworks.ofapp 0x0048634c ofGLProgrammableRenderer::viewport(float, float, float, float, bool) + 76
5 cc.openFrameworks.ofapp 0x0045799e ofViewport(float, float, float, float, bool) + 78
6 cc.openFrameworks.ofapp 0x0047f97f ofAppGLFWWindow::display() + 95
7 cc.openFrameworks.ofapp 0x0047f8ed ofAppGLFWWindow::runAppViaInfiniteLoop(ofBaseApp*) + 77
8 cc.openFrameworks.ofapp 0x0041b84c ofRunApp(ofBaseApp*) + 1260
9 cc.openFrameworks.ofapp 0x00002496 main + 150
10 cc.openFrameworks.ofapp 0x000023f5 start + 53

Thread 1:
0 libsystem_kernel.dylib 0x91f3c046 __workq_kernreturn + 10
1 libsystem_pthread.dylib 0x96500dcf _pthread_wqthread + 372
2 libsystem_pthread.dylib 0x96504cce start_wqthread + 30

Thread 2:: Dispatch queue: com.apple.libdispatch-manager
0 libsystem_kernel.dylib 0x91f3c992 kevent64 + 10
1 libdispatch.dylib 0x9aa58899 _dispatch_mgr_invoke + 238
2 libdispatch.dylib 0x9aa58532 _dispatch_mgr_thread + 52

Thread 3:
0 libsystem_kernel.dylib 0x91f3c046 __workq_kernreturn + 10
1 libsystem_pthread.dylib 0x96500dcf _pthread_wqthread + 372
2 libsystem_pthread.dylib 0x96504cce start_wqthread + 30

Thread 4:
0 libsystem_kernel.dylib 0x91f3c046 __workq_kernreturn + 10
1 libsystem_pthread.dylib 0x96500dcf _pthread_wqthread + 372
2 libsystem_pthread.dylib 0x96504cce start_wqthread + 30

Thread 5:: com.apple.audio.IOThread.client
0 libsystem_kernel.dylib 0x91f36f7a mach_msg_trap + 10
1 libsystem_kernel.dylib 0x91f3616c mach_msg + 68
2 com.apple.audio.CoreAudio 0x97563d5a HALB_MachPort::SendMessageWithReply(unsigned int, unsigned int, unsigned long, unsigned long, mach_msg_header_t*, bool, unsigned int) + 138
3 com.apple.audio.CoreAudio 0x9755e20e HALB_MachPort::SendSimpleMessageWithSimpleReply(unsigned int, unsigned int, int, int&, bool, unsigned int) + 68
4 com.apple.audio.CoreAudio 0x9755c9e7 HALC_ProxyIOContext::IOWorkLoop() + 1111
5 com.apple.audio.CoreAudio 0x9755c4bf HALC_ProxyIOContext::IOThreadEntry(void*) + 167
6 com.apple.audio.CoreAudio 0x97566e12 ___ZN19HALC_ProxyIOContextC2Emj_block_invoke + 20
7 com.apple.audio.CoreAudio 0x9755c3bb HALB_IOThread::Entry(void*) + 69
8 libsystem_pthread.dylib 0x964ff5fb _pthread_body + 144
9 libsystem_pthread.dylib 0x964ff485 _pthread_start + 130
10 libsystem_pthread.dylib 0x96504cf2 thread_start + 34

Thread 6:
0 libsystem_kernel.dylib 0x91f370a6 mach_wait_until + 10
1 com.apple.CoreServices.CarbonCore 0x90958de8 MPDelayUntil + 26
2 libfmodex.dylib 0x0085c6db 0x859000 + 14043
3 libfmodex.dylib 0x008d58af FMOD::SystemI::createFile(FMOD::File**) + 33019
4 libfmodex.dylib 0x008d525f FMOD::SystemI::createFile(FMOD::File**) + 31403
5 com.apple.CoreServices.CarbonCore 0x909582ce PrivateMPEntryPoint + 68
6 libsystem_pthread.dylib 0x964ff5fb _pthread_body + 144
7 libsystem_pthread.dylib 0x964ff485 _pthread_start + 130
8 libsystem_pthread.dylib 0x96504cf2 thread_start + 34

Thread 0 crashed with X86 Thread State (32-bit):
eax: 0x00000000 ebx: 0xffffff01 ecx: 0x00000000 edx: 0xbffffad4
edi: 0x00c6cc70 esi: 0xbffffb70 ebp: 0xbffffae8 esp: 0xbffffaa0
ss: 0x00000023 efl: 0x00010286 eip: 0x002e3239 cs: 0x0000001b
ds: 0x00000023 es: 0x00000023 fs: 0x00000000 gs: 0x0000000f
cr2: 0x0000004c

Logical CPU: 4
Error Code: 0x00000004
Trap Number: 14

Binary Images:
0x1000 - 0x610fd3 +cc.openFrameworks.ofapp (1.0) /Users/USER/Desktop//daydream.app/Contents/MacOS/daydream
0x859000 - 0x913fcb +libfmodex.dylib (1) /Users/USER/Desktop/
/daydream.app/Contents/MacOS/libfmodex.dylib

<… this section (binary images) truncated to fit into openFrameworks forum limits of 32000 chars… >

External Modification Summary:
Calls made by other processes targeting this process:
task_for_pid: 1
thread_create: 0
thread_set_state: 0
Calls made by this process:
task_for_pid: 0
thread_create: 0
thread_set_state: 0
Calls made by all processes on this machine:
task_for_pid: 552
thread_create: 2
thread_set_state: 0

VM Region Summary:
ReadOnly portion of Libraries: Total=195.9M resident=86.7M(44%) swapped_out_or_unallocated=109.3M(56%)
Writable regions: Total=538.9M written=132.9M(25%) resident=178.5M(33%) swapped_out=0K(0%) unallocated=360.4M(67%)

REGION TYPE VIRTUAL
=========== =======
CG backing stores 2044K
CG image 8K
CG shared images 180K
IOKit 36.1M
IOKit (reserved) 4K reserved VM address space (unallocated)
Kernel Alloc Once 4K
MALLOC 380.8M
MALLOC (admin) 48K
MALLOC_LARGE (reserved) 100.0M reserved VM address space (unallocated)
Memory Tag 242 12K
Memory Tag 249 156K
OpenGL GLSL 4352K
Stack 66.6M
VM_ALLOCATE 28.6M
VM_ALLOCATE (reserved) 148K reserved VM address space (unallocated)
__DATA 29.7M
__IMAGE 528K
__IMPORT 12K
__LINKEDIT 47.6M
__OBJC 2220K
__PAGEZERO 4K
__TEXT 148.4M
__UNICODE 544K
mapped file 117.4M
shared memory 4K
=========== =======
TOTAL 965.1M
TOTAL, minus reserved VM space 865.0M

System Profile:
Model: MacBookPro10,1, BootROM MBP101.00EE.B02, 4 processors, Intel Core i7, 2.3 GHz, 8 GB, SMC 2.3f36
Graphics: Intel HD Graphics 4000, Intel HD Graphics 4000, Built-In
Graphics: NVIDIA GeForce GT 650M, NVIDIA GeForce GT 650M, PCIe, 1024 MB
Memory Module: BANK 0/DIMM0, 4 GB, DDR3, 1600 MHz, 0x80AD, 0x484D54333531533642465238432D50422020
Memory Module: BANK 1/DIMM0, 4 GB, DDR3, 1600 MHz, 0x80AD, 0x484D54333531533642465238432D50422020
AirPort: spairport_wireless_card_type_airport_extreme (0x14E4, 0xEF), Broadcom BCM43xx 1.0 (5.106.98.100.22)
Bluetooth: Version 4.2.7f4 15112, 3 services, 15 devices, 1 incoming serial ports
Network Service: AirPort, AirPort, en0
Serial ATA Device: APPLE SSD SM256E, 251 GB
USB Device: Hub
USB Device: FaceTime HD Camera (Built-in)
USB Device: Hub
USB Device: Hub
USB Device: Apple Internal Keyboard / Trackpad
USB Device: BRCM20702 Hub
USB Device: Bluetooth USB Host Controller
Thunderbolt Bus: MacBook Pro, Apple Inc., 23.4

you could try updating glfw to the latest version that you can find in the nightly builds

Alright, the nightly builds of glfw or nightly builds of openframeworks?

OF, we use a patched version of GLFW so you can’t use the official release.