Search Issue Tracker
Fixed
Votes
2
Found in
2020.3.38f1
2021.3.9f1
2022.1.14f1
2022.2.0a6
2023.1.0a8
Issue ID
UUM-12874
Regression
Yes
Buffer.BlockCopy causes error when using IL2CPP
How to reproduce it:
1. Open the attached project "SbyteConversionError.zip"
2. Build and Run with IL2CPP enabled
3. When the Scene opens observe the text
Expected result: "Conversion to sbyte succeeded" is printed in the Scene
Actual result: Errors are printed in the Scene: System.ArgumentException
Reproducible with: 2020.3.38f1, 2021.3.9f1, 2022.1.14f1, 2022.2.0a6, 2023.1.0a5, 2023.1.0a8
Not reproducible with: 2021.3.8f1, 2023.1.0a4
Reproduced on these devices:
VLNQA00001, Google Pixel 2 (Pixel 2), Android 11, CPU: Snapdragon 835 MSM8998, GPU: Adreno (TM) 540
VLNQA00225, Qualcomm null (SDM845 for arm64), Android 8.1.0, CPU: Snapdragon 845 SDM845, GPU: Adreno (TM) 630
VLNQA00288, Samsung Galaxy J7 (SM-J730F), Android 8.1.0, CPU: Exynos 7 Octa 7870, GPU: Mali-T830
VLNQA00316, Samsung Galaxy Note10 (SM-N970F), Android 9, CPU: Exynos 9 Series 9825, GPU: Mali-G76
VLNQA00304 - iPhone 11 (MWLD2LL/A), CPU: A13 Bionic, GPU: Apple designed, OS: 13.5
macOS 12.2 (Intel)
Note: reproducible on Android, iPhone, Standalone builds with IL2CPP (not reproducible with Mono)
Stacktrace error:
System.ArgumentException
Object must be an array of primitives.
at System.Buffer.ByteLength (System.Array array) [0x00000] in <00000000000000000000000000000000>:0
at System.Buffer.BlockCopy (System.Array src, System.Int32 srcOffset, System.Array dst, System.Int32 dstOffset, System.Int32 count) [0x00000] in <00000000000000000000000000000000>:0
at Test.Start () [0x00000] in <00000000000000000000000000000000>:0
UnityEngine.Logger:Log(LogType, Object)
Test:Start()
ArgumentException: Object must be an array of primitives.
at System.Buffer.ByteLength (System.Array array) [0x00000] in <00000000000000000000000000000000>:0
at System.Buffer.BlockCopy (System.Array src, System.Int32 srcOffset, System.Array dst, System.Int32 dstOffset, System.Int32 count) [0x00000] in <00000000000000000000000000000000>:0
at Test.Start () [0x00000] in <00000000000000000000000000000000>:0
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
- Incorrect color values are saved for Swatches when using HDR Color Picker
- Editor crashes when adding/removing a UI Document Style Sheet while in Play mode
- Scene and Game views turn black when all light sources are disabled
- Memory spike after activating Freeform Light2Ds
- Line Renderer Component elements do not fit in the Inspector window when minimising Inspector window is minimised
Resolution Note:
Fixed by https://issuetracker.unity3d.com/product/unity/issues/guid/UUM-12875