PDF Mod crashes on opening file dialogue

Bug #645137 reported by Alexander Hunziker on 2010-09-22
38
This bug affects 5 people
Affects Status Importance Assigned to Milestone
Mago
Undecided
Unassigned
PDF Mod
Fix Released
Critical
pdfmod (Ubuntu)
Undecided
Unassigned
Maverick
Undecided
Unassigned

Bug Description

Binary package hint: pdfmod

When I click on the "open file" button, PDF Mod crashes. Here's the output to the terminal:

hunzikea@AlexT400s:~$ pdfmod
[Debug 13:51:10.365] Starting PdfMod
[Debug 13:51:10.371] Initializing i18n catalog from /usr/share/locale/
[Debug 13:51:10.415] Cache directory set to /home/hunzikea/.cache/pdfmod
Marshaling activate 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.ArgumentNullException: Argument cannot be null.
Parameter name: path2
  at System.IO.Path.Combine (System.String path1, System.String path2) [0x00000] in <filename unknown>:0
  at Hyena.XdgBaseDirectorySpec.GetXdgDirectoryUnderHome (System.String key, System.String fallback) [0x00000] in <filename unknown>:0
  at PdfMod.Gui.Client.<CreateChooser>m__A (System.String s) [0x00000] in <filename unknown>:0
  at System.Linq.Enumerable+<CreateSelectIterator>c__Iterator10`2[System.String,System.String].MoveNext () [0x00000] in <filename unknown>:0
  at System.Linq.Enumerable+<CreateWhereIterator>c__Iterator1D`1[System.String].MoveNext () [0x00000] in <filename unknown>:0
  at System.Collections.Generic.List`1[System.String].AddEnumerable (IEnumerable`1 enumerable) [0x00000] in <filename unknown>:0
  at System.Collections.Generic.List`1[System.String]..ctor (IEnumerable`1 collection) [0x00000] in <filename unknown>:0
  at System.Linq.Enumerable.ToArray[String] (IEnumerable`1 source) [0x00000] in <filename unknown>:0
  at PdfMod.Gui.Client.CreateChooser (System.String title, FileChooserAction action) [0x00000] in <filename unknown>:0
  at PdfMod.Gui.Actions.OnOpen (System.Object o, System.EventArgs args) [0x00000] in <filename unknown>:0
  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] 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
   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)

TEST CASE:
Comment out (i.e. unset) XDG_DOWNLOAD_DIR or XDG_DOCUMENTS_DIR in ~/.config/user-dirs.dirs, then start pdfmod. On clicking "open file" the above described crash occurs. After applying the patch in the linked branch, no crashing occurs.

ProblemType: Bug
DistroRelease: Ubuntu 10.10
Package: pdfmod 0.8.3-1build2
ProcVersionSignature: Ubuntu 2.6.35-22.33-generic 2.6.35.4
Uname: Linux 2.6.35-22-generic x86_64
Architecture: amd64
Date: Wed Sep 22 13:50:56 2010
InstallationMedia: Ubuntu 10.04 LTS "Lucid Lynx" - Release amd64 (20100429)
PackageArchitecture: all
ProcEnviron:
 LANG=en_DK.utf8
 SHELL=/bin/bash
SourcePackage: pdfmod

Massimo Mund (qos) wrote :

Exactly the same here for maverick i386.

The version from ppa:pdfmod-team/ppa (0.9.0-1~hyper1+maverick) works without problems.

igi (igor-cali) wrote :

PDF Mod unexpectedly closes on pressing Open or Save buttons, or selecting "Save as" menu.
I was able to open a test pdf document by dragging it on pdfmod. Then i was able to modify it, etc., but as soon as I tried to save it, the program closed (before saving the document).

Changed in pdfmod (Ubuntu):
status: New → Confirmed
nanoktom (thomas-pfister) wrote :

Had the same problems with the version of pdfmod above.

Installing version 0.9.0 put an end to all the misbehaviour.

Thank you for taking the time to report this bug and helping to make Ubuntu better. However, I am closing it because the bug has been fixed in the latest development version of Ubuntu - Natty Narwhal.

This is a significant bug in Ubuntu. If you need a fix for the bug in previous versions of Ubuntu, please do steps 1 and 2 of the SRU Procedure [1] to bring the need to a developer's attention.

[1]: https://wiki.ubuntu.com/StableReleaseUpdates#Procedure

Changed in pdfmod (Ubuntu):
status: Confirmed → Fix Released
Changed in pdfmod:
importance: Unknown → Critical
status: Unknown → Fix Released
description: updated
Benjamin Drung (bdrung) wrote :

Uploaded pdfmod 0.8.3-1ubuntu0.1 to maverick-proposed.

Accepted pdfmod into maverick-proposed, the package will build now and be available in a few hours. Please test and give feedback here. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Thank you in advance!

Changed in pdfmod (Ubuntu Maverick):
status: New → Fix Committed
tags: added: verification-needed
Duncan Clough (duncan-clough) wrote :

I ran into this bug on maverick and the version in maverick proposed fixed the bug for me.

tags: added: verification-done
removed: verification-needed
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package pdfmod - 0.8.3-1ubuntu0.1

---------------
pdfmod (0.8.3-1ubuntu0.1) maverick-proposed; urgency=low

  * debian/patches/0004-Avoid_XDG-related_crash_in_file_chooser.patch:
    Backported upstream commit 1bf89353c53ee111c0088462557e2cc693dcdbbb
    Avoid crash when XDG_DOCUMENTS_DIR or XDG_DOWNLOADS_DIR is not set
    (LP: #645137)
 -- Marcel Stimberg <email address hidden> Tue, 22 Feb 2011 10:31:31 +0100

Changed in pdfmod (Ubuntu Maverick):
status: Fix Committed → Fix Released
tags: added: testcase
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

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