Empty window - Unhandled exception errors

Bug #1425612 reported by Alan Horkan
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Pinta
Fix Released
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)

Revision history for this message
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)
summary: - Empty window, Tools: Unhandled exception error
+ Empty window - Unhandled exception errors
Revision history for this message
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.

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

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

Revision history for this message
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
Revision history for this message
Cameron White (cameronwhite91) wrote :
Changed in pinta:
assignee: nobody → Cameron White (cameronwhite91)
status: Confirmed → Fix Committed
Revision history for this message
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

Revision history for this message
Alan Horkan (horkana) wrote :

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

Revision history for this message
Cameron White (cameronwhite91) wrote :
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.

Other bug subscribers

Remote bug watches

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