Author Topic: UIInput backspace crash  (Read 3530 times)

EToreo

  • Jr. Member
  • **
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 88
    • View Profile
UIInput backspace crash
« on: November 26, 2013, 07:08:42 PM »
I type past the end of a input field and then press backspace to get this crash:

ArgumentOutOfRangeException: startIndex + count > this.length
Parameter name: count
System.String.Remove (Int32 startIndex, Int32 count) (at /Applications/buildAgent/work/c514da0c8183631c/mcs/class/corlib/System/String.cs:1747)
UnityEngine.TextEditor.Backspace () (at C:/BuildAgent/work/ea95e74f6e5f192d/Runtime/Export/TextEditor.cs:166)
UIInput.ProcessEvent (UnityEngine.Event ev) (at Assets/NGUI/Scripts/UI/UIInput.cs:504)
UIInput.OnGUI () (at Assets/NGUI/Scripts/UI/UIInput.cs:486)

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: UIInput backspace crash
« Reply #1 on: November 26, 2013, 11:44:04 PM »
What do you mean by "past the end"?

EToreo

  • Jr. Member
  • **
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 88
    • View Profile
Re: UIInput backspace crash
« Reply #2 on: December 06, 2013, 04:12:51 AM »
What do you mean by "past the end"?

Sorry, for what ever reason, I did not get a notification that you had responded.

"Past the end" means past the end of the text field's horizontal area.  So if I have 50 charters worth of horizontal space and I type 51 characters, then backspace, it will crash.

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: UIInput backspace crash
« Reply #3 on: December 06, 2013, 04:18:52 AM »
It all seems to work fine here, so if you have the latest version and run into this issue I can use a repro case to look at. Just please don't post it here -- send it to support at tasharen.com.

EToreo

  • Jr. Member
  • **
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 88
    • View Profile
Re: UIInput backspace crash
« Reply #4 on: December 06, 2013, 04:23:22 AM »
Will do.  If the latest version doesn't fix it, hopefully I can create a test case.  It only happens with one or two of my text boxes.