Kinematic Object Manager Error

I was having some issues with DSU integration, and after talking to Tony I decided to delete all UCC and DSU files and reimport all of them. After reinstalling UCC my player character does not move and I get the following error. Please advise on where I should look to fix the issue:

IndexOutOfRangeException: Index was outside the bounds of the array.
Opsive.UltimateCharacterController.Game.KinematicObjectManager.SetCharacterMovementInputInternal (System.Int32 characterIndex, System.Single horizontalMovement, System.Single forwardMovement) (at Assets/Opsive/UltimateCharacterController/Scripts/Game/KinematicObjectManager.cs:521)
Opsive.UltimateCharacterController.Game.KinematicObjectManager.SetCharacterMovementInput (System.Int32 characterIndex, System.Single horizontalMovement, System.Single forwardMovement) (at Assets/Opsive/UltimateCharacterController/Scripts/Game/KinematicObjectManager.cs:510)
Opsive.UltimateCharacterController.Character.UltimateCharacterLocomotionHandler.Update () (at Assets/Opsive/UltimateCharacterController/Scripts/Character/UltimateCharacterLocomotionHandler.cs:71)
 
And here is what I am getting if I try to check the "Existing Character" in the character manager, in the editor window. I am wondering what did I break so badly?

NullReferenceException: Object reference not set to an instance of an object
Opsive.UltimateCharacterController.StateSystem.StateConfiguration.GetProfilesForGameObject (UnityEngine.GameObject gameObject, Opsive.UltimateCharacterController.StateSystem.StateConfiguration+Profile+ProfileType type) (at Assets/Opsive/UltimateCharacterController/Scripts/StateSystem/StateConfiguration.cs:176)
Opsive.UltimateCharacterController.Editor.Managers.CharacterManager.DrawProfileFields (Opsive.UltimateCharacterController.StateSystem.StateConfiguration& stateConfiguration, System.Int32& profileIndex, System.String& profileName, UnityEngine.GameObject character) (at Assets/Opsive/UltimateCharacterController/Editor/Managers/CharacterManager.cs:541)
Opsive.UltimateCharacterController.Editor.Managers.CharacterManager.DrawExistingCharacter () (at Assets/Opsive/UltimateCharacterController/Editor/Managers/CharacterManager.cs:637)
Opsive.UltimateCharacterController.Editor.Managers.CharacterManager.OnGUI () (at Assets/Opsive/UltimateCharacterController/Editor/Managers/CharacterManager.cs:177)
Opsive.UltimateCharacterController.Editor.Managers.MainManagerWindow.OnManagerGUI () (at Assets/Opsive/UltimateCharacterController/Editor/Managers/MainManagerWindow.cs:417)
Opsive.UltimateCharacterController.Editor.Managers.MainManagerWindow.OnGUI () (at Assets/Opsive/UltimateCharacterController/Editor/Managers/MainManagerWindow.cs:320)
System.Reflection.MonoMethod.Invoke (System.Object obj, System.Reflection.BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) (at <1f0c1ef1ad524c38bbc5536809c46b48>: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 <1f0c1ef1ad524c38bbc5536809c46b48>:0)
System.Reflection.MethodBase.Invoke (System.Object obj, System.Object[] parameters) (at <1f0c1ef1ad524c38bbc5536809c46b48>:0)
UnityEditor.HostView.Invoke (System.String methodName, System.Object obj) (at C:/buildslave/unity/build/Editor/Mono/HostView.cs:345)
UnityEditor.HostView.Invoke (System.String methodName) (at C:/buildslave/unity/build/Editor/Mono/HostView.cs:339)
UnityEditor.HostView.InvokeOnGUI (UnityEngine.Rect onGUIPosition, UnityEngine.Rect viewRect) (at C:/buildslave/unity/build/Editor/Mono/HostView.cs:315)
UnityEditor.DockArea.DrawView (UnityEngine.Rect viewRect, UnityEngine.Rect dockAreaRect, System.Boolean floatingWindow, System.Boolean isBottomTab) (at C:/buildslave/unity/build/Editor/Mono/GUI/DockArea.cs:373)
UnityEditor.DockArea.OldOnGUI () (at C:/buildslave/unity/build/Editor/Mono/GUI/DockArea.cs:340)
UnityEngine.UIElements.IMGUIContainer.DoOnGUI (UnityEngine.Event evt, UnityEngine.Matrix4x4 parentTransform, UnityEngine.Rect clippingRect, System.Boolean isComputingLayout, UnityEngine.Rect layoutSize) (at C:/buildslave/unity/build/Modules/UIElements/IMGUIContainer.cs:278)
UnityEngine.GUIUtility:processEvent(Int32, IntPtr)

GUI Error: You are pushing more GUIClips than you are popping. Make sure they are balanced.
UnityEngine.GUIUtility:processEvent(Int32, IntPtr)
 
It looks like your character isn't being enabled but the values are trying to be set. Are you able to tell me how to reproduce it within a fresh project?
 
When I first imported First Person Controller, the perspective selection screen was displayed and I was then shown the IndexOutOfRangeException message in the original post with no ability to dismiss the screen, called from the Update() method on line 66 of <Project Root>\Assets\Opsive\UltimateCharacterController\Scripts\Character\UltimateCharacterLocomotionHandler.cs, as in the original post. I found the call to the KinematicObjectManager.SetCharacterMovementInput() method in the OnEnableGameplayInput() method around line 290 in the same file has the following check

{
C#:
if (m_CharacterLocomotion.KinematicObjectIndex != -1) {

I copied this check in the Update method and the error message disappeared, changed the code as follows

OLD
{
C#:
private void Update()
{
    // The input should be retrieved within Update. The KinematicObjectManager will then move the character according to the input.
    m_HorizontalMovement = m_PlayerInput.GetAxisRaw(m_HorizontalInputName);
    m_ForwardMovement = m_PlayerInput.GetAxisRaw(m_ForwardInputName);
    KinematicObjectManager.SetCharacterMovementInput(m_CharacterLocomotion.KinematicObjectIndex, m_HorizontalMovement, m_ForwardMovement);

    UpdateAbilityInput();
}{

NEW
{
C#:
private void Update()
{
    // The input should be retrieved within Update. The KinematicObjectManager will then move the character according to the input.
    if (m_CharacterLocomotion.KinematicObjectIndex != -1)
    {
        m_HorizontalMovement = m_PlayerInput.GetAxisRaw(m_HorizontalInputName);
        m_ForwardMovement = m_PlayerInput.GetAxisRaw(m_ForwardInputName);
        KinematicObjectManager.SetCharacterMovementInput(m_CharacterLocomotion.KinematicObjectIndex, m_HorizontalMovement, m_ForwardMovement);

        UpdateAbilityInput();
    }
}{

I should note that while placing Debug.Log() messages, the issue of getting stuck at the perspective selection screen resolved after a restart of Unity. I had already restarted Unity several times. After the perspective selection screen went away, the new debug messages showed KinematicObjectIndex had values of both zero and negative one (0, -1).

I could not lose 4 hours rebuilding the lighting, so I updated the code to get the index out of range error message out of the logs. Unfortunately I do not have time to verify this fix. If someone has this issue and updating the Update() method helps, please let me know in the comments below.
 
When I first imported First Person Controller, the perspective selection screen was displayed and I was then shown the IndexOutOfRangeException message in the original post with no ability to dismiss the screen,
With just the First Person Controller imported the Ultimate Character Controller demo scene won't work correctly. The First Person Controller demo scene will though. The Ultimate Character Controller demo scene is for if you have both FPC and TPC imported.
 
Top