Search Issue Tracker
Won't Fix
Votes
0
Found in
2017.4.6f1
Issue ID
1070158
Regression
No
Unity Editor crashes when passing half of the Emoji to native C++ code
To reproduce:
1. Download attached project "utf16_surrogate.zip" and open in Unity
2. Open "surrogate" scene
3. Enter Play mode
Expected Result: Unity Editor successfully enters into the Play mode
Actual Result: Unity Editor crashes
Notes:
- This issue appears both on Windows and OSX
- It seems that this issue does not occur on Standalone
- When Unity Editor crashes there is no Stack Trace printed
Reproduced on Unity 2017.1.5f1, 2017.2.3p3, 2017.3.2f1, 2017.4.9f1, 2018.1.9f1, 2018.2.3f1 and 2018.3.0a9
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:
IL2CPP marshals managed strings from Utf16 to Utf8 when calling native functions that take char*. Splitting up a surrogate pair creates an invalid sequence that will crash our underlying string conversion code. Testing each character for validity when marshaling in order to fail more gracefully and provide a better error message would slow down marshaling unacceptably for all string marshaling cases, so we have elected to not fix this issue since it is not a common problem.