Error when using Crop to Selection after creating an ellipse selection

Bug #1313773 reported by Gevictorfr
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Pinta
Fix Released
High
Don McComb

Bug Description

Ubuntu 13.10- Pinta 1.3 and Pinta 1.4

Hi, I´ve used the ¨elipse select¨ feature several times, but yesterday I tried to used with a very little image 48x48 and after use ¨crop to selection¨ feature I get back an error.

I thought that it was impossible with a tiny image and ignored but, later, I tried with normal big picture and I get back the same or very similar error. Just with elipse select feature.

I purge the installation and reinstall (1.3). Same situation. I purge again and install the 1.4. A little different error. I copy the last error here and upload a file with all the error copies that I´ve copy.

Note: ¨elipse select¨ + copy or cut also create the error. Not matter what kind of picture.

Thanks for your work :D

Error with Pinta 1.4

System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.ArgumentNullException: Argument cannot be null.
Parameter name: src
  at (wrapper managed-to-native) System.Runtime.InteropServices.Marshal:copy_from_unmanaged (intptr,int,System.Array,int)
  at System.Runtime.InteropServices.Marshal.Copy (IntPtr source, System.Byte[] destination, Int32 startIndex, Int32 length) [0x00000] in <filename unknown>:0
  at Cairo.ImageSurface.get_Data () [0x00000] in <filename unknown>:0
  at Pinta.Core.CairoExtensions.ToPixbuf (Cairo.ImageSurface surfSource) [0x00000] in <filename unknown>:0
  at Pinta.Core.EditActions.HandlerPintaCoreActionsEditCopyActivated (System.Object sender, System.EventArgs e) [0x00000] in <filename unknown>:0
  at Pinta.Core.EditActions.HandlerPintaCoreActionsEditCutActivated (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

Tags: elipse
Revision history for this message
Gevictorfr (gevictorfr) wrote :
Revision history for this message
Cameron White (cameronwhite91) wrote :

Can you try the latest build of Pinta 1.5 from the daily builds PPA? (https://launchpad.net/~pinta-maintainers/+archive/pinta-daily). Several errors similar to the one you reported have been fixed recently.

Revision history for this message
Gevictorfr (gevictorfr) wrote :

Hi, I just did: Pinta 1.5

-At the beginning I was able to use elipse tool again in normal images :D

- Then I try to used it with a very little image again.

- Same result, error every time I use it no matter the image. The problem is that now the error is infinite, so I close the error message and appears again. sudo pkill pinta :(

System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.DivideByZeroException: Division by zero
  at Pinta.Core.DocumentWorkspace.set_Scale (Double value) [0x00000] in <filename unknown>:0
  at Pinta.Core.ImageActions.CropImageToRectangle (Pinta.Core.Document doc, Rectangle rect) [0x00000] in <filename unknown>:0
  at Pinta.Core.ImageActions.HandlePintaCoreActionsImageCropToSelectionActivated (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

Revision history for this message
Cameron White (cameronwhite91) wrote :

I'm able to reproduce this now, not sure why it didn't work for me before.

Changed in pinta:
importance: Undecided → High
milestone: none → 1.6
status: New → Confirmed
summary: - Elipse select error
+ Error when using Crop to Selection after creating an ellipse selection
Don McComb (don-mccomb)
Changed in pinta:
assignee: nobody → Don McComb (don-mccomb)
status: Confirmed → In Progress
Revision history for this message
Cameron White (cameronwhite91) wrote :

I can't reproduce this with the latest daily build, but I can with a 1.5 build, so this has been fixed.

Changed in pinta:
status: In Progress → Fix Committed
Changed in pinta:
status: Fix Committed → Fix Released
Revision history for this message
vedavata (vedavrata) wrote :

System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.ArgumentNullException: Argument cannot be null.
Parameter name: src
  at (wrapper managed-to-native) System.Runtime.InteropServices.Marshal:copy_from_unmanaged (intptr,int,System.Array,int)
  at System.Runtime.InteropServices.Marshal.Copy (IntPtr source, System.Byte[] destination, Int32 startIndex, Int32 length) [0x00000] in <filename unknown>:0
  at Cairo.ImageSurface.get_Data () [0x00000] in <filename unknown>:0
  at Pinta.Core.CairoExtensions.ToPixbuf (Cairo.ImageSurface surfSource) [0x00000] in <filename unknown>:0
  at Pinta.Core.EditActions.HandlerPintaCoreActionsEditCopyActivated (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

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Bug attachments

Remote bug watches

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