Tasharen Entertainment Forum

Support => NGUI 3 Support => Topic started by: EToreo on November 26, 2013, 07:08:42 PM

Title: UIInput backspace crash
Post by: EToreo 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)
Title: Re: UIInput backspace crash
Post by: ArenMook on November 26, 2013, 11:44:04 PM
What do you mean by "past the end"?
Title: Re: UIInput backspace crash
Post by: EToreo 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.
Title: Re: UIInput backspace crash
Post by: ArenMook 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.
Title: Re: UIInput backspace crash
Post by: EToreo 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.