Search Issue Tracker
Fixed in 2018.3.X
Fixed in 2018.1.X
Votes
0
Found in
2017.3.1p4
Issue ID
1022755
Regression
No
[IL2CPP] Null Pointer dereference crashes when deserializing Dictionary of Generic Struct type
When using a BinaryFormatter to deserialize a Dictionary that contains a generic struct type whose type parameter is a class, in an IL2CPP build, there is a null pointer dereference crash
To reproduce:
1. Download attached project "SerializationTesting.zip" and open in Unity
2. Open "Main" scene
3. Enter Play mode
4. Press all three buttons and notice that they show results in the TextBox and Editor.log when clicked
5. Exit Play mode
6. Run logcat
7. Build and Run the project on a Device
8. Press all three Buttons and notice that the first two Buttons (int test and list test) should show results in the TextBox as expected, but the third Button (class test) crashes the Player
Notes:
- Logcats are shared in the comments section
- Everything works as expected when using a List instead of a Dictionary.
- Everything works as expected when using an int as the Generic Struct type parameter instead of a Custom Class.
- In Unity 2018.1 and 2018.2, after you press the third Button, the application freezes, but does not crash
- Freeze issue started reproducing in Unity 2018.1.0b12
- In iOS is the same issue as Unity 2018.1 and 2018.2 - the application freezes, but does not crash
- In Windows and OSX standalone everything works fine
- For some reason, the user said that to build on non-development build
Devices:
- Google Pixel 2, OS: 8.1.0, CPU: arm64-v8a, GPU: Adreno (TM) 540
- iPhone 7, iOS: 11.2.6, CPU: A10
Reproduced on Unity 5.6.5p3, 2017.1.3p3, 2017.2.2p3, 2017.3.2f1, 2017.4.1f1, 2018.1.0f1 and 2018.2.0a8
All about bugs
View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.
Latest issues
- “[Worker0] Could not generate preview image“ error when opening macOS native plugin in the Inspector with Architecture to build for set to ARM 64-bit
- [iOS] Application.absoluteURL is empty on Awake/Start when opening via deep link with Splash Screen disabled
- Crash on MemoryManager::Deallocate when rapidly calling Addressables.LoadAssetAsync
- Crash on physx::shdfnd::atomicIncrement when adjusting values on a character controller component after entering Play mode in Prefab edit mode
- [Rendering Debugger] [NewInputSystem] Debug Overlays in Play mode throws InvalidOperationException when using New Input System
Add comment