Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Obi 5.0 not usable on 2020.1.0a14
#1
Just upgraded to 5.0 and wanted to take a look at the new sample scenes to look at the new way of doing things.
Neither cloth or rope sample scenes load. 
Instead unity instant crashes ( without even showing the error report sending button ).
The unity log just shows these as the last log lines:

Opening scene 'Assets/Obi/Samples/Cloth/CharacterCloth.unity'
Serialization depth limit 7 exceeded at 'Obi::ObiConstraints`1.actor'. There may be an object composition cycle in one or more of your serialized classes.

Serialization hierarchy:
8: Obi::ObiConstraints`1.actor
7: Obi::ObiConstraints`1.source
6: Obi::ObiConstraints`1.source
5: Obi::ObiConstraints`1.source
4: Obi::ObiConstraints`1.source
3: Obi::ObiConstraints`1.source
2: Obi::ObiConstraints`1.source
1: Obi::ObiConstraints`1.source
 
(Filename: C:\buildslave\unity\build\Runtime/Mono/SerializationBackend_DirectMemoryAccess/ShouldTransferField.cpp Line: 121)

Probably need to revert to obi 4 for the time being. The dangers of using unity alphas I guess. Hope it's easy to fix. Guiño

Btw: Apparently unity changed the way packages work also. If I import cloth package then rope package the second package tries to delete all the scripts from the cloth package not included. So I had to copy the cloth folder out of assets then import rope and then merge the folders in the explorer.


EDIT: Tried creating a cloth blueprint. Samish error but full stacktrace:

StackOverflowException: The requested operation caused a stack overflow.
at (wrapper managed-to-native) UnityEditor.SerializedObject.InternalCreate(UnityEngine.Object[],UnityEngine.Object)
at UnityEditor.SerializedObject..ctor (UnityEngine.Object[] objs, UnityEngine.Object context) [0x00008] in <f77adbe680d5435ab56e2403863ec057>:0
at UnityEditor.Editor.CreateSerializedObject () [0x00009] in <f77adbe680d5435ab56e2403863ec057>:0
at UnityEditor.Editor.GetSerializedObjectInternal () [0x0000f] in <f77adbe680d5435ab56e2403863ec057>:0
at UnityEditor.Editor.get_serializedObject () [0x00018] in <f77adbe680d5435ab56e2403863ec057>:0
at Obi.ObiParticleSelectionEditorTool.InitializeGroupsList () [0x00000] in Z:\Projects\BH\Assets\Obi\Editor\Common\Blueprints\BlueprintEditorTools\ObiParticleSelectionEditorTool.cs:45
at Obi.ObiParticleSelectionEditorTool..ctor (Obi.ObiActorBlueprintEditor editor) [0x00068] in Z:\Projects\BH\Assets\Obi\Editor\Common\Blueprints\BlueprintEditorTools\ObiParticleSelectionEditorTool.cs:31
at (wrapper managed-to-native) UnityEditor.SerializedObject.InternalCreate(UnityEngine.Object[],UnityEngine.Object)
at UnityEditor.SerializedObject..ctor (UnityEngine.Object[] objs, UnityEngine.Object context) [0x00008] in <f77adbe680d5435ab56e2403863ec057>:0
at UnityEditor.Editor.CreateSerializedObject () [0x00009] in <f77adbe680d5435ab56e2403863ec057>:0
at UnityEditor.Editor.GetSerializedObjectInternal () [0x0000f] in <f77adbe680d5435ab56e2403863ec057>:0
at UnityEditor.Editor.get_serializedObject () [0x00018] in <f77adbe680d5435ab56e2403863ec057>:0
at UnityEditor.UIElements.InspectorElement..ctor (UnityEditor.Editor editor, UnityEditor.UIElements.InspectorElement+Mode mode) [0x00071] in <f77adbe680d5435ab56e2403863ec057>:0
at UnityEditor.UIElements.EditorElement.Init () [0x00042] in <f77adbe680d5435ab56e2403863ec057>:0
at UnityEditor.UIElements.EditorElement..ctor (System.Int32 editorIndex, UnityEditor.InspectorWindow iw) [0x0001e] in <f77adbe680d5435ab56e2403863ec057>:0
at UnityEditor.InspectorWindow.DrawEditors (UnityEditor.Editor[] editors) [0x00212] in <f77adbe680d5435ab56e2403863ec057>:0
at UnityEditor.InspectorWindow.RebuildContentsContainers () [0x00164] in <f77adbe680d5435ab56e2403863ec057>:0
at (wrapper managed-to-native) UnityEditor.ActiveEditorTracker.Internal_VerifyModifiedMonoBehaviours(UnityEditor.ActiveEditorTracker)
at UnityEditor.ActiveEditorTracker.VerifyModifiedMonoBehaviours () [0x00001] in <f77adbe680d5435ab56e2403863ec057>:0
at UnityEditor.InspectorWindow.OnInspectorUpdate () [0x00007] in <f77adbe680d5435ab56e2403863ec057>:0
at (wrapper managed-to-native) System.Reflection.MonoMethod.InternalInvoke(System.Reflection.MonoMethod,object,object[],System.Exception&)
at (wrapper managed-to-native) UnityEditor.ActiveEditorTracker.Internal_VerifyModifiedMonoBehaviours(UnityEditor.ActiveEditorTracker)
at UnityEditor.ActiveEditorTracker.VerifyModifiedMonoBehaviours () [0x00001] in <f77adbe680d5435ab56e2403863ec057>:0
at UnityEditor.InspectorWindow.OnInspectorUpdate () [0x00007] in <f77adbe680d5435ab56e2403863ec057>:0
at (wrapper managed-to-native) System.Reflection.MonoMethod.InternalInvoke(System.Reflection.MonoMethod,object,object[],System.Exception&)
at (wrapper managed-to-native) UnityEditor.ActiveEditorTracker.Internal_VerifyModifiedMonoBehaviours(UnityEditor.ActiveEditorTracker)
at UnityEditor.ActiveEditorTracker.VerifyModifiedMonoBehaviours () [0x00001] in <f77adbe680d5435ab56e2403863ec057>:0
at UnityEditor.InspectorWindow.OnInspectorUpdate () [0x00007] in <f77adbe680d5435ab56e2403863ec057>:0
at (wrapper managed-to-native) System.Reflection.MonoMethod.InternalInvoke(System.Reflection.MonoMethod,object,object[],System.Exception&)
at (wrapper managed-to-native) UnityEditor.ActiveEditorTracker.Internal_VerifyModifiedMonoBehaviours(UnityEditor.ActiveEditorTracker)
at UnityEditor.ActiveEditorTracker.VerifyModifiedMonoBehaviours () [0x00001] in <f77adbe680d5435ab56e2403863ec057>:0
at UnityEditor.InspectorWindow.OnInspectorUpdate () [0x00007] in <f77adbe680d5435ab56e2403863ec057>:0
at (wrapper managed-to-native) System.Reflection.MonoMethod.InternalInvoke(System.Reflection.MonoMethod,object,object[],System.Exception&)
at (wrapper managed-to-native) UnityEditor.ActiveEditorTracker.Internal_VerifyModifiedMonoBehaviours(UnityEditor.ActiveEditorTracker)
at UnityEditor.ActiveEditorTracker.VerifyModifiedMonoBehaviours () [0x00001] in <f77adbe680d5435ab56e2403863ec057>:0
at UnityEditor.InspectorWindow.OnInspectorUpdate () [0x00007] in <f77adbe680d5435ab56e2403863ec057>:0
at (wrapper managed-to-native) System.Reflection.MonoMethod.InternalInvoke(System.Reflection.MonoMethod,object,object[],System.Exception&)
at (wrapper managed-to-native) UnityEditor.ActiveEditorTracker.Internal_VerifyModifiedMonoBehaviours(UnityEditor.ActiveEditorTracker)
at UnityEditor.ActiveEditorTracker.VerifyModifiedMonoBehaviours () [0x00001] in <f77adbe680d5435ab56e2403863ec057>:0
at UnityEditor.InspectorWindow.OnInspectorUpdate () [0x00007] in <f77adbe680d5435ab56e2403863ec057>:0
at (wrapper managed-to-native) System.Reflection.MonoMethod.InternalInvoke(System.Reflection.MonoMethod,object,object[],System.Exception&)
at (wrapper managed-to-native) UnityEditor.ActiveEditorTracker.Internal_VerifyModifiedMonoBehaviours(UnityEditor.ActiveEditorTracker)
at UnityEditor.ActiveEditorTracker.VerifyModifiedMonoBehaviours () [0x00001] in <f77adbe680d5435ab56e2403863ec057>:0
at UnityEditor.InspectorWindow.OnInspectorUpdate () [0x00007] in <f77adbe680d5435ab56e2403863ec057>:0
at (wrapper managed-to-native) System.Reflection.MonoMethod.InternalInvoke(System.Reflection.MonoMethod,object,object[],System.Exception&)
at System.Reflection.MonoMethod.Invoke (System.Object obj, System.Reflection.BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) [0x00032] in <437ba245d8404784b9fbab9b439ac908>:0
Rethrow as TargetInvocationException: Exception has been thrown by the target of an invocation.
at System.Reflection.MonoMethod.Invoke (System.Object obj, System.Reflection.BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) [0x00048] in <437ba245d8404784b9fbab9b439ac908>:0
at System.Reflection.MethodBase.Invoke (System.Object obj, System.Object[] parameters) [0x00000] in <437ba245d8404784b9fbab9b439ac908>:0
at UnityEditor.HostView.Invoke (System.String methodName, System.Object obj) [0x0000f] in <f77adbe680d5435ab56e2403863ec057>:0
at UnityEditor.HostView.Invoke (System.String methodName) [0x00001] in <f77adbe680d5435ab56e2403863ec057>:0
at UnityEditor.HostView.OnInspectorUpdate () [0x00001] in <f77adbe680d5435ab56e2403863ec057>:0

(Filename: <f77adbe680d5435ab56e2403863ec057> Line: 0)

Serialization depth limit 7 exceeded at 'Obi::ObiConstraints`1.actor'. There may be an object composition cycle in one or more of your serialized classes.

Serialization hierarchy:
8: Obi::ObiConstraints`1.actor
7: Obi::ObiConstraints`1.source
6: Obi::ObiConstraints`1.source
5: Obi::ObiConstraints`1.source
4: Obi::ObiConstraints`1.source
3: Obi::ObiConstraints`1.source
2: Obi::ObiConstraints`1.source
1: Obi::ObiConstraints`1.source

UnityEditor.ActiveEditorTracker:Internal_VerifyModifiedMonoBehaviours(ActiveEditorTracker)
UnityEditor.ActiveEditorTracker:VerifyModifiedMonoBehaviours()
UnityEditor.InspectorWindow:OnInspectorUpdate()
System.Reflection.MonoMethod:InternalInvoke(Object, Object[], Exception&)
System.Reflection.MonoMethod:Invoke(Object, BindingFlags, Binder, Object[], CultureInfo)
System.Reflection.MethodBase:Invoke(Object, Object[])
UnityEditor.HostView:Invoke(String, Object)
UnityEditor.HostView:Invoke(String)
UnityEditor.HostView:OnInspectorUpdate()

[C:\buildslave\unity\build\Runtime/Mono/SerializationBackend_DirectMemoryAccess/ShouldTransferField.cpp line 121]
(Filename: C:\buildslave\unity\build\Runtime/Mono/SerializationBackend_DirectMemoryAccess/ShouldTransferField.cpp Line: 121)
Reply
#2
(29-11-2019, 01:09 AM)ibbybn Wrote: Just upgraded to 5.0 and wanted to take a look at the new sample scenes to look at the new way of doing things.
Neither cloth or rope sample scenes load. 
Instead unity instant crashes ( without even showing the error report sending button ).

Hi!

Thanks for the report! We will try to reproduce and get back to you asap.

(29-11-2019, 01:09 AM)ibbybn Wrote: Btw: Apparently unity changed the way packages work also. If I import cloth package then rope package the second package tries to delete all the scripts from the cloth package not included. So I had to copy the cloth folder out of assets then import rope and then merge the folders in the explorer.

Appalled to hear this. WTF, Unity. Did they document this anywhere? we rely heavily on this feature, so that users can import Obi assets "on top" of any existing ones. I'll try to get in touch with them.
Reply
#3
(29-11-2019, 01:09 AM)ibbybn Wrote: Opening scene 'Assets/Obi/Samples/Cloth/CharacterCloth.unity'
Serialization depth limit 7 exceeded at 'Obi::ObiConstraints`1.actor'. There may be an object composition cycle in one or more of your serialized classes.

Serialization hierarchy:
8: Obi::ObiConstraints`1.actor
7: Obi::ObiConstraints`1.source
6: Obi::ObiConstraints`1.source
5: Obi::ObiConstraints`1.source
4: Obi::ObiConstraints`1.source
3: Obi::ObiConstraints`1.source
2: Obi::ObiConstraints`1.source
1: Obi::ObiConstraints`1.source

Reproduced. Seems like a bug in Unity's serialization system introduced in 2020, and a pretty serious one. "source" is a protected, generic variable, so it shouldn't be serialized. As far as I know, serialization does not support generics and moreover, only public fields (or those marked with the SerializeField attribute) are serialized. So I don't know why the heck is it complaining of a composition cycle (which I'm full aware is a big no-no because it causes an infinite recursive loop that they cap at a given depth), if the field is not marked for, and in fact cannot be, serialized.

Try placing a [NonSerialized] attribute in front of it (ObiConstraints.cs, line 33), see if this gives Unity a hint that this thing should not be serialized. Didn't work for me, but it's the only thing I can think of. Will send a bug report to them.
Reply
#4
Ah yes they're fiddling around with generics serialization with the alpha: https://forum.unity.com/threads/generics...on.746300/

Very odd that's it's trying to serialize that without the serialize flag though.

Didn't see the package thing written in any of the change logs but maybe I skipped it?
It just started happening when i switched to 2020. One package even tried to delete all my other asset folders except itself so it's quite dangerous behaviour. I'm not sure if it's a bug or """feature""".
Reply