Getting outofmemory error

mostlyhuman

Member
No idea why. If i close unity and reopen the project the error pops back up almost immediately
Code:
OutOfMemoryException: Out of memory
System.Array.CreateInstance (System.Type elementType, System.Int32[] lengths) (at <437ba245d8404784b9fbab9b439ac908>:0)
System.Array.CreateInstance (System.Type elementType, System.Int32 length) (at <437ba245d8404784b9fbab9b439ac908>:0)
BinaryDeserialization.LoadField (BehaviorDesigner.Runtime.FieldSerializationData fieldSerializationData, System.Collections.Generic.Dictionary`2[TKey,TValue] fieldIndexMap, System.Type fieldType, System.String fieldName, System.Int32 hashPrefix, BehaviorDesigner.Runtime.IVariableSource variableSource, System.Object obj, System.Reflection.FieldInfo fieldInfo) (at <ddb5579d0d23478c9f73ec2f99600079>:0)
BinaryDeserialization.LoadFields (BehaviorDesigner.Runtime.FieldSerializationData fieldSerializationData, System.Collections.Generic.Dictionary`2[TKey,TValue] fieldIndexMap, System.Object obj, System.Int32 hashPrefix, BehaviorDesigner.Runtime.IVariableSource variableSource) (at <ddb5579d0d23478c9f73ec2f99600079>:0)
BinaryDeserialization.LoadField (BehaviorDesigner.Runtime.FieldSerializationData fieldSerializationData, System.Collections.Generic.Dictionary`2[TKey,TValue] fieldIndexMap, System.Type fieldType, System.String fieldName, System.Int32 hashPrefix, BehaviorDesigner.Runtime.IVariableSource variableSource, System.Object obj, System.Reflection.FieldInfo fieldInfo) (at <ddb5579d0d23478c9f73ec2f99600079>:0)
BinaryDeserialization.LoadFields (BehaviorDesigner.Runtime.FieldSerializationData fieldSerializationData, System.Collections.Generic.Dictionary`2[TKey,TValue] fieldIndexMap, System.Object obj, System.Int32 hashPrefix, BehaviorDesigner.Runtime.IVariableSource variableSource) (at <ddb5579d0d23478c9f73ec2f99600079>:0)
BinaryDeserialization.BytesToSharedVariable (BehaviorDesigner.Runtime.FieldSerializationData fieldSerializationData, System.Collections.Generic.Dictionary`2[TKey,TValue] fieldIndexMap, System.Byte[] bytes, System.Int32 dataPosition, BehaviorDesigner.Runtime.IVariableSource variableSource, System.Boolean fromField, System.Int32 hashPrefix) (at <ddb5579d0d23478c9f73ec2f99600079>:0)
BinaryDeserialization.LoadField (BehaviorDesigner.Runtime.FieldSerializationData fieldSerializationData, System.Collections.Generic.Dictionary`2[TKey,TValue] fieldIndexMap, System.Type fieldType, System.String fieldName, System.Int32 hashPrefix, BehaviorDesigner.Runtime.IVariableSource variableSource, System.Object obj, System.Reflection.FieldInfo fieldInfo) (at <ddb5579d0d23478c9f73ec2f99600079>:0)
BinaryDeserialization.LoadFields (BehaviorDesigner.Runtime.FieldSerializationData fieldSerializationData, System.Collections.Generic.Dictionary`2[TKey,TValue] fieldIndexMap, System.Object obj, System.Int32 hashPrefix, BehaviorDesigner.Runtime.IVariableSource variableSource) (at <ddb5579d0d23478c9f73ec2f99600079>:0)
BinaryDeserialization.LoadTask (BehaviorDesigner.Runtime.TaskSerializationData taskSerializationData, BehaviorDesigner.Runtime.FieldSerializationData fieldSerializationData, System.Collections.Generic.List`1[BehaviorDesigner.Runtime.Tasks.Task]& taskList, BehaviorDesigner.Runtime.BehaviorSource& behaviorSource) (at <ddb5579d0d23478c9f73ec2f99600079>:0)
BinaryDeserialization.Load (BehaviorDesigner.Runtime.TaskSerializationData taskData, BehaviorDesigner.Runtime.BehaviorSource behaviorSource) (at <ddb5579d0d23478c9f73ec2f99600079>:0)
BehaviorDesigner.Runtime.BehaviorSource.CheckForSerialization (System.Boolean force, BehaviorDesigner.Runtime.BehaviorSource behaviorSource) (at <ddb5579d0d23478c9f73ec2f99600079>:0)
BehaviorDesigner.Editor.GraphDesigner.Load (BehaviorDesigner.Runtime.BehaviorSource behaviorSource, System.Boolean loadPrevBehavior, UnityEngine.Vector2 nodePosition) (at <4b28e19850d5443cb0dab9a889df4542>:0)
BehaviorDesigner.Editor.BehaviorDesignerWindow.LoadBehavior (BehaviorDesigner.Runtime.BehaviorSource behaviorSource, System.Boolean loadPrevBehavior, System.Boolean inspectorLoad) (at <4b28e19850d5443cb0dab9a889df4542>:0)
BehaviorDesigner.Editor.BehaviorDesignerWindow.LoadBehavior (BehaviorDesigner.Runtime.BehaviorSource behaviorSource, System.Boolean loadPrevBehavior) (at <4b28e19850d5443cb0dab9a889df4542>:0)
BehaviorDesigner.Editor.BehaviorDesignerWindow.BehaviorSelectionCallback (System.Object obj) (at <4b28e19850d5443cb0dab9a889df4542>:0)
UnityEditor.GenericMenu.CatchMenu (System.Object userData, System.String[] options, System.Int32 selected) (at <a20a50bbfaff4193bf6ba6b262f9a71f>:0)
 
Here is another seemingly related error, its preventing BD from working when I hit play so i am stuck like chuck :)

Code:
ArgumentException: Getting control 1's position in a group with only 1 controls when doing repaint
Aborting
UnityEngine.GUILayoutGroup.GetNext () (at <819de1aa368e45faa4f78e26c97c62b0>:0)
UnityEngine.GUILayoutUtility.BeginLayoutArea (UnityEngine.GUIStyle style, System.Type layoutType) (at <819de1aa368e45faa4f78e26c97c62b0>:0)
UnityEngine.GUILayout.BeginArea (UnityEngine.Rect screenRect, UnityEngine.GUIContent content, UnityEngine.GUIStyle style) (at <819de1aa368e45faa4f78e26c97c62b0>:0)
UnityEngine.GUILayout.BeginArea (UnityEngine.Rect screenRect, UnityEngine.GUIStyle style) (at <819de1aa368e45faa4f78e26c97c62b0>:0)
BehaviorDesigner.Editor.BehaviorDesignerWindow.DrawFileToolbar () (at <4b28e19850d5443cb0dab9a889df4542>:0)
BehaviorDesigner.Editor.BehaviorDesignerWindow.Draw () (at <4b28e19850d5443cb0dab9a889df4542>:0)
BehaviorDesigner.Editor.BehaviorDesignerWindow.OnGUI () (at <4b28e19850d5443cb0dab9a889df4542>:0)
System.Reflection.MonoMethod.Invoke (System.Object obj, System.Reflection.BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) (at <437ba245d8404784b9fbab9b439ac908>:0)
Rethrow as TargetInvocationException: Exception has been thrown by the target of an invocation.
System.Reflection.MonoMethod.Invoke (System.Object obj, System.Reflection.BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) (at <437ba245d8404784b9fbab9b439ac908>:0)
System.Reflection.MethodBase.Invoke (System.Object obj, System.Object[] parameters) (at <437ba245d8404784b9fbab9b439ac908>:0)
UnityEditor.HostView.Invoke (System.String methodName, System.Object obj) (at <a20a50bbfaff4193bf6ba6b262f9a71f>:0)
UnityEditor.HostView.Invoke (System.String methodName) (at <a20a50bbfaff4193bf6ba6b262f9a71f>:0)
UnityEditor.HostView.InvokeOnGUI (UnityEngine.Rect onGUIPosition, UnityEngine.Rect viewRect) (at <a20a50bbfaff4193bf6ba6b262f9a71f>:0)
UnityEditor.DockArea.DrawView (UnityEngine.Rect viewRect, UnityEngine.Rect dockAreaRect) (at <a20a50bbfaff4193bf6ba6b262f9a71f>:0)
UnityEditor.DockArea.OldOnGUI () (at <a20a50bbfaff4193bf6ba6b262f9a71f>:0)
UnityEngine.UIElements.IMGUIContainer.DoOnGUI (UnityEngine.Event evt, UnityEngine.Matrix4x4 parentTransform, UnityEngine.Rect clippingRect, System.Boolean isComputingLayout, UnityEngine.Rect layoutSize, System.Action onGUIHandler, System.Boolean canAffectFocus) (at <78b213560771414e9fa6f1b95f5ad8bb>:0)
UnityEngine.UIElements.IMGUIContainer.HandleIMGUIEvent (UnityEngine.Event e, UnityEngine.Matrix4x4 worldTransform, UnityEngine.Rect clippingRect, System.Action onGUIHandler, System.Boolean canAffectFocus) (at <78b213560771414e9fa6f1b95f5ad8bb>:0)
UnityEngine.UIElements.IMGUIContainer.DoIMGUIRepaint () (at <78b213560771414e9fa6f1b95f5ad8bb>:0)
UnityEngine.UIElements.UIR.RenderChainCommand.ExecuteNonDrawMesh (UnityEngine.UIElements.UIR.DrawParams drawParams, System.Boolean straightY, System.Single pixelsPerPoint, System.Exception& immediateException) (at <78b213560771414e9fa6f1b95f5ad8bb>:0)
Rethrow as ImmediateModeException
UnityEngine.UIElements.UIR.RenderChain.Render (UnityEngine.Rect viewport, UnityEngine.Matrix4x4 projection, UnityEngine.UIElements.PanelClearFlags clearFlags) (at <78b213560771414e9fa6f1b95f5ad8bb>:0)
UnityEngine.UIElements.UIRRepaintUpdater.DrawChain (UnityEngine.Rect viewport, UnityEngine.Matrix4x4 projection) (at <78b213560771414e9fa6f1b95f5ad8bb>:0)
UnityEngine.UIElements.UIRRepaintUpdater.Update () (at <78b213560771414e9fa6f1b95f5ad8bb>:0)
UnityEngine.UIElements.VisualTreeUpdater.UpdateVisualTreePhase (UnityEngine.UIElements.VisualTreeUpdatePhase phase) (at <78b213560771414e9fa6f1b95f5ad8bb>:0)
UnityEngine.UIElements.Panel.UpdateForRepaint () (at <78b213560771414e9fa6f1b95f5ad8bb>:0)
UnityEngine.UIElements.Panel.Repaint (UnityEngine.Event e) (at <78b213560771414e9fa6f1b95f5ad8bb>:0)
UnityEngine.UIElements.UIElementsUtility.DoDispatch (UnityEngine.UIElements.BaseVisualElementPanel panel) (at <78b213560771414e9fa6f1b95f5ad8bb>:0)
UnityEngine.UIElements.UIElementsUtility.ProcessEvent (System.Int32 instanceID, System.IntPtr nativeEventPtr) (at <78b213560771414e9fa6f1b95f5ad8bb>:0)
UnityEngine.GUIUtility.ProcessEvent (System.Int32 instanceID, System.IntPtr nativeEventPtr) (at <819de1aa368e45faa4f78e26c97c62b0>:0)
 
I was about to make my own post when I saw yours.

I've also been getting OutOfMemory error reports too, and it makes the Unity Editor be extremely laggy.
It might be related to Unity 2019.3.15 because I recently updated.

The error pops when I exit playmode:
Code:
OutOfMemoryException: Out of memory
System.MulticastDelegate.CombineImpl (System.Delegate follow) (at <437ba245d8404784b9fbab9b439ac908>:0)
System.Delegate.Combine (System.Delegate a, System.Delegate b) (at <437ba245d8404784b9fbab9b439ac908>:0)
BehaviorDesigner.Runtime.BehaviorManager.set_OnTaskBreakpoint (BehaviorDesigner.Runtime.BehaviorManager+BehaviorManagerHandler value) (at <ddb5579d0d23478c9f73ec2f99600079>:0)
BehaviorDesigner.Editor.BehaviorDesignerWindow.SetBehaviorManager () (at <4b28e19850d5443cb0dab9a889df4542>:0)
BehaviorDesigner.Editor.BehaviorDesignerWindow.OnPlaymodeStateChange () (at <4b28e19850d5443cb0dab9a889df4542>:0)
BehaviorDesigner.Editor.BehaviorDesignerWindow.OnPlaymodeStateChange (UnityEditor.PlayModeStateChange change) (at <4b28e19850d5443cb0dab9a889df4542>:0)
UnityEditor.EditorApplication.Internal_PlayModeStateChanged (UnityEditor.PlayModeStateChange state) (at <a20a50bbfaff4193bf6ba6b262f9a71f>:0)
UnityEditor.EditorApplication:Internal_CallGlobalEventHandler()

After some time the Unity editor crashes.

I'll be turning off the BehaviourDesigner window for now so that I can keep working on my project.
 
Last edited:
I am using 2019.3.15, I rebooted my machine and the errors went away which didnt really make sense to me since restarting Unity several times didnt fix the issue. I will post again if the errors resurface for me.
 
@FeastSC2 - are you able to send me a repro project which has the out of memory error? It looks like it is something to do with setting the task breakpoints and I'd like to take a closer look at it.
 
@Justin I'll just throw some info at you because I can't reproduce it anymore.
Maybe that's of some value, although because of the fact that I don't have it anymore, maybe it was an anomaly.
I'll let you know if it pops up again.

I had to quit and restart playmode a few times before the error showed up.
After around 5-10 times, the editor would start to lag and eventually crash. (I am using fast enter playmode with no domain reload)

Now that I quit it and restarted the window, I'm not getting an error when exitting playmode anymore. (I can't reproduce the problem)
I didn't start the Behavior Designer window myself after I updated Unity (the window just started itself automatically because of the window layout I had).
 
Top