Empty window - Unhandled exception errors

Bug #1425612 reported by Alan Horkan on 2015-02-25
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Pinta
Medium
Cameron White

Bug Description

Testing with pre 1.6.0
https://dl.dropboxusercontent.com/u/1481774/pinta-dev-1.6.0.0.exe

To reproduce,
Close all documents

Then choose Magic Wand Select from the Tools palette

Unhandled exception error

System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.InvalidOperationException: Tried to get WorkspaceManager.ActiveDocument when there are no open Documents. Check HasOpenDocuments first.
   at Pinta.Core.WorkspaceManager.get_ActiveDocument() in c:\Users\Jonathan\Documents\Pinta\Pinta.Core\Managers\WorkspaceManager.cs:line 64
   at Pinta.Tools.MagicWandTool.OnBuildToolBar(Toolbar tb) in c:\Users\Jonathan\Documents\Pinta\Pinta.Tools\Tools\MagicWandTool.cs:line 58
   at Pinta.Core.BaseTool.DoBuildToolBar(Toolbar tb) in c:\Users\Jonathan\Documents\Pinta\Pinta.Core\Classes\BaseTool.cs:line 134
   at Pinta.Core.ToolManager.SetCurrentTool(BaseTool tool) in c:\Users\Jonathan\Documents\Pinta\Pinta.Core\Managers\ToolManager.cs:line 150
   at Pinta.Core.ToolManager.HandlePbToolItemClicked(Object sender, EventArgs e) in c:\Users\Jonathan\Documents\Pinta\Pinta.Core\Managers\ToolManager.cs:line 94
   --- End of inner exception stack trace ---
   at System.RuntimeMethodHandle._InvokeMethodFast(IRuntimeMethodInfo method, Object target, Object[] arguments, SignatureStruct& sig, MethodAttributes methodAttributes, RuntimeType typeOwner)
   at System.RuntimeMethodHandle.InvokeMethodFast(IRuntimeMethodInfo method, Object target, Object[] arguments, Signature sig, MethodAttributes methodAttributes, RuntimeType 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)

Alan Horkan (horkana) wrote :

Downloaded 1.6.0.160 zip from Pinta Forge
http://forge.pinta-project.com/

the toolbox seems stable
can't trigger unhandled exception anymore.

Alan Horkan (horkana) on 2015-02-25
summary: - Empty window, Tools: Unhandled exception error
+ Empty window - Unhandled exception errors
Alan Horkan (horkana) wrote :

Still with 1.6.0.160
found other unhandled exceptions

Various menu items are not disabled and if you click
Layer, Delete layer
Layer, Merge Down
or
Image, Flatten

you get unhandled exception errors.

In the layers palette the buttons for
Delete layer
Merge Down
Move Down
have also not been disabled and cause unhandled exception errors.

Cameron White (cameronwhite91) wrote :

For me, all of those menu items are disabled if I don't have any open documents.

Alan Horkan (horkana) wrote :

Stranger and stranger.
I've looked at it again and I'm still seeing it in 1.6.0.160

Clearly there was some intermediate step that I didn't realise was making a difference. This time I was able to reproduce this repeatedly.

This time I opened an image, hit the duplicate layer button, then closed the image without saving.

The menu items are not disabled and cause the exceptions.

Changed in pinta:
importance: Undecided → Medium
milestone: none → 1.7
status: New → Confirmed
Cameron White (cameronwhite91) wrote :
Changed in pinta:
assignee: nobody → Cameron White (cameronwhite91)
status: Confirmed → Fix Committed
Alan Horkan (horkana) wrote :

Pinta Version 1.7.0.127

Mostly fixed but the move layer down button in the Layers dialog can still cause an exception

Alan Horkan (horkana) wrote :

previous comment should have said Layers palette (there's no Move Layer Down button in the Layers dialog)

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

Other bug subscribers