Search Issue Tracker

Won't Fix

Votes

1

Found in

2020.3.46f1

2021.3.20f1

2022.2.9f1

2023.1.0b7

2023.2.0a5

Issue ID

UUM-28761

Regression

No

BinaryFormatter.Serialize throws a SerializationException when trying to serialize more than 13169966 objects

--

-

Reproduction steps:
1. Open the attached “addressable_content_state_unityproj“ project
2. Open the “Content Update Loader” Custom Editor Window (BugReport > Content Update Loader)
3. Press the “Load From JSON” button
4. Press the “Save with BinaryFormatter (Inducing Bug)” button
5. Observe the Console window

Expected result: “SerializationException: The internal array cannot expand to greater than Int32.MaxValue elements.” is present
Actual result: No errors are present

Reproducible with: 2020.3.46f1, 2021.3.20f1, 2022.2.9f1, 2023.1.0b7, 2023.2.0a5

Reproducible on: Windows 10 (21H2)

  1. Resolution Note:

    We can't fix this with our current Mono base class library. When Unity moves to the .NET Core base class library, this limitation will be removed.

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.