Skip to content
This repository has been archived by the owner on Jun 10, 2024. It is now read-only.

NullReferenceException when clicking at "Combine" #1

Closed
inkuxuan opened this issue Apr 30, 2023 · 2 comments
Closed

NullReferenceException when clicking at "Combine" #1

inkuxuan opened this issue Apr 30, 2023 · 2 comments
Assignees

Comments

@inkuxuan
Copy link

Hi.
Thank you for making this tool.
I encountered a problem and think that I should report it here.
This problem occurs when I'm trying to combine meshes of the original Hakka (unmodified)'s meshes on Android platform.
After importing Mesh Combiner, select target avatar and hit "+",
multiple mesh renderers are added automatically.
Next, hit "Auto create" in "destination", a new mesh renderer is created automatically.
Finally when I hit "Combine" button, this exception came up:

NullReferenceException: Object reference not set to an instance of an object
JLChnToZ.EditorExtensions.SkinnedMeshCombiner.VertexCutter+BlendShapeCutter.Apply (UnityEngine.Mesh mesh) (at Assets/JLChnToZ/Common/Editor/SkinnedMeshCombiner/VertexCutter.cs:352)
JLChnToZ.EditorExtensions.SkinnedMeshCombiner.VertexCutter.Apply (UnityEngine.Mesh mesh) (at Assets/JLChnToZ/Common/Editor/SkinnedMeshCombiner/VertexCutter.cs:107)
JLChnToZ.EditorExtensions.SkinnedMeshCombiner.SkinnedMeshCombinerCore.Add (UnityEngine.SkinnedMeshRenderer source, JLChnToZ.EditorExtensions.SkinnedMeshCombiner.CombineBlendshapeFlags[] bakeFlags, JLChnToZ.EditorExtensions.SkinnedMeshCombiner.CombineMeshFlags mergeFlags) (at Assets/JLChnToZ/Common/Editor/SkinnedMeshCombiner/SkinnedMeshCombinerCore.cs:166)
JLChnToZ.EditorExtensions.SkinnedMeshCombiner.SkinnedMeshCombinerCore.Combine (System.Collections.Generic.ICollection`1[T] sources, UnityEngine.SkinnedMeshRenderer destination, JLChnToZ.EditorExtensions.SkinnedMeshCombiner.CombineMeshFlags mergeFlags, JLChnToZ.EditorExtensions.SkinnedMeshCombiner.BlendShapeCopyMode blendShapeCopyMode, System.Collections.Generic.IDictionary`2[TKey,TValue] boneRemap) (at Assets/JLChnToZ/Common/Editor/SkinnedMeshCombiner/SkinnedMeshCombinerCore.cs:68)
JLChnToZ.EditorExtensions.SkinnedMeshCombiner.MeshCombinerWindow.Combine () (at Assets/JLChnToZ/Common/Editor/MeshCombinerWindow.cs:616)
JLChnToZ.EditorExtensions.SkinnedMeshCombiner.MeshCombinerWindow.OnGUI () (at Assets/JLChnToZ/Common/Editor/MeshCombinerWindow.cs:114)
System.Reflection.MonoMethod.Invoke (System.Object obj, System.Reflection.BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) (at <eae584ce26bc40229c1b1aa476bfa589>: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 <eae584ce26bc40229c1b1aa476bfa589>:0)
System.Reflection.MethodBase.Invoke (System.Object obj, System.Object[] parameters) (at <eae584ce26bc40229c1b1aa476bfa589>:0)
UnityEditor.HostView.Invoke (System.String methodName, System.Object obj) (at <1129d3b8df0448079e2ccfb85c3975ef>:0)
UnityEditor.HostView.Invoke (System.String methodName) (at <1129d3b8df0448079e2ccfb85c3975ef>:0)
UnityEditor.HostView.InvokeOnGUI (UnityEngine.Rect onGUIPosition, UnityEngine.Rect viewRect) (at <1129d3b8df0448079e2ccfb85c3975ef>:0)
UnityEditor.DockArea.DrawView (UnityEngine.Rect viewRect, UnityEngine.Rect dockAreaRect) (at <1129d3b8df0448079e2ccfb85c3975ef>:0)
UnityEditor.DockArea.OldOnGUI () (at <1129d3b8df0448079e2ccfb85c3975ef>: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 <1c3fb9ac36654b3db61feb0cde09ed40>:0)
UnityEngine.UIElements.IMGUIContainer.HandleIMGUIEvent (UnityEngine.Event e, UnityEngine.Matrix4x4 worldTransform, UnityEngine.Rect clippingRect, System.Action onGUIHandler, System.Boolean canAffectFocus) (at <1c3fb9ac36654b3db61feb0cde09ed40>:0)
UnityEngine.UIElements.IMGUIContainer.HandleIMGUIEvent (UnityEngine.Event e, System.Action onGUIHandler, System.Boolean canAffectFocus) (at <1c3fb9ac36654b3db61feb0cde09ed40>:0)
UnityEngine.UIElements.IMGUIContainer.HandleIMGUIEvent (UnityEngine.Event e, System.Boolean canAffectFocus) (at <1c3fb9ac36654b3db61feb0cde09ed40>:0)
UnityEngine.UIElements.IMGUIContainer.SendEventToIMGUI (UnityEngine.UIElements.EventBase evt, System.Boolean canAffectFocus) (at <1c3fb9ac36654b3db61feb0cde09ed40>:0)
UnityEngine.UIElements.IMGUIContainer.HandleEvent (UnityEngine.UIElements.EventBase evt) (at <1c3fb9ac36654b3db61feb0cde09ed40>:0)
UnityEngine.UIElements.CallbackEventHandler.HandleEventAtTargetPhase (UnityEngine.UIElements.EventBase evt) (at <1c3fb9ac36654b3db61feb0cde09ed40>:0)
UnityEngine.UIElements.MouseCaptureDispatchingStrategy.DispatchEvent (UnityEngine.UIElements.EventBase evt, UnityEngine.UIElements.IPanel panel) (at <1c3fb9ac36654b3db61feb0cde09ed40>:0)
UnityEngine.UIElements.EventDispatcher.ApplyDispatchingStrategies (UnityEngine.UIElements.EventBase evt, UnityEngine.UIElements.IPanel panel, System.Boolean imguiEventIsInitiallyUsed) (at <1c3fb9ac36654b3db61feb0cde09ed40>:0)
UnityEngine.UIElements.EventDispatcher.ProcessEvent (UnityEngine.UIElements.EventBase evt, UnityEngine.UIElements.IPanel panel) (at <1c3fb9ac36654b3db61feb0cde09ed40>:0)
UnityEngine.UIElements.EventDispatcher.ProcessEventQueue () (at <1c3fb9ac36654b3db61feb0cde09ed40>:0)
UnityEngine.UIElements.EventDispatcher.OpenGate () (at <1c3fb9ac36654b3db61feb0cde09ed40>:0)
UnityEngine.UIElements.EventDispatcherGate.Dispose () (at <1c3fb9ac36654b3db61feb0cde09ed40>:0)
UnityEngine.UIElements.EventDispatcher.ProcessEvent (UnityEngine.UIElements.EventBase evt, UnityEngine.UIElements.IPanel panel) (at <1c3fb9ac36654b3db61feb0cde09ed40>:0)
UnityEngine.UIElements.EventDispatcher.Dispatch (UnityEngine.UIElements.EventBase evt, UnityEngine.UIElements.IPanel panel, UnityEngine.UIElements.DispatchMode dispatchMode) (at <1c3fb9ac36654b3db61feb0cde09ed40>:0)
UnityEngine.UIElements.BaseVisualElementPanel.SendEvent (UnityEngine.UIElements.EventBase e, UnityEngine.UIElements.DispatchMode dispatchMode) (at <1c3fb9ac36654b3db61feb0cde09ed40>:0)
UnityEngine.UIElements.UIElementsUtility.DoDispatch (UnityEngine.UIElements.BaseVisualElementPanel panel) (at <1c3fb9ac36654b3db61feb0cde09ed40>:0)
UnityEngine.UIElements.UIElementsUtility.ProcessEvent (System.Int32 instanceID, System.IntPtr nativeEventPtr) (at <1c3fb9ac36654b3db61feb0cde09ed40>:0)
UnityEngine.GUIUtility.ProcessEvent (System.Int32 instanceID, System.IntPtr nativeEventPtr) (at <5290814ab61745a89b1850f41273ab3a>:0)
@JLChnToZ
Copy link
Owner

JLChnToZ commented May 9, 2023

After confirm, this is a bug, will fix it in next version.

@JLChnToZ JLChnToZ self-assigned this May 9, 2023
@JLChnToZ
Copy link
Owner

I patched in 0.8.1, please update it.
If the problem still exists please re-open this issue.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants