Search Issue Tracker
Won't Fix
Votes
1
Found in
2021.3.27f1
Issue ID
UUM-40848
Regression
No
[Burst] [Collections] NullReferenceExceptions thrown when using NativeText.Dispose(JobHandle)
Reproduction steps:
1. Open the “NativeTextDispose“ project
2. Open the “SampleScene“ scene
3. Enter Play Mode
4. Observe the Console
Expected result: No errors
Actual result: 2 NullReferenceExceptions
Reproduced in: 1.2.4 (2021.3.0f1, 2021.3.27f1, 2022.2.0a15)
Not reproduced in: 1.2.4 (2022.2.0a16, 2022.3.4f1, 2023.1.1f1, 2023.2.0a21)
Reproduced using: Linux (by the reporter), macOS 13.4 (Intel)
First few lines of error #1:
System.NullReferenceException: Object reference not set to an instance of an object
This Exception was thrown from a job compiled with Burst, which has limited exception support.
#3 Unity.Collections.LowLevel.Unsafe.UnsafeText.set_Length(Unity.Collections.LowLevel.Unsafe.UnsafeText* this, int value) -> void_fa987e683e737f22e74ebd39ccd6c6ad
First few lines of error #2:
NullReferenceException: Object reference not set to an instance of an object
Unity.Collections.Unicode.Utf8ToUcs (Unity.Collections.Unicode+Rune& rune, System.Byte* buffer, System.Int32& index, System.Int32 capacity) (at Library/PackageCache/com.unity.collections@1.2.4/Unity.Collections/Unicode.cs:221)
Notes:
1. Not reproduced with NativeArray and NativeList
2. Could not test in Player (application not responding)
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
- “Remove Unused Overrides” available on not loaded Scene and throws “ArgumentException: The scene is not loaded” warning
- Adaptive Probe Volume occlusion edge is calculated incorrectly when viewing probes near geometry edges
- Sampling a texture using an HLSL file throws shader errors and the code does not compile
- "Graphics.CopyTexture called with null source texture" error when Base Camera of an Overlay Camera is removed with DX11 Graphics API and Compatibility Mode enabled
- WebGL sends wrong value with large numbers when SendMessage function is used
Resolution Note:
It doesn't occur in LTS Release 2022.3.17f1.
Repro also shows incorrect usage:
Internal: JobTempAlloc has allocations that are more than the maximum lifespan of 4 frames old - this is not allowed and likely a leak