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
- Out-of-bounds memory access with multiple CanvasRenderers under a Canvas when using Mesh API
- Inspector tries to access file after it was deleted when the file was locked in Inspector window
- Changing Transform values in Search window Inspector loses focus while dragging and stopping mouse without releasing dragging action
- Saving changes on the dirty VFX Graph during the Play mode throws "The referenced script (Unknown) on this Behaviour is missing!" warnings
- VFX Graph Debug Info overlaps the "Initialize" block debug info by default
Add comment