Search Issue Tracker

Fixed in 2019.3.X

Fixed in 2018.4.X, 2019.2.X

Votes

0

Found in

2018.3.0a4

2018.3.14f1

2018.4.0f1

2019.1.0a1

2019.2.0a1

2019.3.0a1

Issue ID

1160639

Regression

Yes

[iOS] App crashes and throws an NSInvalidArgumentException when accessing WebCamTexture.devices and permission has been denied

iOS

-

To reproduce:

1. Download attached "WebCamDevices.zip" project and open in Unity
2. Open "WebCamDevicesCrash" scene
3. Build for iOS
4. Deploy the Xcode project to the iOS device
5. When the Camera permission request popups up Deny permission
6. Restart the App

Expected results: After App launches again, no Exception or Crash occurs
Actual results: After App launches again, it throws Exception and crashes after Splash Screen

Notes:
- This issue occurs only on iOS
- On Android (Mono and IL2CPP) everything works as Expected

Tested with:
- iPhone 7, iOS: 10.2 - Reproduced
- iPhone 8 Plus, iOS: 12.0 - Reproduced
- iPhone XR, iOS: 12.0 - Reproduced
- VLNQA00006, Samsung Galaxy S7 (SM-G930F), Android 8.0.0, CPU: Exynos 8 Octa 8890, GPU: Mali-T880 - Not Reproduced
- VLNQA00257, Sony Xperia XZ Premium (G8141), Android 9, CPU: Snapdragon 835 MSM8998, GPU: Adreno (TM) 540 - Not Reproduced

Reproduced on Unity 2018.3.0a4, 2018.3.14f1, 2018.4.2f1, 2019.1.7f1, 2019.2.0b6 and 2019.3.0a6
Not Reproduced on Unity 2018.2.21f1 and 2018.3.0a3
Regression on Unity 2018.3.0a4

Comments (9)

  1. Fillmore

    Jan 22, 2020 17:57

    2018.4.15f1 notes this bug.
    iOS: Fixed AVCaptureSession initialized if permission to camera has been explicitly denied by the user.

    I have not tested yet, but that should fix your issue if you come across this.

  2. mradel

    Jan 10, 2020 19:51

    Still occurring in t 2018.4.14f1 LTS for us too

  3. Fillmore

    Jan 03, 2020 17:11

    Issue still happens in your latest 2018.4.14f1 LTS

  4. Fillmore

    Nov 21, 2019 16:36

    Unity 2019.2.13f1 is your latest, non-beta release. Can you please ensure it's working on both iOS and the mac editor (2018 and 2019)?

  5. Fillmore

    Nov 20, 2019 21:03

    Still happens on 2018.4.12f1
    Major issue for us!

    We also found on the Mac editor, if you deny the permission field, and follow the same steps (close/new boot up), it freezes to the point the editor can't even be force closed. A restart is REQUIRED.

    When fixing in 2018 can you please also fix it so the editor while testing will not crash. Thanks!

  6. dseabolt_il

    Nov 12, 2019 22:19

    We're seeing this issue as well in 2018.4.10f1. Is Unity looking into this issue still?

  7. Percy-Pea

    Sep 27, 2019 15:55

    Can confirm also not fixed in Unity 2019.2.6

  8. Percy-Pea

    Sep 27, 2019 15:12

    This still happens in Unity 2019.2.2f1

    Can confirm it is fixed in 2019.3.0b4.

    Haven't tried other versions currently.

    As aside note, Unity 2018.2.6 doesn't even need to request permission for Webcamtexture.devices for iOS. Can't seem to find info on why this was changed?

Add comment

Log in to post comment

All about bugs

View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.