[BUG] IndexOutOfRangeException: Index was outside the bounds of the array - Printable Version +- Obi Official Forum (https://obi.virtualmethodstudio.com/forum) +-- Forum: Obi Users Category (https://obi.virtualmethodstudio.com/forum/forum-1.html) +--- Forum: Obi Softbody (https://obi.virtualmethodstudio.com/forum/forum-12.html) +--- Thread: [BUG] IndexOutOfRangeException: Index was outside the bounds of the array (/thread-3271.html) |
[BUG] IndexOutOfRangeException: Index was outside the bounds of the array - Svyatoslav - 10-01-2022 Why is this happening? How to fix it? The project is completely clean. https://youtu.be/TWCbnxFDqfw (2:15) Obi Softbody 6.3 Unity3D 2021.2.7f1 (last), 2021.1.13f1, 2020.3.25f1 (LTS) Windows 10 license Error text: IndexOutOfRangeException: Index was outside the bounds of the array. Obi.ObiSoftbodySurfaceBlueprintEditor.VertexToParticle (System.Int32 vertexIndex) (at Assets/Obi/Editor/Softbody/Blueprints/ObiSoftbodySurfaceBlueprintEditor.cs:217) Obi.ObiMeshBasedActorBlueprintEditor.DrawGradientMesh (System.Single[] vertexWeights, System.Single[] wireframeWeights) (at Assets/Obi/Editor/Common/Blueprints/ObiMeshBasedActorBlueprintEditor.cs:123) Obi.ObiBlueprintRenderModeMesh.OnSceneRepaint (UnityEditor.SceneView sceneView) (at Assets/Obi/Editor/Common/Blueprints/RenderModes/ObiBlueprintRenderModeMesh.cs:43) Obi.ObiActorBlueprintEditor.OnSceneGUI (UnityEditor.SceneView sceneView) (at Assets/Obi/Editor/Common/Blueprints/ObiActorBlueprintEditor.cs:322) UnityEditor.SceneView.CallOnSceneGUI () (at <0cde216a590a4d6fbc3d7db7ac203c5d>:0) UnityEditor.SceneView.HandleSelectionAndOnSceneGUI () (at <0cde216a590a4d6fbc3d7db7ac203c5d>:0) UnityEditor.SceneView.DoOnGUI () (at <0cde216a590a4d6fbc3d7db7ac203c5d>:0) UnityEditor.SceneView.OnSceneGUI () (at <0cde216a590a4d6fbc3d7db7ac203c5d>: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 <66054a7773f64b399021c1a3f19995a3>:0) UnityEngine.UIElements.IMGUIContainer.HandleIMGUIEvent (UnityEngine.Event e, UnityEngine.Matrix4x4 worldTransform, UnityEngine.Rect clippingRect, System.Action onGUIHandler, System.Boolean canAffectFocus) (at <66054a7773f64b399021c1a3f19995a3>:0) UnityEngine.UIElements.IMGUIContainer.DoIMGUIRepaint () (at <66054a7773f64b399021c1a3f19995a3>:0) UnityEngine.UIElements.UIR.RenderChainCommand.ExecuteNonDrawMesh (UnityEngine.UIElements.UIR.DrawParams drawParams, System.Single pixelsPerPoint, System.Exception& immediateException) (at <66054a7773f64b399021c1a3f19995a3>:0) Rethrow as ImmediateModeException UnityEngine.UIElements.UIR.RenderChain.Render () (at <66054a7773f64b399021c1a3f19995a3>:0) UnityEngine.UIElements.UIRRepaintUpdater.Update () (at <66054a7773f64b399021c1a3f19995a3>:0) UnityEngine.UIElements.VisualTreeUpdater.UpdateVisualTreePhase (UnityEngine.UIElements.VisualTreeUpdatePhase phase) (at <66054a7773f64b399021c1a3f19995a3>:0) UnityEngine.UIElements.Panel.UpdateForRepaint () (at <66054a7773f64b399021c1a3f19995a3>:0) UnityEngine.UIElements.Panel.Repaint (UnityEngine.Event e) (at <66054a7773f64b399021c1a3f19995a3>:0) UnityEngine.UIElements.UIElementsUtility.DoDispatch (UnityEngine.UIElements.BaseVisualElementPanel panel) (at <66054a7773f64b399021c1a3f19995a3>:0) UnityEngine.UIElements.UIElementsUtility.UnityEngine.UIElements.IUIElementsUtility.ProcessEvent (System.Int32 instanceID, System.IntPtr nativeEventPtr, System.Boolean& eventHandled) (at <66054a7773f64b399021c1a3f19995a3>:0) UnityEngine.UIElements.UIEventRegistration.ProcessEvent (System.Int32 instanceID, System.IntPtr nativeEventPtr) (at <66054a7773f64b399021c1a3f19995a3>:0) UnityEngine.UIElements.UIEventRegistration+<>c.<.cctor>b__1_2 (System.Int32 i, System.IntPtr ptr) (at <66054a7773f64b399021c1a3f19995a3>:0) UnityEngine.GUIUtility.ProcessEvent (System.Int32 instanceID, System.IntPtr nativeEventPtr, System.Boolean& result) (at <4c1b5f56ab12481abc458fdd69da0f26>:0) RE: [BUG] IndexOutOfRangeException: Index was outside the bounds of the array - josemendez - 11-01-2022 Hi, Thanks for reporting this! It looks like a bug. In could reproduce it when enabling mesh rendering in the blueprint editor for some meshes, will investigate, fix, and provide a patch asap. kind regards, RE: [BUG] IndexOutOfRangeException: Index was outside the bounds of the array - josemendez - 11-01-2022 Just fixed this. Attached to this message you will find a patched version of ObiSoftbodySurfaceBlueprint.cs. Replace your version (found at /Assets/Obi/Scripts/Softbody/Blueprints/ObiSoftbodySurfaceBlueprint.cs) with this one, that shoulder rid of the error message. Let me know how it goes . RE: [BUG] IndexOutOfRangeException: Index was outside the bounds of the array - Svyatoslav - 11-01-2022 (11-01-2022, 08:55 AM)josemendez Wrote: Just fixed this. Attached to this message you will find a patched version of ObiSoftbodySurfaceBlueprint.cs.Thanks for the quick response, yes, that fixed the problem! |