Open Images pad not refreshed with new name when Save As is used

Bug #889728 reported by grofaty on 2011-11-13
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Pinta
Medium
Unassigned

Bug Description

Pinta 1.1 on Ubuntu 11.10:
1. Open some png file (my file is test.png).
2. Display "Open Images" pad (in development branch now "Images" pad). You will notice the test.png file in "Open Images" pad.
3. You can change something on canvas if you like. Then save the image with different name using File | Save As and name it like test2.png. If I understand correctly test2.png file should remain opened and previous file test.png should be closed. OK, now look at title bar. Notice test2.png in title bar, but in "Open Images" pad there is still "test.png".
4. In Open Images pad click on X beside "test.png" to close the file. And you will get the crash:
=================
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.OpenImagesListWidget.HandleTreeButtonPressEvent(Object o, ButtonPressEventArgs args)
   --- End of inner exception stack trace ---
   at System.RuntimeMethodHandle._InvokeMethodFast(Object target, Object[] arguments, SignatureStruct& sig, MethodAttributes methodAttributes, RuntimeTypeHandle typeOwner)
   at System.RuntimeMethodHandle.InvokeMethodFast(Object target, Object[] arguments, Signature sig, MethodAttributes methodAttributes, RuntimeTypeHandle typeOwner)
   at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture, Boolean skipVisibilityChecks)
   at System.Delegate.DynamicInvokeImpl(Object[] args)
   at GLib.Signal.ClosureInvokedCB(Object o, ClosureInvokedArgs args)
   at GLib.SignalClosure.Invoke(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)
=================

I can't reproduce the crash every time - strange. But all sort of strange things happens with this "non-opened" file, like unexpected close when saving the file etc.

If I understand correctly strange errors/crashes appear because Open Images pad is not refreshed with new name when image is renamed (Save As used).

Changed in pinta:
importance: Undecided → Medium
status: New → Confirmed
Cameron White (cameronwhite91) wrote :

I haven't been able to reproduce the crash, but I fixed the Open Images pad so that it is updated if a file is renamed (https://github.com/PintaProject/Pinta/commit/69a89084a5e5e2883bb242cfaa061d5ed54a82e3)

Changed in pinta:
milestone: none → 1.2
status: Confirmed → Fix Committed
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