FS#70143 - [pdfmod] 0.9.1-11 System.NullReferenceException: Object reference not set to an instance

Attached to Project: Community Packages
Opened by Richard PALO (risto3) - Wednesday, 24 March 2021, 08:15 GMT
Last edited by Christian Hesse (eworm) - Monday, 10 July 2023, 10:02 GMT
Task Type Bug Report
Category Packages
Status Closed
Assigned To Christian Hesse (eworm)
Architecture All
Severity High
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

Description:
after upgrading to pdfmod 0.9.1-11 (along with the many recent gtk and related updates),
it has become more or less unusable due as seen in the following tracebacks:

opening certain files:
[1 Debug 09:11:32.961] Starting PdfMod 0.9.1
[1 Debug 09:11:32.987] Initializing i18n catalog from /usr/share/locale/
[1 Debug 09:11:33.223] Loaded custom AccelMap from /home/richard/.config/pdfmod/gtk_accel_map
[1 Debug 09:11:33.282] Cache directory set to /home/richard/.cache/pdfmod
[1 Debug 09:11:34.401] Loaded xxxxx.pdf
Exception in Gtk# callback delegate
Note: Applications can use GLib.ExceptionManager.UnhandledException to handle the exception.
System.NullReferenceException: Object reference not set to an instance of an object
at Gtk.Entry.TextInsertedSignalCallback (System.IntPtr arg0, System.IntPtr arg1, System.Int32 arg2, System.Int32& arg3, System.IntPtr gch) [0x00082] in <e2cf54bd50544b3dbf94649395d8c893>:0
at GLib.ExceptionManager.RaiseUnhandledException (System.Exception e, System.Boolean is_terminal) [0x00000] in <ed39f21b9e9343dcbd442a17ad356a9f>:0
at Gtk.Entry.TextInsertedSignalCallback (System.IntPtr arg0, System.IntPtr arg1, System.Int32 arg2, System.Int32& arg3, System.IntPtr gch) [0x00000] in <e2cf54bd50544b3dbf94649395d8c893>:0
at Gtk.Entry.gtk_entry_set_text (System.IntPtr , System.IntPtr ) [0x00000] in <e2cf54bd50544b3dbf94649395d8c893>:0
at Gtk.Entry.set_Text (System.String value) [0x00000] in <e2cf54bd50544b3dbf94649395d8c893>:0
at PdfMod.Gui.MetadataEditorBox+TextProperty.SetDefault (System.String default_value) [0x00000] in <c273a03558c24ab9b152a8ec49ae8b6d>:0
at PdfMod.Gui.MetadataEditorBox.HandleDocumentLoaded (System.Object o, System.EventArgs e) [0x00000] in <c273a03558c24ab9b152a8ec49ae8b6d>:0
at PdfMod.Core.Client.OnDocumentLoaded () [0x00000] in <c273a03558c24ab9b152a8ec49ae8b6d>:0
at PdfMod.Gui.Client+<LoadPath>c__AnonStorey0.<>m__1 () [0x00000] in <c273a03558c24ab9b152a8ec49ae8b6d>:0
at Hyena.ThreadAssist+<BlockingProxyToMain>c__AnonStorey1.<>m__0 () [0x00000] in <d2bde5042d2b4c728acdbf713dfe8772>:0
at PdfMod.Gui.Client+<RunIdle>c__AnonStorey4.<>m__0 () [0x00000] in <c273a03558c24ab9b152a8ec49ae8b6d>:0
at GLib.Idle+IdleProxy.Invoke (System.IntPtr data) [0x00000] in <ed39f21b9e9343dcbd442a17ad356a9f>:0
at GLib.SourceProxy.HandlerInternal (System.IntPtr data) [0x00000] in <ed39f21b9e9343dcbd442a17ad356a9f>:0
at Gtk.Application.gtk_main () [0x00000] in <e2cf54bd50544b3dbf94649395d8c893>:0
at Gtk.Application.Run () [0x00000] in <e2cf54bd50544b3dbf94649395d8c893>:0
at PdfMod.Gui.Client..ctor (System.Boolean loadFiles) [0x00000] in <c273a03558c24ab9b152a8ec49ae8b6d>:0
at PdfMod.PdfMod.Main (System.String[] args) [0x00000] in <c273a03558c24ab9b152a8ec49ae8b6d>:0
this is a multipage file created by libreoffice then exporting to pdf (PDF/A naturally).

the problem appears to be related to gtk#

Additional info:
* package version(s)
* config and/or log files etc.
* link to upstream bug report, if any

Linux smicro 5.10.25-1-lts #1 SMP Sat, 20 Mar 2021 19:37:44 +0000 x86_64 GNU/Linux

libgdiplus-5.6.1-3
mono-6.12.0.107-1
gtk-sharp-2-2.12.45-4
pdfmod-0.9.1-11


Steps to reproduce:

open most any pdf file (simple single page pdfs do seem to work though)
This task depends upon

Closed by  Christian Hesse (eworm)
Monday, 10 July 2023, 10:02 GMT
Reason for closing:  Won't fix
Additional comments about closing:  removed
Comment by Richard PALO (risto3) - Wednesday, 24 March 2021, 13:30 GMT
interestingly enough, if I take a file that doesn't load and do a pdfseparate ...
then a pdfunite to put it back together...
pdfmod seems to do okay with it.

go figure! at least that's the workaround for now.
Comment by Richard PALO (risto3) - Tuesday, 30 March 2021, 13:14 GMT
I'm noticing now as well that many (if not most) of the problematic files
are %PDF-1.3... though it seems it is not limited to 1.3, perhaps just exacerbated by that version.
for example, one of our banks appears to use KSL kslprn which fails.

I found the attached public file (1.2) which fails, perhaps aiding the search.
Comment by Richard PALO (risto3) - Monday, 03 May 2021, 07:17 GMT
Though the original problem persists, we encounter now a new error on certain other files:

[1 Debug 09:15:24.788] Starting PdfMod 0.9.1
[1 Debug 09:15:24.818] Initializing i18n catalog from /usr/share/locale/
[1 Debug 09:15:24.959] Loaded custom AccelMap from /home/richard/.config/pdfmod/gtk_accel_map
[1 Debug 09:15:24.990] Cache directory set to /home/richard/.cache/pdfmod
[1 Debug 09:15:26.147] Loaded <filename>.pdf
[3 Warn 09:15:26.296] Caught an exception - PdfSharp.Pdf.IO.PdfReaderException: Cannot handle iref streams. The current implementation of PDFsharp cannot handle this PDF feature introduced with Acrobat 6. (in `PdfSharp')
at PdfSharp.Pdf.IO.Parser.ReadXRefTableAndTrailer (PdfSharp.Pdf.PdfReferenceTable xrefTable) [0x00018] in <1740846932744990b7c7f59614f71a97>:0
at PdfSharp.Pdf.IO.Parser.ReadTrailer () [0x0005e] in <1740846932744990b7c7f59614f71a97>:0
at PdfSharp.Pdf.IO.PdfReader.Open (System.IO.Stream stream, System.String password, PdfSharp.Pdf.IO.PdfDocumentOpenMode openmode, PdfSharp.Pdf.IO.PdfPasswordProvider passwordProvider) [0x00087] in <1740846932744990b7c7f59614f71a97>:0
at PdfSharp.Pdf.IO.PdfReader.Open (System.String path, System.String password, PdfSharp.Pdf.IO.PdfDocumentOpenMode openmode, PdfSharp.Pdf.IO.PdfPasswordProvider provider) [0x00009] in <1740846932744990b7c7f59614f71a97>:0
at PdfSharp.Pdf.IO.PdfReader.Open (System.String path, PdfSharp.Pdf.IO.PdfDocumentOpenMode openmode, PdfSharp.Pdf.IO.PdfPasswordProvider provider) [0x00000] in <1740846932744990b7c7f59614f71a97>:0
at PdfMod.Pdf.Document.Load (System.String uri, PdfSharp.Pdf.IO.PdfPasswordProvider passwordProvider, System.Boolean isAlreadyTmp) [0x00063] in <912a4b93a4404d98af33bb69861c6a65>:0
at PdfMod.Gui.Client+<LoadPath>c__AnonStorey0.<>m__0 () [0x0001b] in <912a4b93a4404d98af33bb69861c6a65>:0
[3 Error 09:15:26.298] Error Loading Document - There was an error loading /home/richard/<filename>.pdf

Comment by Christian Hesse (eworm) - Monday, 10 July 2023, 10:02 GMT
This is non-functional and unmaintained... So removing from repositories.

Loading...