Search Issue Tracker

Fix In Review for 2022.1.X

Fixed in 2021.2.X

Votes

15

Found in

2021.2.0a18

2021.2.0b14

2022.1

Issue ID

1374185

Regression

Yes

[IL2CPP]System.Runtime.Serialization.Formatters.BinaryFormatter doesn't work when Project is build with IL2CPP Scripting Backend

IL2CPP

-

Reproduction steps:
1. Open the attached project "BinaryFormatter.zip"
2. In File > Build Settings, make sure that Scenes/SampleScene is added to Scenes In Build
3. In Player settings change Scripting Backend to the IL2CPP
4. Build and Run
5. Observe the Build

Expected result: Data is serialized successfully
Actual result: Binary Formatter discards data, serialization fails

Reproducible with: 2021.2.0a18, 2021.2.0b16, 2022.1.0a13
Not reproducible with: 2019.4.32f1, 2020.3.21f1, 2021.1.27f1, 2021.2.0a17

Note:
- The issue is not reproducible with Mono Scripting Backend

  1. Response avatar

    Resolution Note (fix version 2021.2):

    Fixed in: 2021.2.3f1

Comments (7)

  1. 7a17223be0217e9bfffbc11e264ba036?d=mm

    MaskedMouse

    Nov 05, 2021 13:09

    People stop using the binary formatter it is NOT safe. Even the microsoft documentation says so.
    IMO Unity should warn developers using this API

  2. 7d14100e15e3c2b0041da5be171f3fa5?d=mm

    if_james

    Nov 05, 2021 02:03

    +1 This is the only thing blocking our upgrade to 2021.2, would appreciate a fix ASAP.

  3. 8821a729788964d12905bb93d49929b5?d=mm

    MrDizzle26

    Oct 29, 2021 15:03

    This is an extremely important issue for our team, we are stuck on the very unstable b1 until this is resolved

  4. 1a64c1769180e2b3c1761411a9c07cbf?d=mm

    Shii

    Oct 28, 2021 10:25

    This is the only one know issue in 2021.2 that preventing us upgrading our project from 2020.3. Please fix it!

  5. 043c11443aecf8fa93412bb0e62b7a39?d=mm

    Johnroy3

    Oct 27, 2021 21:24

    Can someone please fix this? Like, right now :/

  6. Cef4d88ddd718a8d881df1db76317e60?d=mm

    gamefox87

    Oct 27, 2021 21:18

    Please fix this ASAP.

  7. 54e16d92fed03dbe6e34e05f70a800ce?d=mm

    Kunnogi

    Oct 27, 2021 21:17

    Definitely requires to be fixed, very important issue, should be fixed ASAP.

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.