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 614009 - PDFMod crashes when inserting a new (jpeg) image
PDFMod crashes when inserting a new (jpeg) image
Status: RESOLVED FIXED
Product: pdfmod
Classification: Other
Component: general
0.8
Other Linux
: Normal critical
: ---
Assigned To: pdfmod-maint
pdfmod-maint
Depends on:
Blocks:
 
 
Reported: 2010-03-26 13:23 UTC by alex
Modified: 2010-03-29 23:54 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description alex 2010-03-26 13:23:51 UTC
I had to make a 4 pages PDF adding 3 single page pdf file, and finally a jpeg (A4 format). The job went on rightly until the last page: every time I drug and drop a jpeg image after the last pdf page, the application crashes closing without any error message.

The same result is obtained trying to append the new image page from the toolbar: menu File and click on "insert new page", I selected the jpeg file, click on the "Open" button, and PDFMod crashes, closing itself without any error message.
Comment 1 Fabio Durán Verdugo 2010-03-26 14:06:41 UTC
Thanks for taking the time to report this bug.
Without a stack trace from the crash it's very hard to determine what caused it.
Can you get us a stack trace? Please see http://live.gnome.org/GettingTraces for more information on how to do so. Thanks in advance!
Comment 2 Gabriel Burt 2010-03-26 16:54:17 UTC
I can reproduce it.  Running pdfmod from the terminal, it prints out this trace when it dies:

System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.InvalidOperationException: The file is not a valid PDF document.
  at PdfSharp.Pdf.IO.PdfReader.Open (System.IO.Stream stream, System.String password, PdfDocumentOpenMode openmode, PdfSharp.Pdf.IO.PdfPasswordProvider passwordProvider) [0x00069] in /home/gabe/Projects/pdfmod/lib/PdfSharp/PdfSharp.Pdf.IO/PdfReader.cs:275 
  at PdfSharp.Pdf.IO.PdfReader.Open (System.String path, System.String password, PdfDocumentOpenMode openmode, PdfSharp.Pdf.IO.PdfPasswordProvider provider) [0x0000b] in /home/gabe/Projects/pdfmod/lib/PdfSharp/PdfSharp.Pdf.IO/PdfReader.cs:205 
  at PdfSharp.Pdf.IO.PdfReader.Open (System.String path, System.String password, PdfDocumentOpenMode openmode) [0x00000] in /home/gabe/Projects/pdfmod/lib/PdfSharp/PdfSharp.Pdf.IO/PdfReader.cs:193 
  at PdfMod.Pdf.Document.AddFromUri (System.Uri uri, Int32 to_index, System.Int32[] pages_to_import) [0x0001d] in /home/gabe/Projects/pdfmod/src/PdfMod/Pdf/Document.cs:288 
  at PdfMod.Pdf.Document.AddFromUri (System.Uri uri, Int32 to_index) [0x00000] in /home/gabe/Projects/pdfmod/src/PdfMod/Pdf/Document.cs:282 
  at PdfMod.Pdf.Document.AddFromUri (System.Uri uri) [0x00000] in /home/gabe/Projects/pdfmod/src/PdfMod/Pdf/Document.cs:277 
  at PdfMod.Gui.Actions.OnInsertFrom (System.Object o, System.EventArgs args) [0x000c8] in /home/gabe/Projects/pdfmod/src/PdfMod/Gui/Actions.cs:264
Comment 3 Gabriel Burt 2010-03-26 16:55:09 UTC
To be clear, we aren't going to support this, but we should certainly fix the crash, and tell the user that only PDF files can be inserted.
Comment 4 Gabriel Burt 2010-03-29 23:54:35 UTC
Fixed in master, look for it in 0.8.2 or 0.9.

commit 86e6e8687ca64c19b371090dc09d327131495904
Author: Gabriel Burt <gabriel.burt@gmail.com>
Date:   Mon Mar 29 16:52:44 2010

    Catch exceptions when inserting doc
    
    If the file isn't a PDF file, or PDFSharp is unable to load it, we now
    won't crash; instead we just warn the user.  Fixes bgo#614009