Search Issue Tracker
By Design
Votes
0
Found in
2017.3.0f3
Issue ID
1015027
Regression
No
Editor crashes on (mono-2.0-bdwgc) MoveSmall when entering playmode
How to reproduce:
1. Open the attached "SmallerRepro" project and "SampleScene"
2. Enter playmode
Result - Crash occurs on:
========== OUTPUTTING STACK TRACE ==================
0x00007FFB975E1D3D (mono-2.0-bdwgc) [f:\dd\vctools\crt\vcruntime\src\string\amd64\memcpy.asm:418] MoveSmall
0x00007FFB9735BD91 (mono-2.0-bdwgc) [c:\buildslave\mono\build\mono\metadata\marshal.c:11006] ves_icall_System_Runtime_InteropServices_Marshal_copy_to_unmanaged
0x0000000019E3EF84 (Mono JIT Code) (wrapper managed-to-native) System.Runtime.InteropServices.Marshal:copy_to_unmanaged (System.Array,int,intptr,int)
0x0000000019E3EE3B (Mono JIT Code) System.Runtime.InteropServices.Marshal:Copy (byte[],int,intptr,int)
0x0000000019E35B83 (Mono JIT Code) [C:\Users\TomasM\Desktop\SmallerRepro\Assets\Scripts\ObjectToJSON.cs:221] ObjectToJSON:getBase64 (UnityEngine.Sprite,int)
0x0000000019E34EAB (Mono JIT Code) [C:\Users\TomasM\Desktop\SmallerRepro\Assets\Scripts\ObjectToJSON.cs:169] ObjectToJSON:printBase64 (System.Collections.Generic.List`1<playerComponent>)
0x0000000019E29333 (Mono JIT Code) [C:\Users\TomasM\Desktop\SmallerRepro\Assets\Scripts\ObjectToJSON.cs:39] ObjectToJSON:Start ()
...
Reproducible with - 2018.2.0a5, 2018.1.0b11, 2017.3.2f1, 2017.3.0a1
By design --> string getBase64(Sprite sprite, int index) is writing into random memory. The `Marshal.Copy` call is writing to the BitMapData memory that is smaller than the bytes array that was retrieved
All about bugs
View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.
Latest issues
- Too little validation messages in the "WebAssembly Language Features" Memory settings
- Project Settings Search Highlights are misaligned when using the Bitmap Text Rendering Mode
- "GetControlID at event ValidateCommand returns a controlID different from the one in Layout event" Warning is thrown when undoing the deletion of Sprite Shape Profile
- Memory related fields in the "WebAssembly Language Features" can be set to the negative numbers
- "WebAssembly Language Features" Header in the Player Settings has a smaller indentation
Add comment