Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
Unavailable camera device will produce app crash on macOS Mojave #6193
After launching an app several times, the built-in camera gets blocked and refuses to update the textures. After several trials more it started to refuse being added as input in
*** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '*** Can't add a nil AVCaptureInput'
At first I thought it's caused by a wrong camera release since I did not call
In this commit I added a couple of console outputs and it avoids to add non-available devices. At least the app does not crash anymore. No textures coming though.
Wow very weird stuff.
The commit may be a bit useful anyway.
This is an interesting one. I think the issue is that all OF apps use cc.openframeworks.ofapp as the bundle id.
This is what the privacy system in Mojave is using to ID the app ( apparently ).
A fairly easy fix would be to give each OF app a unique bundle id based on the executable name.
I just did a test and this seemed to fix it:
Will PR a fix.