Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice

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

Discussion in 'Editor & General Support' started by Jacob-Duniam, Mar 16, 2020.

  1. Jacob-Duniam

    Jacob-Duniam

    Joined:
    Apr 4, 2016
    Posts:
    5
    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!
     

    Attached Files:

  2. Wolar

    Wolar

    Joined:
    Sep 25, 2014
    Posts:
    38
    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
     
  3. Wolar

    Wolar

    Joined:
    Sep 25, 2014
    Posts:
    38
  4. Jacob-Duniam

    Jacob-Duniam

    Joined:
    Apr 4, 2016
    Posts:
    5
    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.