pinta repeatedly displays "System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.AggregateException: One or more errors occurred. ---> System.NullReferenceException: Object reference not set to an instance of an object"

Bug #1577237 reported by Karl-Philipp Richter
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
pinta (Ubuntu)
Confirmed
Undecided
Unassigned

Bug Description

After selecting an area `pinta` repeatedly displays an exception dialog with stacktrace

    System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.AggregateException: One or more errors occurred. ---> System.NullReferenceException: Object reference not set to an instance of an object
      at Pinta.Core.GradientRenderer.ProcessGradientLine (Byte startAlpha, Byte endAlpha, Int32 y, Rectangle rect, Cairo.ImageSurface surface, Pinta.Core.ColorBgra* src_data_ptr, Int32 src_width) <0x40ceb660 + 0x002ce> in <filename unknown>:0
      at Pinta.Core.GradientRenderer+<Render>c__AnonStorey1.<>m__0 (Int32 y) <0x40ceb350 + 0x00077> in <filename unknown>:0
      at System.Threading.Tasks.Parallel+<PartitionerForEachWorker>c__AnonStorey7`2[TSource,TLocal].<>m__1 () <0x40ce4950 + 0x0049e> in <filename unknown>:0
      --- End of inner exception stack trace ---
      at System.Threading.Tasks.Task.ThrowIfExceptional (Boolean includeTaskCanceledExceptions) <0x7f0d2309d920 + 0x00037> in <filename unknown>:0
      at System.Threading.Tasks.Task.Wait (Int32 millisecondsTimeout, CancellationToken cancellationToken) <0x7f0d2309ed90 + 0x000c7> in <filename unknown>:0
      at System.Threading.Tasks.Task.Wait () <0x7f0d2309ec80 + 0x00028> in <filename unknown>:0
      at System.Threading.Tasks.Parallel.PartitionerForEachWorker[TSource,TLocal] (System.Collections.Concurrent.Partitioner`1 source, System.Threading.Tasks.ParallelOptions parallelOptions, System.Action`1 simpleBody, System.Action`2 bodyWithState, System.Action`3 bodyWithStateAndIndex, System.Func`4 bodyWithStateAndLocal, System.Func`5 bodyWithEverything, System.Func`1 localInit, System.Action`1 localFinally) <0x40cd2c70 + 0x008a0> in <filename unknown>:0
    ---> (Inner Exception #0) System.NullReferenceException: Object reference not set to an instance of an object
      at Pinta.Core.GradientRenderer.ProcessGradientLine (Byte startAlpha, Byte endAlpha, Int32 y, Rectangle rect, Cairo.ImageSurface surface, Pinta.Core.ColorBgra* src_data_ptr, Int32 src_width) <0x40ceb660 + 0x002ce> in <filename unknown>:0
      at Pinta.Core.GradientRenderer+<Render>c__AnonStorey1.<>m__0 (Int32 y) <0x40ceb350 + 0x00077> in <filename unknown>:0
      at System.Threading.Tasks.Parallel+<PartitionerForEachWorker>c__AnonStorey7`2[TSource,TLocal].<>m__1 () <0x40ce4950 + 0x0049e> 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) <0x7f0d231ab9e0 + 0x000ef> in <filename unknown>:0
      at System.Reflection.MethodBase.Invoke (System.Object obj, System.Object[] parameters) <0x7f0d22fe3cf0 + 0x0002a> in <filename unknown>:0
      at System.Delegate.DynamicInvokeImpl (System.Object[] args) <0x7f0d23263f60 + 0x0024c> in <filename unknown>:0
      at System.MulticastDelegate.DynamicInvokeImpl (System.Object[] args) <0x7f0d2326c040 + 0x00035> in <filename unknown>:0
      at System.Delegate.DynamicInvoke (System.Object[] args) <0x7f0d23263e80 + 0x00019> in <filename unknown>:0
      at System.MulticastDelegate.DynamicInvokeImpl (System.Object[] args) <0x7f0d2326c040 + 0x0006d> in <filename unknown>:0
      at System.Delegate.DynamicInvoke (System.Object[] args) <0x7f0d23263e80 + 0x00019> in <filename unknown>:0
      at GLib.Signal.ClosureInvokedCB (System.Object o, GLib.ClosureInvokedArgs args) <0x41c39bf0 + 0x00153> in <filename unknown>:0
      at GLib.SignalClosure.Invoke (GLib.ClosureInvokedArgs args) <0x41c39bb0 + 0x0002f> 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) <0x41c38540 + 0x005df> in <filename unknown>:0

ProblemType: Bug
DistroRelease: Ubuntu 16.04
Package: pinta 1.6-2
Uname: Linux 4.5.2-040502-generic x86_64
ApportVersion: 2.20.1-0ubuntu2
Architecture: amd64
CurrentDesktop: Unity
Date: Sun May 1 22:42:08 2016
InstallationDate: Installed on 2015-12-12 (141 days ago)
InstallationMedia: Ubuntu 15.10 "Wily Werewolf" - Release amd64 (20151021)
PackageArchitecture: all
SourcePackage: pinta
UpgradeStatus: Upgraded to xenial on 2016-03-14 (48 days ago)

Revision history for this message
Karl-Philipp Richter (krichter722) wrote :
Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in pinta (Ubuntu):
status: New → Confirmed
Revision history for this message
Mike Eggleston (meggva) wrote :
Download full text (4.3 KiB)

I had similar issue under Ubuntu 20.04.6 LTS opening and pasting second new image.
Also had other Pinta crashes thats made me use GNU which is too much for my use.
I didn't have any crashes while running Ubuntu 18 that I can remember or at least not the frequency since I upgraded to Ubuntu 20.04 and Pinta 1.7.1.
So I finally was going to open a bug report but found this 2016 similar bug.
Do you need me to open a new bug report and what doc needs to be gathered?
Unhandled Execption:
Exception has been thrown by the target of an invocation.

Details
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 Pinta.Gui.Widgets.CanvasRenderer.get_OffsetLayer () [0x00042] in <4b6bf512a4f54b1caeb747238f48b70c>:0
  at Pinta.Gui.Widgets.CanvasRenderer.CreateOffsetLayer (Pinta.Core.Layer original) [0x00001] in <4b6bf512a4f54b1caeb747238f48b70c>:0
  at Pinta.Gui.Widgets.CanvasRenderer.Render (System.Collections.Generic.List`1[T] layers, Cairo.ImageSurface dst, Gdk.Point offset) [0x000af] in <4b6bf512a4f54b1caeb747238f48b70c>:0
  at Pinta.Gui.Widgets.LayersListWidget.Reset () [0x000d2] in <4b6bf512a4f54b1caeb747238f48b70c>:0
  at Pinta.Gui.Widgets.LayersListWidget.HandleHistoryItemAdded (System.Object sender, System.EventArgs e) [0x00001] in <4b6bf512a4f54b1caeb747238f48b70c>: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) [0x00019] in <a4889b1da6f14fd68fb8fe10729e7f1d>:0
  at Pinta.Core.DocumentWorkspaceHistory.PushNewItem (Pinta.Core.BaseHistoryItem newItem) [0x00117] in <a4889b1da6f14fd68fb8fe10729e7f1d>:0
  at Pinta.Core.HistoryManager.PushNewItem (Pinta.Core.BaseHistoryItem newItem) [0x00010] in <a4889b1da6f14fd68fb8fe10729e7f1d>:0
  at Pinta.Tools.MoveSelectedTool.OnFinishTransform (Cairo.Matrix transform) [0x00049] in <6b2549ee3b5d45fd8a1e7fd000a086f4>:0
  at Pinta.Tools.BaseTransformTool.OnMouseUp (Gtk.DrawingArea canvas, Gtk.ButtonReleaseEventArgs args, Cairo.PointD point) [0x0001c] in <6b2549ee3b5d45fd8a1e7fd000a086f4>:0
  at Pinta.Core.BaseTool.DoMouseUp (Gtk.DrawingArea canvas, Gtk.ButtonReleaseEventArgs args, Cairo.PointD point) [0x00030] in <a4889b1da6f14fd68fb8fe10729e7f1d>:0
  at Pinta.Gui.Widgets.PintaCanvas+<PintaCanvas>c__AnonStorey0.<>m__3 (System.Object sender, Gtk.ButtonReleaseEventArgs e) [0x00038] in <4b6bf512a4f54b1caeb747238f48b70c>: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) [0x0007c] in <12b418a7818c4ca0893feeaaf67f1e7f>:0
   --- End of inner exception stack trace ---
  at System.Reflection.RuntimeMethodInfo.Invoke (System.Object obj, System.Reflection.Bindi...

Read more...

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

Probably no need to add a new bug report since there have been many similar ones due to the old version of Pinta and Mono that Ubuntu still ships.
Upgrading to the latest version of Mono has sometimes fixed the crashes (https://www.mono-project.com/download/stable/#download-lin)

However, my recommendation is to upgrade to Pinta 2.1 either by using the snap or flatpak packages, or by installing the PPA from https://xtradeb.net/apps/pinta/ which recently got Pinta 2.1 packaged as a .deb

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.