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
- “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
Add comment