Search Issue Tracker

Fixed in 2022.1.X

Fixed in 2021.2.X



Found in




Issue ID




[Serialization] [IL2CPP] BinaryFormatter.Deserialize method fails to deserialize a nullable struct field with multiple fields



How to reproduce:
1. Open the attached Unity project ("")
2. Build And Run

Expected result: dummyFloatValue equals the original value (123.456f) after deserialization, "OK" logged in the Development Console
Actual result: dummyFloatValue equals zero, "DESERIALIZATION FAILED" logged in the Development Console.

Reproducible with: 2021.2.0a18, 2021.2.0b10, 2022.1.0a8
Not reproducible with: 2019.4.30f1, 2020.3.17f, 2021.1.19f1, 2021.2.0a17

Reproducible on:
Phone 8 Plus (iOS 14.4.2)
iPad 6th generation (iOS 14.4.2)
iPad Air 2 (iOS 11.0.3)

- Reproducible on Windows and macOS (with IL2CPP Scripting Backend), iOS

  1. Resolution Note (fix version 2022.1):

    Fixed in: 2022.1.0a12

  2. Resolution Note (fix version 2021.2):

    Fixed in: 2021.2.0b16

Comments (5)

  1. general_EchO

    Oct 18, 2021 20:53

    Not Fixed. It's even more BROKEN :(

  2. catto22198

    Oct 18, 2021 19:21

    Please fix this issue, provide a way to read legacy data or convert it to the modern format.

  3. gamefox87

    Oct 18, 2021 19:17

    This made the issue worse, not better. By not being able to read the older legacy format of the game save, it will crash the client if we update. Please revert or fix.

  4. Kunnogi

    Oct 18, 2021 18:41

    This made impossible to load serialized files from older engine versions meaning loss of data.

  5. Kunnogi

    Oct 14, 2021 07:53

    After this update on b16 when i try to deserialize a serializable class that contains a list with a primitive type and a sorteddictionary with key being a string and value being another serializable class it crashes the player (il2cpp only)

Add comment

Log in to post comment

All about bugs

View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.