Exception in Text Tool when attempting to select beyond end of string.

Bug #1001536 reported by Cameron White
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Pinta
Fix Released
High
Olivier Dufour

Bug Description

With latest development build on Ubuntu 12.04:

1) Open text tool and type some text.
2) Move cursor to the start of the text.
3) Press Shift+Right repeatedly until all text is selected.
4) Press Shift+Right again, and an exception occurs:

System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.ArgumentOutOfRangeException: Argument is out of range.
Parameter name: index
  at System.Collections.Generic.List`1[System.String].get_Item (Int32 index) [0x00000] in <filename unknown>:0
  at Pinta.Tools.TextEngine.ForeachLine (Int32 startLine, Int32 startPos, Int32 len, Pinta.Tools.Action action) [0x00000] in <filename unknown>:0
  at Pinta.Tools.TextEngine.get_SelectionRectangles () [0x00000] in <filename unknown>:0
  at Pinta.Tools.TextTool.RedrawText (Boolean showCursor, Boolean useToolLayer) [0x00000] in <filename unknown>:0
  at Pinta.Tools.TextTool.OnKeyDown (Gtk.DrawingArea canvas, Gtk.KeyPressEventArgs args) [0x00000] in <filename unknown>:0
  at Pinta.Core.BaseTool.DoKeyPress (Gtk.DrawingArea canvas, Gtk.KeyPressEventArgs args) [0x00000] in <filename unknown>:0
  at Pinta.Gui.Widgets.PintaCanvas.PintaCanvas_KeyPressEvent (System.Object o, Gtk.KeyPressEventArgs e) [0x00000] in <filename unknown>:0
  at (wrapper managed-to-native) System.Reflection.MonoMethod:InternalInvoke (System.Reflection.MonoMethod,object,object[],System.Exception&)
  at System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) [0x00000] in <filename unknown>:0
  --- End of inner exception stack trace ---
  at System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) [0x00000] in <filename unknown>:0
  at System.Reflection.MethodBase.Invoke (System.Object obj, System.Object[] parameters) [0x00000] in <filename unknown>:0
  at System.Delegate.DynamicInvokeImpl (System.Object[] args) [0x00000] in <filename unknown>:0
  at System.MulticastDelegate.DynamicInvokeImpl (System.Object[] args) [0x00000] in <filename unknown>:0
  at System.Delegate.DynamicInvoke (System.Object[] args) [0x00000] in <filename unknown>:0
  at GLib.Signal.ClosureInvokedCB (System.Object o, GLib.ClosureInvokedArgs args) [0x00000] in <filename unknown>:0
  at GLib.SignalClosure.Invoke (GLib.ClosureInvokedArgs args) [0x00000] in <filename unknown>:0
  at GLib.SignalClosure.MarshalCallback (IntPtr raw_closure, IntPtr return_val, UInt32 n_param_vals, IntPtr param_values, IntPtr invocation_hint, IntPtr marshal_data) [0x00000] in <filename unknown>:0

tags: added: crash text-tool
Revision history for this message
Adolfo Jayme Barrientos (fitojb) wrote :

Confirmed here

Changed in pinta:
status: New → Incomplete
status: Incomplete → Confirmed
Revision history for this message
Olivier Dufour (olivier-duff) wrote :

patch sended

Changed in pinta:
status: Confirmed → Fix Committed
assignee: nobody → Olivier Dufour (olivier-duff)
grofaty (grofaty)
Changed in pinta:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.