Crash using Text object and Undo

Bug #1419079 reported by grofaty
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Pinta
Confirmed
High
Unassigned

Bug Description

Jonathan Pobst's Pinta 1.6-prerelease for Windows from: https://dl.dropboxusercontent.com/u/1481774/pinta-dev-1.6.0.0.exe

Windows 7:

a) Open Pinta
b) Line/Curve and draw line on canvas
c) Text object and type some text on canvas
d) Now click Undo button from Tools one time. Works-fine.
e) Click Undo button again and crash appears:
===================
System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.InvalidCastException: Unable to cast object of type 'Pinta.Tools.TextTool' to type 'Pinta.Tools.ShapeTool'.
   at Pinta.Tools.BaseEditEngine.ActivateCorrespondingTool(ShapeTypes shapeType, Boolean permanentSwitch) in c:\Users\Jonathan\Documents\Pinta\Pinta.Tools\Editable\EditEngines\BaseEditEngine.cs:line 1807
   at Pinta.Tools.BaseEditEngine.ActivateCorrespondingTool(Int32 shapeIndex, Boolean permanentSwitch) in c:\Users\Jonathan\Documents\Pinta\Pinta.Tools\Editable\EditEngines\BaseEditEngine.cs:line 1785
   at Pinta.Tools.ShapesHistoryItem.Swap(Boolean redraw) in c:\Users\Jonathan\Documents\Pinta\Pinta.Tools\HistoryItems\ShapesHistoryItem.cs:line 165
   at Pinta.Tools.ShapesHistoryItem.Undo() in c:\Users\Jonathan\Documents\Pinta\Pinta.Tools\HistoryItems\ShapesHistoryItem.cs:line 88
   at Pinta.Core.DocumentWorkspaceHistory.Undo() in c:\Users\Jonathan\Documents\Pinta\Pinta.Core\Classes\DocumentWorkspaceHistory.cs:line 103
   at Pinta.Core.EditActions.HandlerPintaCoreActionsEditUndoActivated(Object sender, EventArgs e) in c:\Users\Jonathan\Documents\Pinta\Pinta.Core\Actions\EditActions.cs:line 312
   --- End of inner exception stack trace ---
   at System.Run.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor)
   at System.Reflection.RuntimeMethodInfo.UnsafeInvokeInternal(Object obj, Object[] parameters, Object[] arguments)
   at System.Delegate.DynamicInvokeImpl(Object[] args)
   at GLib.Signal.ClosureInvokedCB(Object o, ClosureInvokedArgs args)
   at GLib.SignalClosure.Invoke(ClosureInvokedArgs args)
   at GLib.SignalClosure.MarshalCallback(IntPtr raw_closure, IntPtr return_val, UInt32 n_param_vals, IntPtr param_values, IntPtr invocation_hint, IntPtr marshal_data)
===================

Changed in pinta:
importance: Undecided → High
milestone: none → 1.6
status: New → Confirmed
tags: added: line-tool text-tool
Revision history for this message
Robert Nordan (rpvn) wrote :

All of these line/curve and undo bugs are really symptoms of the same underlying event: When the undo or redo actions jump from the "finalized" History event that comes at the end of the line/curve drawing to the event before or after.

grofaty (grofaty)
tags: added: undo
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.