Flatpak 2.1.1: Random crash on attempt to switch between tools

Bug #2027916 reported by Vitaly Novichkov
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Pinta
New
Undecided
Unassigned

Bug Description

Sometimes I get a crash when selecting the Line/Curve tool. I do switch between rectangle with circular corners and the Line/Curve, and sometimes I get the crash. Also, I may get a crash when opening another file (and closing previous one) without closing the Pinta before.

The system: Linux Mint 21.1 (Ubuntu 22.04)

Now I finally got an error message (before, the Pinta had to just close without any errors):

```
System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation.
 ---> System.IndexOutOfRangeException: Index was outside the bounds of the array.
   at Pinta.Core.ToolManager.DeactivateTool(BaseTool tool, BaseTool newTool)
   at Pinta.Core.ToolManager.SetCurrentTool(BaseTool tool)
   at Pinta.Core.ToolManager.HandleToolBoxToolItemClicked(Object sender, EventArgs e)
   at System.RuntimeMethodHandle.InvokeMethod(Object target, Void** arguments, Signature sig, Boolean isConstructor)
   at System.Reflection.MethodInvoker.Invoke(Object obj, IntPtr* args, BindingFlags invokeAttr)
   --- End of inner exception stack trace ---
   at System.Reflection.MethodInvoker.Invoke(Object obj, IntPtr* args, BindingFlags invokeAttr)
   at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
   at System.Delegate.DynamicInvokeImpl(Object[] args)
   at GLib.Signal.ClosureInvokedCB(Object o, 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)
```

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

I haven't been able to reproduce this yet, but this may have been fixed in the master branch since the GTK4 port changed a bit of that code

https://github.com/PintaProject/Pinta/blob/master/Pinta.Core/Managers/ToolManager.cs#L249
vs
https://github.com/PintaProject/Pinta/blob/gtk3/Pinta.Core/Managers/ToolManager.cs#L242

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.