Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

Unity Console crashing when I click on a entry

Discussion in 'Editor & General Support' started by vitaliano_fanatee, Jul 1, 2021.

  1. vitaliano_fanatee

    vitaliano_fanatee

    Joined:
    Oct 9, 2020
    Posts:
    37
    Hi folks,
    I was trying to build an Android apk and some gradle errors popped in the Console, but when I clicked on one of the errors entries, the Console UI vanished and the error counter started to increase like crazy, clicking somewere else stopped the counter and restored the Console UI.

    This is the error log from the UI Crash:

    Code (CSharp):
    1. ArgumentOutOfRangeException: Index and length must refer to a location within the string.
    2. Parameter name: length
    3.   at System.String.Substring (System.Int32 startIndex, System.Int32 length) [0x0006a] in <695d1cc93cca45069c528c15c9fdd749>:0
    4.   at UnityEditor.ConsoleWindow.StacktraceWithHyperlinks (System.String stacktraceText, System.Int32 callstackTextStart) [0x00007] in <dc14d30a5e0540ee9311ed6df63d9074>:0
    5.   at UnityEditor.ConsoleWindow.OnGUI () [0x009f8] in <dc14d30a5e0540ee9311ed6df63d9074>:0
    6.   at UnityEditor.HostView.InvokeOnGUI (UnityEngine.Rect onGUIPosition, UnityEngine.Rect viewRect) [0x00064] in <dc14d30a5e0540ee9311ed6df63d9074>:0
    7.   at UnityEditor.DockArea.DrawView (UnityEngine.Rect viewRect, UnityEngine.Rect dockAreaRect) [0x00001] in <dc14d30a5e0540ee9311ed6df63d9074>:0
    8.   at UnityEditor.DockArea.OldOnGUI () [0x0019a] in <dc14d30a5e0540ee9311ed6df63d9074>:0
    9.   at 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) [0x0022c] in <001bec72e88e4f3a9eb0246a4215b1a5>:0
    10.   at UnityEngine.UIElements.IMGUIContainer.HandleIMGUIEvent (UnityEngine.Event e, UnityEngine.Matrix4x4 worldTransform, UnityEngine.Rect clippingRect, System.Action onGUIHandler, System.Boolean canAffectFocus) [0x000c4] in <001bec72e88e4f3a9eb0246a4215b1a5>:0
    11.   at UnityEngine.UIElements.IMGUIContainer.HandleIMGUIEvent (UnityEngine.Event e, System.Action onGUIHandler, System.Boolean canAffectFocus) [0x00015] in <001bec72e88e4f3a9eb0246a4215b1a5>:0
    12.   at UnityEngine.UIElements.IMGUIContainer.HandleIMGUIEvent (UnityEngine.Event e, System.Boolean canAffectFocus) [0x00009] in <001bec72e88e4f3a9eb0246a4215b1a5>:0
    13.   at UnityEngine.UIElements.IMGUIContainer.SendEventToIMGUIRaw (UnityEngine.UIElements.EventBase evt, System.Boolean canAffectFocus, System.Boolean verifyBounds) [0x00029] in <001bec72e88e4f3a9eb0246a4215b1a5>:0
    14.   at UnityEngine.UIElements.IMGUIContainer.SendEventToIMGUI (UnityEngine.UIElements.EventBase evt, System.Boolean canAffectFocus, System.Boolean verifyBounds) [0x00150] in <001bec72e88e4f3a9eb0246a4215b1a5>:0
    15.   at UnityEngine.UIElements.IMGUIContainer.HandleEvent (UnityEngine.UIElements.EventBase evt) [0x00059] in <001bec72e88e4f3a9eb0246a4215b1a5>:0
    16.   at UnityEngine.UIElements.EventDispatchUtilities.PropagateEvent (UnityEngine.UIElements.EventBase evt) [0x0012e] in <001bec72e88e4f3a9eb0246a4215b1a5>:0
    17.   at UnityEngine.UIElements.MouseEventDispatchingStrategy.SendEventToRegularTarget (UnityEngine.UIElements.EventBase evt, UnityEngine.UIElements.BaseVisualElementPanel panel) [0x00012] in <001bec72e88e4f3a9eb0246a4215b1a5>:0
    18.   at UnityEngine.UIElements.MouseEventDispatchingStrategy.SendEventToTarget (UnityEngine.UIElements.EventBase evt, UnityEngine.UIElements.BaseVisualElementPanel panel) [0x00001] in <001bec72e88e4f3a9eb0246a4215b1a5>:0
    19.   at UnityEngine.UIElements.MouseEventDispatchingStrategy.DispatchEvent (UnityEngine.UIElements.EventBase evt, UnityEngine.UIElements.IPanel iPanel) [0x00028] in <001bec72e88e4f3a9eb0246a4215b1a5>:0
    20.   at UnityEngine.UIElements.EventDispatcher.ApplyDispatchingStrategies (UnityEngine.UIElements.EventBase evt, UnityEngine.UIElements.IPanel panel, System.Boolean imguiEventIsInitiallyUsed) [0x00025] in <001bec72e88e4f3a9eb0246a4215b1a5>:0
    21.   at UnityEngine.UIElements.EventDispatcher.ProcessEvent (UnityEngine.UIElements.EventBase evt, UnityEngine.UIElements.IPanel panel) [0x00043] in <001bec72e88e4f3a9eb0246a4215b1a5>:0
    22.   at UnityEngine.UIElements.EventDispatcher.ProcessEventQueue () [0x00035] in <001bec72e88e4f3a9eb0246a4215b1a5>:0
    23.   at UnityEngine.UIElements.EventDispatcher.OpenGate () [0x0003b] in <001bec72e88e4f3a9eb0246a4215b1a5>:0
    24.   at UnityEngine.UIElements.EventDispatcherGate.Dispose () [0x00001] in <001bec72e88e4f3a9eb0246a4215b1a5>:0
    25.   at UnityEngine.UIElements.EventDispatcher.ProcessEvent (UnityEngine.UIElements.EventBase evt, UnityEngine.UIElements.IPanel panel) [0x00112] in <001bec72e88e4f3a9eb0246a4215b1a5>:0
    26.   at UnityEngine.UIElements.EventDispatcher.Dispatch (UnityEngine.UIElements.EventBase evt, UnityEngine.UIElements.IPanel panel, UnityEngine.UIElements.DispatchMode dispatchMode) [0x00046] in <001bec72e88e4f3a9eb0246a4215b1a5>:0
    27.   at UnityEngine.UIElements.BaseVisualElementPanel.SendEvent (UnityEngine.UIElements.EventBase e, UnityEngine.UIElements.DispatchMode dispatchMode) [0x0001a] in <001bec72e88e4f3a9eb0246a4215b1a5>:0
    28.   at UnityEngine.UIElements.UIElementsUtility.DoDispatch (UnityEngine.UIElements.BaseVisualElementPanel panel) [0x000d8] in <001bec72e88e4f3a9eb0246a4215b1a5>:0
    29.   at UnityEngine.UIElements.UIElementsUtility.UnityEngine.UIElements.IUIElementsUtility.ProcessEvent (System.Int32 instanceID, System.IntPtr nativeEventPtr, System.Boolean& eventHandled) [0x0003d] in <001bec72e88e4f3a9eb0246a4215b1a5>:0
    30.   at UnityEngine.UIElements.UIEventRegistration.ProcessEvent (System.Int32 instanceID, System.IntPtr nativeEventPtr) [0x0001a] in <001bec72e88e4f3a9eb0246a4215b1a5>:0
    31.   at UnityEngine.UIElements.UIEventRegistration+<>c.<.cctor>b__1_2 (System.Int32 i, System.IntPtr ptr) [0x00001] in <001bec72e88e4f3a9eb0246a4215b1a5>:0
    32.   at UnityEngine.GUIUtility.ProcessEvent (System.Int32 instanceID, System.IntPtr nativeEventPtr, System.Boolean& result) [0x00010] in <6ddf8eac3856492ab1b8cf42618915cc>:0
    I couldn't find the log that triggered all those UI errors, but if I find anything new I'll post it here.

    Cheers
     
  2. Doraemon231

    Doraemon231

    Joined:
    Dec 18, 2018
    Posts:
    22
    So do I

    ArgumentOutOfRangeException: Index and length must refer to a location within the string.

    Help!
     
  3. BlackPotionHQ

    BlackPotionHQ

    Joined:
    Aug 10, 2017
    Posts:
    1
    Same here :(
     
  4. Doraemon231

    Doraemon231

    Joined:
    Dec 18, 2018
    Posts:
    22
  5. Aillenia

    Aillenia

    Joined:
    Feb 7, 2018
    Posts:
    3
    The same error is also appearing in the 2021 version.
    And this error was added.
    Code (CSharp):
    1. GUI Error: You are pushing more GUIClips than you are popping. Make sure they are balanced.
     
  6. Doraemon231

    Doraemon231

    Joined:
    Dec 18, 2018
    Posts:
    22
    Also in the 2020 version. Help
     
  7. vitaliano_fanatee

    vitaliano_fanatee

    Joined:
    Oct 9, 2020
    Posts:
    37
    It looks like this is happening only when I click on a log entry with a large number of lines/characters. I'm trying to pin point the exact number.
     
  8. Doraemon231

    Doraemon231

    Joined:
    Dec 18, 2018
    Posts:
    22
    I think your 'Console Log' too long
    Use 'Open Editor Log' on the Console tap with right mouse click
     
  9. CasualT_Bossfight

    CasualT_Bossfight

    Joined:
    Oct 26, 2016
    Posts:
    8
    We have the same problem, a lot of our error callstacks are very large and clicking on one causes Unity's Console to break. I'm on Unity 2020.3.14f1.


    Code (CSharp):
    1. ArgumentOutOfRangeException: Index and length must refer to a location within the string.
    2. Parameter name: length
    3.   at System.String.Substring (System.Int32 startIndex, System.Int32 length) [0x0006a] in <695d1cc93cca45069c528c15c9fdd749>:0
    4.   at UnityEditor.ConsoleWindow.StacktraceWithHyperlinks (System.String stacktraceText, System.Int32 callstackTextStart) [0x00007] in <25e9afc147634a5ca855ab83fab425dd>:0
    5.   at UnityEditor.ConsoleWindow.OnGUI () [0x009f8] in <25e9afc147634a5ca855ab83fab425dd>:0
    6.   at UnityEditor.HostView.InvokeOnGUI (UnityEngine.Rect onGUIPosition, UnityEngine.Rect viewRect) [0x00064] in <25e9afc147634a5ca855ab83fab425dd>:0
    7.   at UnityEditor.DockArea.DrawView (UnityEngine.Rect viewRect, UnityEngine.Rect dockAreaRect) [0x00001] in <25e9afc147634a5ca855ab83fab425dd>:0
    8.   at UnityEditor.DockArea.OldOnGUI () [0x0019a] in <25e9afc147634a5ca855ab83fab425dd>:0
    9.   at 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) [0x0022c] in <270875aa25744a3b8d4f4ee5dc922b56>:0
    10.   at UnityEngine.UIElements.IMGUIContainer.HandleIMGUIEvent (UnityEngine.Event e, UnityEngine.Matrix4x4 worldTransform, UnityEngine.Rect clippingRect, System.Action onGUIHandler, System.Boolean canAffectFocus) [0x000c4] in <270875aa25744a3b8d4f4ee5dc922b56>:0
    11.   at UnityEngine.UIElements.IMGUIContainer.HandleIMGUIEvent (UnityEngine.Event e, System.Action onGUIHandler, System.Boolean canAffectFocus) [0x00015] in <270875aa25744a3b8d4f4ee5dc922b56>:0
    12.   at UnityEngine.UIElements.IMGUIContainer.HandleIMGUIEvent (UnityEngine.Event e, System.Boolean canAffectFocus) [0x00009] in <270875aa25744a3b8d4f4ee5dc922b56>:0
    13.   at UnityEngine.UIElements.IMGUIContainer.SendEventToIMGUIRaw (UnityEngine.UIElements.EventBase evt, System.Boolean canAffectFocus, System.Boolean verifyBounds) [0x00029] in <270875aa25744a3b8d4f4ee5dc922b56>:0
    14.   at UnityEngine.UIElements.IMGUIContainer.SendEventToIMGUI (UnityEngine.UIElements.EventBase evt, System.Boolean canAffectFocus, System.Boolean verifyBounds) [0x00150] in <270875aa25744a3b8d4f4ee5dc922b56>:0
    15.   at UnityEngine.UIElements.IMGUIContainer.HandleEvent (UnityEngine.UIElements.EventBase evt) [0x00059] in <270875aa25744a3b8d4f4ee5dc922b56>:0
    16.   at UnityEngine.UIElements.EventDispatchUtilities.PropagateEvent (UnityEngine.UIElements.EventBase evt) [0x0012e] in <270875aa25744a3b8d4f4ee5dc922b56>:0
    17.   at UnityEngine.UIElements.MouseEventDispatchingStrategy.SendEventToRegularTarget (UnityEngine.UIElements.EventBase evt, UnityEngine.UIElements.BaseVisualElementPanel panel) [0x00012] in <270875aa25744a3b8d4f4ee5dc922b56>:0
    18.   at UnityEngine.UIElements.MouseEventDispatchingStrategy.SendEventToTarget (UnityEngine.UIElements.EventBase evt, UnityEngine.UIElements.BaseVisualElementPanel panel) [0x00001] in <270875aa25744a3b8d4f4ee5dc922b56>:0
    19.   at UnityEngine.UIElements.MouseEventDispatchingStrategy.DispatchEvent (UnityEngine.UIElements.EventBase evt, UnityEngine.UIElements.IPanel iPanel) [0x00028] in <270875aa25744a3b8d4f4ee5dc922b56>:0
    20.   at UnityEngine.UIElements.EventDispatcher.ApplyDispatchingStrategies (UnityEngine.UIElements.EventBase evt, UnityEngine.UIElements.IPanel panel, System.Boolean imguiEventIsInitiallyUsed) [0x00025] in <270875aa25744a3b8d4f4ee5dc922b56>:0
    21.   at UnityEngine.UIElements.EventDispatcher.ProcessEvent (UnityEngine.UIElements.EventBase evt, UnityEngine.UIElements.IPanel panel) [0x00043] in <270875aa25744a3b8d4f4ee5dc922b56>:0
    22.   at UnityEngine.UIElements.EventDispatcher.ProcessEventQueue () [0x00035] in <270875aa25744a3b8d4f4ee5dc922b56>:0
    23.   at UnityEngine.UIElements.EventDispatcher.OpenGate () [0x0003b] in <270875aa25744a3b8d4f4ee5dc922b56>:0
    24.   at UnityEngine.UIElements.EventDispatcherGate.Dispose () [0x00001] in <270875aa25744a3b8d4f4ee5dc922b56>:0
    25.   at UnityEngine.UIElements.EventDispatcher.ProcessEvent (UnityEngine.UIElements.EventBase evt, UnityEngine.UIElements.IPanel panel) [0x00112] in <270875aa25744a3b8d4f4ee5dc922b56>:0
    26.   at UnityEngine.UIElements.EventDispatcher.Dispatch (UnityEngine.UIElements.EventBase evt, UnityEngine.UIElements.IPanel panel, UnityEngine.UIElements.DispatchMode dispatchMode) [0x00046] in <270875aa25744a3b8d4f4ee5dc922b56>:0
    27.   at UnityEngine.UIElements.BaseVisualElementPanel.SendEvent (UnityEngine.UIElements.EventBase e, UnityEngine.UIElements.DispatchMode dispatchMode) [0x0001a] in <270875aa25744a3b8d4f4ee5dc922b56>:0
    28.   at UnityEngine.UIElements.UIElementsUtility.DoDispatch (UnityEngine.UIElements.BaseVisualElementPanel panel) [0x000d8] in <270875aa25744a3b8d4f4ee5dc922b56>:0
    29.   at UnityEngine.UIElements.UIElementsUtility.UnityEngine.UIElements.IUIElementsUtility.ProcessEvent (System.Int32 instanceID, System.IntPtr nativeEventPtr, System.Boolean& eventHandled) [0x0003d] in <270875aa25744a3b8d4f4ee5dc922b56>:0
    30.   at UnityEngine.UIElements.UIEventRegistration.ProcessEvent (System.Int32 instanceID, System.IntPtr nativeEventPtr) [0x0001a] in <270875aa25744a3b8d4f4ee5dc922b56>:0
    31.   at UnityEngine.UIElements.UIEventRegistration+<>c.<.cctor>b__1_2 (System.Int32 i, System.IntPtr ptr) [0x00001] in <270875aa25744a3b8d4f4ee5dc922b56>:0
    32.   at UnityEngine.GUIUtility.ProcessEvent (System.Int32 instanceID, System.IntPtr nativeEventPtr, System.Boolean& result) [0x00010] in <6ddf8eac3856492ab1b8cf42618915cc>:0
    33.  
     
  10. koonm

    koonm

    Joined:
    Jan 5, 2016
    Posts:
    12
    it's case-based show a large log in ConsoleWindow;
    but in older Unity version, it will show "<message truncated>" at the last line.

    anyone konw how to fix it?
     
  11. koonm

    koonm

    Joined:
    Jan 5, 2016
    Posts:
    12
  12. eliteforcevn

    eliteforcevn

    Joined:
    Oct 25, 2018
    Posts:
    47
  13. koonm

    koonm

    Joined:
    Jan 5, 2016
    Posts:
    12
    for me, it's ok now in the version.
     
  14. ing_unity

    ing_unity

    Joined:
    Nov 30, 2020
    Posts:
    12
    Still happen in 2021.3.9f1
     
    ilmario likes this.