esperecyan / VRMConverterForVRChat

https://pokemori.booth.pm/items/1025226
Mozilla Public License 2.0
189 stars 23 forks source link

IndexOutOfRangeException and GUI Error #47

Closed SorcererPonse closed 2 years ago

SorcererPonse commented 2 years ago

This is an issue report for a conversion from VRChat to VRM. When attempting to convert this avatar: Diahorn

to a VRM file, I get these errors:

IndexOutOfRangeException: Index was outside the bounds of the array.
UnityEditor.MaskFieldGUI.GetMenuOptions (System.Int32 mask, System.String[] flagNames, System.Int32[] flagValues, System.String& buttonText, System.String[]& optionNames, System.Int32[]& optionMaskValues, System.Int32[]& selectedOptions) (at <a259d3c004024353a2c217da97495055>:0)
UnityEditor.MaskFieldGUI.DoMaskField (UnityEngine.Rect position, System.Int32 controlID, System.Int32 mask, System.String[] flagNames, System.Int32[] flagValues, UnityEngine.GUIStyle style, System.Int32& changedFlags, System.Boolean& changedToValue) (at <a259d3c004024353a2c217da97495055>:0)
UnityEditor.MaskFieldGUI.DoMaskField (UnityEngine.Rect position, System.Int32 controlID, System.Int32 mask, System.String[] flagNames, UnityEngine.GUIStyle style, System.Int32& changedFlags, System.Boolean& changedToValue) (at <a259d3c004024353a2c217da97495055>:0)
UnityEditor.MaskFieldGUI.DoMaskField (UnityEngine.Rect position, System.Int32 controlID, System.Int32 mask, System.String[] flagNames, UnityEngine.GUIStyle style) (at <a259d3c004024353a2c217da97495055>:0)
UnityEditor.EditorGUI.MaskFieldInternal (UnityEngine.Rect position, UnityEngine.GUIContent label, System.Int32 mask, System.String[] displayedOptions, UnityEngine.GUIStyle style) (at <a259d3c004024353a2c217da97495055>:0)
UnityEditor.EditorGUI.MaskField (UnityEngine.Rect position, System.String label, System.Int32 mask, System.String[] displayedOptions, UnityEngine.GUIStyle style) (at <a259d3c004024353a2c217da97495055>:0)
UnityEditor.EditorGUILayout.MaskField (System.String label, System.Int32 mask, System.String[] displayedOptions, UnityEngine.GUILayoutOption[] options) (at <a259d3c004024353a2c217da97495055>:0)
Esperecyan.Unity.VRMConverterForVRChat.UI.VRChatToVRMWizard.DrawWizardGUI () (at Library/PackageCache/jp.pokemori.vrm-converter-for-vrchat@38.0.2/Editor/UI/VRChatToVRMWizard.cs:226)
UnityEditor.ScriptableWizard.OnGUI () (at <a259d3c004024353a2c217da97495055>:0)
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 <a259d3c004024353a2c217da97495055>:0)
UnityEditor.HostView.Invoke (System.String methodName) (at <a259d3c004024353a2c217da97495055>:0)
UnityEditor.HostView.OldOnGUI () (at <a259d3c004024353a2c217da97495055>: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 <b6a7e1825c0b45d3b0729282e86cc687>:0)
UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr)

and

GUI Error: You are pushing more GUIClips than you are popping. Make sure they are balanced.
UnityEngine.GUIUtility:ProcessEvent (int,intptr)

The window also looks like this: http://puu.sh/Jc8Ea/2d60956afc.png

While I can select animations for the visible options, I cannot do anything else and the same IndexOutOfRangeException error will continue to spam the console as I interact with the window. This is the only avatar I have so far that does this. Manually making a VRM works, but as this option is a much faster way of properly converting shader options over and is much easier to deal with overall, I was wondering if there was a potential solution for this other than the manual option? I am willing to supply files if necessary. Thank you in advance!

esperecyan commented 2 years ago

Thank you for your report. I fixed in v38.0.3.