How to reproduce:
1. Open the user’s attached “ErrorDemo” project
2. Build and Run the “SampleScene” Scene on Android
3. Observe the logs
Expected result: Jagged arrays are successfully serialized and the corresponding errors aren’t thrown
Actual result: InvalidCastException error is thrown
Reproducible with: 2021.3.15f1, 2021.3.17f1, 2022.2.3f1, 2023.1.0a26
Not reproducible with: 2020.3.44f1, 2021.3.14f1
Reproduced on: macOS 13.0 (Intel)
Thrown error:
InvalidCastException: Unable to cast object of type 'Int32[]' to type 'Object[]'.
at System.Runtime.Serialization.Formatters.Binary.ObjectWriter.WriteArray (System.Runtime.Serialization.Formatters.Binary.WriteObjectInfo objectInfo, System.Runtime.Serialization.Formatters.Binary.NameInfo memberNameInfo, System.Runtime.Serialization.Formatters.Binary.WriteObjectInfo memberObjectInfo) [0x00000] in <00000000000000000000000000000000>:0
at System.Runtime.Serialization.Formatters.Binary.ObjectWriter.Write (System.Runtime.Serialization.Formatters.Binary.WriteObjectInfo objectInfo, System.Runtime.Serialization.Formatters.Binary.NameInfo memberNameInfo, System.Runtime.Serialization.Formatters.Binary.NameInfo typeNameInfo) [0x00000] in <00000000000000000000000000000000>:0
at System.Runtime.Serialization.Formatters.Binary.ObjectWriter.Serialize (System.Object graph, System.Runtime.Remoting.Messaging.Header[] inHeaders, System.Runtime.Serialization.Formatters.Binary.__BinaryWriter serWriter, System.Boolean fCheck
Reproducible with devices:
VLNQA00494 - iPhone 14 Pro Max, 16.0.3 iOS
VLNQA00472 - Samsung Galaxy A52 (SM-A525F), CPU: Snapdragon 720G (SM7125), GPU: Adreno 618, OS: 12
VLNQA00414 - Galaxy Note10+ 5G (SM-N976V), CPU: Snapdragon 855 SM8150, GPU: Adreno 640, OS: 9
VLNQA00409 - Galaxy Z Fold3 5G (SM-F926B), CPU: Snapdragon 888, GPU: Adreno 660, OS: 11
VLNQA00392 - iPad (9th generation), 15.0 iOS
VLNQA00358 - iPhone 12, 14.1 iOS
VLNQA00335 - Galaxy S20+ 5G (SM-G986B), CPU: Exynos 990, GPU: Mali-G77, OS: 10.0.0