Unity crash when accessing camera (MacOS 10.15.3, Unity 2019.2.17f1)

Hi all, I’m in a rut with this crash.

Unity will crash 100% of the time when using a Vuforia AR Camera. In the AR project I’m developing professionally, this happens after starting things up and I move to the AR section of the app. In an empty project, this happens immediately when it is run. If (in the empty project) I don’t add an AR Camera component to the scene, it will not crash and Vuforia will log to the console that it has successfully initialised. There are no Warnings in the console, and when the Editor does crash, there is no error message and the Unity Bug Reporter does not appear. I have attached the Editor log for the empty project, it’s worth noting that the second-last entry before the crash is the Start Vuforia Engine Debug.Log() entry. I have also attached the MacOS Crash Log in which the crashed thread displays a CRASHING_DUE_TO_PRIVACY_VIOLATION log before aborting. I think this might be related to Camera access, but I’m not sure how to address it. There is no Unity entry in the privacy options, so I can’t explicitly ‘give’ Unity camera permission (though previously I have never needed to)

This problem only began after I got my laptop replaced and needed to reinstall the entire project and its dependencies. Never had an issue like this before.

About my Computer:

  • MacBook Pro 15,1 (Released 2018, 6-Core i7 and AMD Radeon Pro 560X)
  • Webcam: FaceTime HD Camera (Built-in) ← The camera definitely does work outside of Unity
  • OS: macOS Catalina (10.15.3)

About my Unity Install:

  • Version: 2019.2.17f1
  • Vuforia Version: 8.5.9 (but this issue is consistent on 8.5.7 and 8.5.10)

Things I have tried:

  • Reinstalling Unity
  • Reinstalling Vuforia (and different versions)
  • Reimporting the project
  • Trying different configurations of the Graphics API Options in Player Settings
  • Confirming my webcam is in the Vuforia webcam configuration file and is configured correctly
  • Attaching an external webcam to my computer (no difference in behaviour)
  • Confirming the Camera Usage Description in Unity’s Player Settings is set to a value

I have made a similar post to this one in the Vuforia developer forums that has yet to be approved. Since this seems to be a camera permission issue, I suspect it is more appropriate to post here.

If there’s any more information you need, please let me know. I’m not sure if Vuforia has more details logs stowed away somewhere other than Unity’s logs. Any information you can offer would be super helpful!

5592625–578056–MacOS Crash Report.txt (188 KB)
5592625–578059–Unity & Vuforia Crash Log.txt (69.7 KB)

I have exactly same problem (with Unity 2019.2.18) while using WebCamTexture directly. I call
Application.RequestUserAuthorization and then Application.HasUserAuthorization which both returns success but the macOS won’t prompt me for permissions which it should. And as soon as I allocate WebCamTexture it crashes because of CRASHING_DUE_TO_PRIVACY_VIOLATION.

Wierd thing is, that I have 2 macbooks (one in the office and one home), it works fine on my office macbook but it crashes on my home macbook. I’m not sure what version of macos I have in the office but I have Mojave 10.14.5 at home (I have Mojave in the office as well, I’m just not sure which version).

I didn’t find any solution so far

It seems that there is a workaround here Unity Issue Tracker - [OSX] Unity fails to ask camera permission and crashes on privacy violation I’m just not very happy about deleting and reinstalling the hub.

Thank you for letting me know about the workaround, that worked! I can now do work with Vuforia.

It’s quite troubling how this bug is so inconsistent between computers, I’m hoping a genuine fix is in the works (looks like the 2019.3.0f5 fix did not full address the issue) so this doesn’t happen again, especially if unity wants all installs to go through Unity Hub now.