Automatic Crop - if no image is opened then crash appears

Bug #892742 reported by grofaty on 2011-11-20
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Pinta
Medium
Robert Nordan

Bug Description

The latest development version of Pinta on Ubuntu 11.10:
1. Close all images in Pinta.
2. Use Image | Automatic Crop.
Pinta crashes with error:
==========
System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.InvalidOperationException: Tried to get WorkspaceManager.ActiveDocument when there are no open Documents. Check HasOpenDocuments first.
  at Pinta.Core.WorkspaceManager.get_ActiveDocument () [0x00000] in <filename unknown>:0
  at Pinta.Core.ImageActions.HandlePintaCoreActionsImageAutoCropActivated (System.Object sender, System.EventArgs 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
==========

Robert Nordan (rpvn) wrote :

Doh! Should have thought of that. Will fix along with the keyboard shortcut and naming.

Changed in pinta:
status: New → Confirmed
importance: Undecided → Medium
assignee: nobody → Robert Nordan (rpvn)
Robert Nordan (rpvn) wrote :
Changed in pinta:
status: Confirmed → Fix Committed
Changed in pinta:
milestone: none → 1.2
Robert Nordan (rpvn) on 2012-04-22
Changed in pinta:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers