Search Issue Tracker
Fixed in 5.0.X
Votes
5
Found in
4.3.1f1
Issue ID
580667
Regression
No
Loading of serialized specific ScriptableObject fails with System.ArgumentOutOfRangeException
The reproduction project has complex ScriptableObject hierarchy. Application fails with such error, which could vary with project/version:
Exception: Non-negative number required.Parameter name: capacity
Type: System.ArgumentOutOfRangeException
Module: mscorlib
InnerException: <No Data>
AdditionalInfo:Invoking UnityEngine.IUnitySerializable::Unity_Deserialize method with argument count: 0
at System.ThrowHelper.ThrowArgumentOutOfRangeException(ExceptionArgument argument, ExceptionResource resource)
at System.Collections.Generic.List`1..ctor(Int32 capacity)
at <Custom Class>.Unity_Deserialize()
at lambda_method(Closure , Object , Object[] , Int32 )
at WinRTBridge.MethodTools.InvokeMethod(Object instance, Int32 methodIndex, Object[] args)
(Filename: Line: 65)
A script behaviour has a different serialization layout when loading. (Read 888 bytes but expected 2527120 bytes)
Did you #ifdef UNITY_EDITOR a section of your serialized properties in any of your scripts?
Add comment
All about bugs
View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.
Latest issues
- The UI is not visible when resizing out of focus built Player window with Application.runInBackground set to false
- [Linux] "Error while reading movie" errors are thrown when opening templates
- Standalone profiler process is hidden in macOS dock
- Shader warnings are being thrown after building Mixed Reality Template
- Error is thrown when entering play mode with build profiles docked and standalone profiler open
deepesh
May 07, 2014 09:51
Hi All,
I am also getting something similar kind of error when running a windows store app build but its System.ArgumentOutOfMemory Exception instead of System.ArgumentOutOfRangeException
:Exception: Exception of type 'System.OutOfMemoryException' was thrown.
Type: System.OutOfMemoryException
Module: WinRTBridge
InnerException: <No Data>
AdditionalInfo:Invoking UnityEngine.IUnitySerializable::Unity_Deserialize method with argument count: 0
at WinRTBridge.SerializationWeaverReader.ReadString()
at AvatarPartTab.Unity_Deserialize()
at UiAvatarCustomization.Unity_Deserialize()
at lambda_method(Closure , Object , Object[] , Int32 )
at WinRTBridge.MethodTools.InvokeMethod(Object instance, Int32 methodIndex, Object[] args)
(Filename: C:/BuildAgent/work/d3d49558e4d408f4/Runtime/Scripting/WinRTUtility.cpp Line: 65)
A script behaviour has a different serialization layout when loading. (Read 320 bytes but expected 5952 bytes)
Did you #ifdef UNITY_EDITOR a section of your serialized properties in any of your scripts?
Is it related to this exception?, or someone can give me solution for this?
Thanks In Advance!
Arkanoid
Mar 03, 2014 14:26
still present in 4.3.4
soulburner
Dec 20, 2013 12:31
Waiting for a fix! Thank you.