Crash with 1.7.1

Bug #1953078 reported by Nico
12
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Pinta
Fix Released
Medium
Unassigned

Bug Description

With the update to 1.7.1 it happens to me, that Pinta crashes sometimes. I cannot reproduce it, but this time it was when moving a layer position. Here is the stack trace:

```
System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.NullReferenceException: Object reference not set to an instance of an object
  at Cairo.Context..ctor (Cairo.Surface surface) [0x00000] in <de76a7ad0aa84dfe82dca84f7376bcb1>:0
  at Pinta.Core.CairoExtensions.Clear (Cairo.ImageSurface surface) [0x00001] in <58b378bd67ff4eb68b9cfec964986533>:0
  at Pinta.Gui.Widgets.CanvasRenderer.CreateOffsetLayer (Pinta.Core.Layer original) [0x0000e] in <ffdcf9c12be04ea99b21bf86f5860bee>:0
  at Pinta.Gui.Widgets.CanvasRenderer.Render (System.Collections.Generic.List`1[T] layers, Cairo.ImageSurface dst, Gdk.Point offset) [0x000b2] in <ffdcf9c12be04ea99b21bf86f5860bee>:0
  at Pinta.Gui.Widgets.LayersListWidget.Reset () [0x000db] in <ffdcf9c12be04ea99b21bf86f5860bee>:0
  at Pinta.Gui.Widgets.LayersListWidget.HandleHistoryItemAdded (System.Object sender, System.EventArgs e) [0x00001] in <ffdcf9c12be04ea99b21bf86f5860bee>:0
  at (wrapper delegate-invoke) System.EventHandler`1[Pinta.Core.HistoryItemAddedEventArgs].invoke_void_object_TEventArgs(object,Pinta.Core.HistoryItemAddedEventArgs)
  at Pinta.Core.HistoryManager.OnHistoryItemAdded (Pinta.Core.BaseHistoryItem item) [0x0001b] in <58b378bd67ff4eb68b9cfec964986533>:0
  at Pinta.Core.DocumentWorkspaceHistory.PushNewItem (Pinta.Core.BaseHistoryItem newItem) [0x00123] in <58b378bd67ff4eb68b9cfec964986533>:0
  at Pinta.Core.HistoryManager.PushNewItem (Pinta.Core.BaseHistoryItem newItem) [0x00010] in <58b378bd67ff4eb68b9cfec964986533>:0
  at Pinta.Tools.MoveSelectedTool.OnFinishTransform (Cairo.Matrix transform) [0x00047] in <03eff47cd58e45dfb61eb4d487f72bfb>:0
  at Pinta.Tools.BaseTransformTool.OnMouseUp (Gtk.DrawingArea canvas, Gtk.ButtonReleaseEventArgs args, Cairo.PointD point) [0x0001b] in <03eff47cd58e45dfb61eb4d487f72bfb>:0
  at Pinta.Core.BaseTool.DoMouseUp (Gtk.DrawingArea canvas, Gtk.ButtonReleaseEventArgs args, Cairo.PointD point) [0x00033] in <58b378bd67ff4eb68b9cfec964986533>:0
  at Pinta.Gui.Widgets.PintaCanvas+<>c__DisplayClass8_0.<.ctor>b__3 (System.Object sender, Gtk.ButtonReleaseEventArgs e) [0x00038] in <ffdcf9c12be04ea99b21bf86f5860bee>:0
  at (wrapper managed-to-native) System.Reflection.RuntimeMethodInfo.InternalInvoke(System.Reflection.RuntimeMethodInfo,object,object[],System.Exception&)
  at System.Reflection.RuntimeMethodInfo.Invoke (System.Object obj, System.Reflection.BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) [0x0006a] in <62b430b945fa49a19a75382ef03e7bed>:0
   --- End of inner exception stack trace ---
  at System.Reflection.RuntimeMethodInfo.Invoke (System.Object obj, System.Reflection.BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) [0x00083] in <62b430b945fa49a19a75382ef03e7bed>:0
  at System.Reflection.MethodBase.Invoke (System.Object obj, System.Object[] parameters) [0x00000] in <62b430b945fa49a19a75382ef03e7bed>:0
  at System.Delegate.DynamicInvokeImpl (System.Object[] args) [0x000e7] in <62b430b945fa49a19a75382ef03e7bed>:0
  at System.MulticastDelegate.DynamicInvokeImpl (System.Object[] args) [0x00008] in <62b430b945fa49a19a75382ef03e7bed>:0
  at System.Delegate.DynamicInvoke (System.Object[] args) [0x00000] in <62b430b945fa49a19a75382ef03e7bed>:0
  at GLib.Signal.ClosureInvokedCB (System.Object o, GLib.ClosureInvokedArgs args) [0x0007d] in <ed39f21b9e9343dcbd442a17ad356a9f>:0
  at GLib.Signal+SignalClosure.Invoke (GLib.ClosureInvokedArgs args) [0x0000c] in <ed39f21b9e9343dcbd442a17ad356a9f>:0
  at GLib.Signal+SignalClosure.MarshalCallback (System.IntPtr raw_closure, GLib.Value* return_val, System.UInt32 n_param_vals, GLib.Value* param_values, System.IntPtr invocation_hint, System.IntPtr marshal_data) [0x000b1] in <ed39f21b9e9343dcbd442a17ad356a9f>:0
```

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

Thanks for the report! I haven't been able to reproduce it yet
To confirm, have you encountered this in v1.7 or only in 1.7.1?

Revision history for this message
Nico (nicohood) wrote :

Only in 1.7.1 at least twice.

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

I've found repro steps:

- Make a selection and use Move Selected Pixels to move it around
- Use Image -> Resize Image to change the size, e.g. to 105%
- Try to use Move Selected Pixels again

I'll mark the other issue as a duplicate since they look like the same crash.

Changed in pinta:
importance: Undecided → Medium
milestone: none → 1.7.2
status: New → Triaged
Revision history for this message
Cameron White (cameronwhite91) wrote :

Fixed by https://github.com/PintaProject/Pinta/commit/46dca467420ce435e1d4406fe6ba136505a7b99d (this issue wasn't in the gtk3 / master branch)

Changed in pinta:
status: Triaged → Fix Committed
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.

Duplicates of this bug

Other bug subscribers

Remote bug watches

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