Exception when saving ora on Mac

Bug #1006753 reported by Hauke Duden on 2012-05-31
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Cameron White

Bug Description

This is on MacOS 10.7.4 with Mono 2.10.9_11 and Pinta 1.3

Steps to reproduce:

1) Create new blank image
2) Save - choose ORA file format

=> Exception that ICSharpCode.SharpZipLib is not found (see below for trace)

I have checked in /Library/Frameworks/Mono.framework/Versions/2.10.9/lib/mono/gac/ICSharpCode.SharpZipLib
and I see the following versions of SharpZipLib

Exception trace:

System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.IO.FileNotFoundException: Could not load file or assembly 'ICSharpCode.SharpZipLib, Version=, Culture=neutral, PublicKeyToken=1b03e6acf1164f73' or one of its dependencies.
File name: 'ICSharpCode.SharpZipLib, Version=, Culture=neutral, PublicKeyToken=1b03e6acf1164f73'
  at Pinta.Actions.SaveDocumentImplmentationAction.SaveFile (Pinta.Core.Document document, System.String file, Pinta.Core.FormatDescriptor format) [0x00000] in <filename unknown>:0
  at Pinta.Actions.SaveDocumentImplmentationAction.SaveFileAs (Pinta.Core.Document document) [0x00000] in <filename unknown>:0
  at Pinta.Actions.SaveDocumentImplmentationAction.Activated (System.Object sender, Pinta.Core.DocumentCancelEventArgs e) [0x00000] in <filename unknown>:0
  at Pinta.Core.FileActions.RaiseSaveDocument (Pinta.Core.Document document, Boolean saveAs) [0x00000] in <filename unknown>:0
  at Pinta.Core.Document.Save (Boolean saveAs) [0x00000] in <filename unknown>:0
  at Pinta.Actions.SaveDocumentAsAction.Activated (System.Object sender, System.EventArgs e) [0x00000] in <filename unknown>:0
  at (wrapper managed-to-native) System.Reflection.MonoMethod:InternalInvoke (System.Reflection.MonoMethod,object,object[],System.Exception&)
  at System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) [0x00000] 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) [0x00000] in <filename unknown>:0
  at System.Reflection.MethodBase.Invoke (System.Object obj, System.Object[] parameters) [0x00000] in <filename unknown>:0
  at System.Delegate.DynamicInvokeImpl (System.Object[] args) [0x00000] in <filename unknown>:0
  at System.MulticastDelegate.DynamicInvokeImpl (System.Object[] args) [0x00000] in <filename unknown>:0
  at System.Delegate.DynamicInvoke (System.Object[] args) [0x00000] in <filename unknown>:0
  at GLib.Signal.ClosureInvokedCB (System.Object o, GLib.ClosureInvokedArgs args) [0x00000] in <filename unknown>:0
  at GLib.SignalClosure.Invoke (GLib.ClosureInvokedArgs args) [0x00000] 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) [0x00000] in <filename unknown>:0

Robert Nordan (rpvn) wrote :

I checked the reference in the csproj, and it goes like this:
<Reference Include="ICSharpCode.SharpZipLib, Version=, Culture=neutral, PublicKeyToken=1b03e6acf1164f73">

So it shouldn't fail because of a version mismatch, and a hintpath is just a hint, it should check the GAC afterwards. I suppose we could try bundling the library with the app, but I'm interested to hear if anyone else has this issue first.

Mac Mant (mantur-5) wrote :

Same problem at mine Mac OS X 10.7.4, Mono 2.10.9, Pinta 1.3.
Regarding bug importance - looks like critical - it is impossible to work on project - saving work results in flattening the image.

Robert Nordan (rpvn) on 2012-06-03
Changed in pinta:
status: New → Confirmed
importance: Undecided → High
milestone: none → 1.4
Robert Nordan (rpvn) wrote :

OK, marking this as confirmed. Very strange that it's not being found in the GAC.

As a workaround you can try copying the dll from the GAC location into [The applications folder you installed Pinta into]/Pinta.app/Contents/MacOS/ and seeing if that works.

Hauke Duden (h-ns-duden) wrote :

I tried copying the DLL into the app folder and it works!

So it seems that the only problem is that the DLL is not found for some reason.

Mac Mant (mantur-5) wrote :

Confirmed - copying dll to [The applications folder you installed Pinta into]/Pinta.app/Contents/MacOS/ solves the problem!
Thanks for workaround.

Cameron White (cameronwhite91) wrote :

I think we should probably just go ahead and bundle the dll, since it doesn't look like we're likely to figure out the GAC issues anytime soon and the issue is high priority. I also noticed that older Mac releases of Pinta also bundled the dll (see https://github.com/downloads/PintaProject/Pinta/pinta-1.0.app.zip)

Changed in pinta:
assignee: nobody → Cameron White (cameronwhite91)
Cameron White (cameronwhite91) wrote :
Changed in pinta:
status: Confirmed → Fix Committed
grofaty (grofaty) on 2012-09-27
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