Search Issue Tracker
Fixed in 2021.3.39f1
Fixed in 2021.3.X, 2022.3.X, 6000.0.X, future release
Votes
78
Found in
2021.3.32f1
2022.3.13f1
2023.1.19f1
2023.2.0b17
2023.3.0a13
6000.0.0b11
6000.1.0a7
6000.2.0a1
Issue ID
UUM-55488
Regression
No
[iOS] App crashes with out of memory exception in UnityGfxDeviceWorker when starting the app
How to reproduce:
1. Build And Run the user’s attached “Flow.zip” project on iOS device
2. Observe the result
(Delete the "Library" folder in case of build errors)
Expected result: App crashes
Actual result: App doesn’t crash
Reproducible with: 2021.3.32f1, 2022.3.313f1, 2023.1.19f1, 2023.2.0b17, 2023.3.0a13
Reproduced on:
VLNQA00494 - iPhone 14 Pro Max, 16.3.1 iOS
VLNQA00358 - iPhone 12, 14.1 iOS
iPad Mini (6th generation) (user’s info)
iPad Pro (12.9-inch) (5th generation) (user’s info)
iPad Pro (11-inch) (4th generation) (user’s info)
iPad Pro (11-inch) (2nd generation) (user’s info)
Not reproducible on:
VLNQA00392 - iPad (9th generation), 15.0 iOS
VLNQA00310 - iPad Pro 12.9", 13.4.1 iOS
iPhone X (user’s info)
iPhone 13 mini (user’s info)
VLNQA00178, Xiaomi Redmi Note 4 (Redmi Note 4), Android 6.0, CPU: MediaTek Helio X20 MT6797M, GPU: Mali-T880
VLNQA00489, Htc 10 (HTC 10), Android 6.0.1, CPU: Snapdragon 820 MSM8996, GPU: Adreno (TM) 530
VLNQA00120, Google Pixel 2 (Pixel 2), Android 8.1.0, CPU: Snapdragon 835 MSM8998, GPU: Adreno (TM) 540
VLNQA00267, Samsung Galaxy S10+ (SM-G975F), Android 12, CPU: Exynos 9 (9820), GPU: Mali-G76
Note: not reproducible with a newly created project
Error message shown in log:
allocation 0x0x0 already registered @ Runtime/GfxDevice/metal/MetalScratchBuffer.mm:387 size 0; now calling from Runtime/GfxDevice/metal/MetalScratchBuffer.mm:387 size 0?
allocation 0x0x0 already registered @ Runtime/GfxDevice/metal/MetalScratchBuffer.mm:387 size 0; now calling from Runtime/GfxDevice/metal/MetalScratchBuffer.mm:387 size 0?
2023-11-22 11:15:56.964468+0200 Flow[530:20874] IOGPUMetalCommandBufferStorageAllocResourceAtIndex: failed to allocate pooled resource at dbClass: 8
Comments (7)
-
yangkairong
Dec 11, 2025 15:11
Summary
I have reproduced a reliable crash on Unity 6.x (tested 6000.2.15) on iOS devices (including iPhone 12) where the UnityGfxDeviceWorker thread crashes in Metal, and the issue is not limited to the original repro steps of this issue. Specifically, the crash can be triggered in real projects by the following two conditions:
1) A very long TextMeshProUGUI string is assigned at runtime
• Assigning an excessively long text (> several thousands+ characters) to a TextMeshProUGUI component causes frequent UnityGfxDeviceWorker EXC_RESOURCE / memory-related crashes on iOS devices when the text mesh is rebuilt.
• This occurs even without any native plugin or third-party code.
• The crash correlates with large TMP mesh buffer allocations and Metal resource allocation failures on the rendering thread.2) Using DestroyImmediate() on UI / TMP / GameObjects during runtime
• DestroyImmediate calls on UI objects / TMP components cause rendering thread access violations leading to crashes on UnityGfxDeviceWorker.
• Using Destroy() (standard Unity object destruction) does not trigger this crash.
• The crash appears related to the immediate destruction of objects that may still be queued or referenced by the UI rendering / TMP mesh rebuild system. -
rumorgames
Feb 25, 2024 18:56
I started a forum thread with additional information and context here:
https://forum.unity.com/threads/memory-leak-and-crash-in-unitygfxdeviceworker.1542857/
This issue has been ruining the experience for iPad players of our game for far too long with no solution in sight. Any updates on a timeline for resolution, or assistance on how to work around, would be most appreciated.
-
rumorgames
Feb 07, 2024 07:57
@ACIDARROW lol sure sure. Then the bug is all the other devices that work fine!
Unity, please find a way to repro the "works fine on my machine" bug on the crashing devices listed above. It's the only way to get to the bottom of this!
-
AcidArrow
Feb 06, 2024 13:40
Maybe crashing is by design.
-
rumorgames
Jan 17, 2024 18:00
It doesn't inspire much confidence when your QA team can't be bothered to fix the description of the bug (it still says "Expected result: App crashes") let alone fix the bug itself.
This is still broken as of Unity 2021.3.34f1.
-
jblaese
Dec 29, 2023 10:38
same here. any solutions?
-
rumorgames
Nov 15, 2023 13:38
Currently the expected and actual result are backwards. The expected result should be for the app *not* to crash. Eg:
Expected result: App doesn't crash
Actual result: App crashes
Add comment
All about bugs
View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.
Latest issues
- Font character thickness does not adjust properly in UI Toolkit text when changing Bold Weight in Font Asset
- Multiple "[...] is inaccessible due to its protection level" errors are thrown when opening project with Unity Version Control installed
- Font character thickness does not adjust properly in UI Toolkit text when changing Bold Weight in Font Asset
- Sorting icons are tiny and misaligned in Import Activity window
- The Undo system does not record HideFlags.HideInHierarchy changes
Resolution Note (fix version 6000.0):
Verified with 6000.0.0b16 (GPU timeout crashes on iOS no longer look like Out of Memory crashes.)