After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 631889 - Crash clicking page; InvalidCastException in ExportImagesAction.IsExportable
Crash clicking page; InvalidCastException in ExportImagesAction.IsExportable
Status: RESOLVED FIXED
Product: pdfmod
Classification: Other
Component: general
git master
Other Linux
: Normal critical
: ---
Assigned To: pdfmod-maint
pdfmod-maint
Depends on:
Blocks:
 
 
Reported: 2010-10-11 15:26 UTC by Jeff Knaggs
Modified: 2011-03-03 17:47 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
clicking on this page in the gui crashes pdfmod (27.08 KB, application/pdf)
2010-10-11 16:01 UTC, Jeff Knaggs
Details

Description Jeff Knaggs 2010-10-11 15:26:30 UTC
Just installed/tried pdfmod  (from ppa pdfmod_0.9.0-1~hyper1+karmic_all.deb). 

My ubuntu: "Linux knubuntu 2.6.31-22-generic #65-Ubuntu SMP Thu Sep 16 15:48:58 UTC 2010 i686 GNU/Linux"

Launched from Applications menu, used file open for attached file. If you click on page 10 (or perform any action on page 10) the program crashes. 


sorry for the size of the file -- I know I should have isolated this better by deleting any pages that didn't change the behavior. But, honestly, i'm too lazy/busy at the moment. 

I did launch it from command line to get console output and this is what it dumped:

[Debug 11:23:59.088] Starting PdfMod
[Debug 11:23:59.099] Initializing i18n catalog from /usr/share/locale/

(/usr/lib/pdfmod/PdfMod.exe:7869): GLib-WARNING **: g_set_prgname() called multiple times
[Debug 11:23:59.160] Loaded custom AccelMap from /home/jknaggs/.config/pdfmod/gtk_accel_map
[Debug 11:23:59.178] Cache directory set to /home/jknaggs/.cache/pdfmod
Marshaling selection-changed signal
Exception in Gtk# callback delegate
  Note: Applications can use GLib.ExceptionManager.UnhandledException to handle the exception.
System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.InvalidCastException: GetName: Object is not a name.
  at PdfSharp.Pdf.PdfDictionary+DictionaryElements.GetName (System.String key) [0x00000] 
  at PdfMod.Pdf.Actions.ExportImagesAction.IsExportable (PdfMod.Pdf.Actions.ImageInfo image) [0x00000] 
  at PdfMod.Pdf.Actions.ExportImagesAction+<GetImageObjectsFrom>c__Iterator3.MoveNext () [0x00000] 
  at System.Collections.Generic.List`1[PdfMod.Pdf.Actions.ExportImagesAction+ImageInfo].AddEnumerable (IEnumerable`1 enumerable) [0x00000] 
  at System.Collections.Generic.List`1[PdfMod.Pdf.Actions.ExportImagesAction+ImageInfo]..ctor (IEnumerable`1 collection) [0x00000] 
  at System.Linq.Enumerable.ToList[ImageInfo] (IEnumerable`1 source) [0x00000] 
  at PdfMod.Pdf.Actions.ExportImagesAction..ctor (PdfMod.Pdf.Document document, IEnumerable`1 pages) [0x00000] 
  at PdfMod.Gui.Actions.Update () [0x00000] 
  at PdfMod.Gui.Actions.OnChanged (System.Object o, System.EventArgs args) [0x00000] 
  at (wrapper managed-to-native) System.Reflection.MonoMethod:InternalInvoke (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] 
  --- 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] 
  at System.Reflection.MethodBase.Invoke (System.Object obj, System.Object[] parameters) [0x00000] 
  at System.Delegate.DynamicInvokeImpl (System.Object[] args) [0x00000] 
  at System.MulticastDelegate.DynamicInvokeImpl (System.Object[] args) [0x00000] 
  at System.Delegate.DynamicInvoke (System.Object[] args) [0x00000] 
  at GLib.Signal.ClosureInvokedCB (System.Object o, GLib.ClosureInvokedArgs args) [0x00000] 
  at GLib.SignalClosure.Invoke (GLib.ClosureInvokedArgs args) [0x00000] 
  at GLib.SignalClosure.MarshalCallback (IntPtr raw_closure, IntPtr return_val, UInt32 n_param_vals, IntPtr param_values, IntPtr invocation_hint, IntPtr marshal_data) [0x00000] 
   at GLib.ExceptionManager.RaiseUnhandledException(System.Exception e, Boolean is_terminal)
   at GLib.SignalClosure.MarshalCallback(IntPtr raw_closure, IntPtr return_val, UInt32 n_param_vals, IntPtr param_values, IntPtr invocation_hint, IntPtr marshal_data)
   at Gtk.Application.gtk_main()
   at Gtk.Application.Run()
   at PdfMod.Gui.Client..ctor(Boolean loadFiles)
   at PdfMod.PdfMod.Main(System.String[] args)
Cairo.Context: called from finalization thread, programmer is missing a call to Dispose
Cairo.Context: called from finalization thread, programmer is missing a call to Dispose
jknaggs@knubuntu:/hole/jknaggs/personal/farm/sale$
Comment 1 Jeff Knaggs 2010-10-11 16:01:24 UTC
Created attachment 172108 [details]
clicking on this page in the gui crashes pdfmod
Comment 2 Gabriel Burt 2011-03-03 16:09:25 UTC
I can confirm this.
Comment 3 Gabriel Burt 2011-03-03 17:47:41 UTC
commit 7601244cf5253ae42797c01d60b8b6ebc65c9820
Author: Gabriel Burt <gabriel.burt@gmail.com>
Date:   Thu Mar 3 11:43:25 2011

    Fix crash on page click due to ExportImagesAction (bgo#631889)
    
    If the /Filter of an image is an array, say [/FlateDecode, /DctDecode]
    we would crash, since we were expecting just one of those.  We now
    ignore such images (still only handling PNG and JPEG files).