Search Issue Tracker

Won't Fix

Votes

0

Found in

2021.3.33f1

2022.3.15f1

6000.0.0b11

Issue ID

UUM-58351

Regression

No

[Mobile] Player silently crashes on a mobile device when using a lot of "Camera" GameObjects (40 and more) in the Scene

--

-

How to reproduce:
1. Open the "IN_62323" project
2. In the Build Settings "Run Device" dropdown select the desired device
3. Press Build And Run
4. Observe the Player

Expected result: Player doesn't crash
Actual result: Player crashes

Reproducible with: 2021.3.33f1, 2022.3.15f1, 2023.2.2f1, 2023.3.0a15

Testing environment: Windows 10 Pro
Not reproducible on: no other environment tested

Reproducible with these devices:
VLNQA00363, Samsung Galaxy Z Fold2 5G (SM-F916B), Android 11, CPU: Snapdragon 865 SM8250, GPU: Adreno (TM) 650 (only when using Vulcan Graphics API)
VLNQA00489, Htc 10 (HTC 10), Android 6.0.1, CPU: Snapdragon 820 MSM8996, GPU: Adreno (TM) 530
VLNQA00510, Lenovo Lenovo Tab M10 HD (2nd Gen) (Lenovo TB-X306F), Android 10, CPU: Mediatek MT8768, GPU: PowerVR Rogue GE8320
VLNQA00178, Xiaomi Redmi Note 4 (Redmi Note 4), Android 6.0, CPU: MediaTek Helio X20 MT6797M, GPU: Mali-T880
VLNQA00494 - iPhone 14 Pro Max, 16.3.1 iOS
VLNQA00358 - iPhone 12, 14.1 iOS
VLNQA00392 - iPad (9th generation), 15.0 iOS
VLNQA00310 - iPad Pro 12.9", 13.4.1 iOS

Not reproducible with these devices:
VLNQA00120, Google Pixel 2 (Pixel 2), Android 8.1.0, CPU: Snapdragon 835 MSM8998, GPU: Adreno (TM) 540
VLNQA00281, Samsung Galaxy S10e (SM-G970U), Android 9, CPU: Snapdragon 855 SM8150, GPU: Adreno (TM) 640
VLNQA00468, Huawei - (ELS-NX9), Android 10, CPU: HiSilicon Kirin 990 5G, GPU: Mali-G76
VLNQA00342, Samsung Galaxy Note20 Ultra 5G (SM-N986B), Android 10, CPU: Exynos 990, GPU: Mali-G77
VLNQA00591, Samsung Galaxy S23 (SM-S911B), Android 13, CPU: Snapdragon 8 Gen 2 (SM8550), GPU: Adreno (TM) 740
VLNQA00270, Samsung Galaxy S10e (SM-G970F), Android 12, CPU: Exynos 9 (9820), GPU: Mali-G76
VLNQA00267, Samsung Galaxy S10+ (SM-G975F), Android 12, CPU: Exynos 9 (9820), GPU: Mali-G76

Notes:
- Reproducible with both Mono and IL2CPP Scripting Backends
- Reproducible with both OpenGLES3 and Vulkan (except Galaxy Z Fold2 only crashes on Vulkan)
- There is no Stack Trace since it's a silent crash
- Not reproducible on Windows Standalone and WebGL Platforms
- Reducing the number of “Camera” GameObjects fixes the issue

  1. Resolution Note:

    The issue is not really about Cameras, but the fact that each camera contains a script ExtraCam.cs, which in OnEnable() creates a new RenderTexture with dimensions equal to those of the screen resolution. There are 128 of these cameras in the scene, so 128 large RenderTextures are created, each of which take up VRAM. When I tested on Windows, this meant that the process uses an extra 3GB of VRAM (2560x1440 resolution which is comparable if not smaller to the listed devices). On mobile devices with unified memory, there is no separate VRAM so it is eating up regular RAM. It seems that when you do this, the OS will eventually kill your process. This is also why there is no call stack because Unity did not crash.

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.