Fedora Account System
Red Hat Associate
Red Hat Customer
Description of problem: pdfmod crashes at start Version-Release number of selected component (if applicable): pdfmod-0.9.1-18.fc28.x86_64 How reproducible: Call "pdfmod" command at commandline $ pdfmod Actual results: Unhandled Exception: System.TypeInitializationException: The type initializer for 'System.Console' threw an exception. ---> System.TypeInitializationException: The type initializer for 'System.ConsoleDriver' threw an exception. ---> System.Exception: Magic number is wrong: 542 at System.TermInfoReader.ReadHeader (System.Byte[] buffer, System.Int32& position) [0x0002b] in <373b6e083d6e45e498c9082a8eebd27f>:0 at System.TermInfoReader..ctor (System.String term, System.String filename) [0x00065] in <373b6e083d6e45e498c9082a8eebd27f>:0 at System.TermInfoDriver..ctor (System.String term) [0x00058] in <373b6e083d6e45e498c9082a8eebd27f>:0 at System.ConsoleDriver.CreateTermInfoDriver (System.String term) [0x00000] in <373b6e083d6e45e498c9082a8eebd27f>:0 at System.ConsoleDriver..cctor () [0x00062] in <373b6e083d6e45e498c9082a8eebd27f>:0 --- End of inner exception stack trace --- at System.Console.SetupStreams (System.Text.Encoding inputEncoding, System.Text.Encoding outputEncoding) [0x0000a] in <373b6e083d6e45e498c9082a8eebd27f>:0 at System.Console..cctor () [0x000a8] in <373b6e083d6e45e498c9082a8eebd27f>:0 --- End of inner exception stack trace --- at Hyena.Log.Commit (Hyena.LogEntryType type, System.String message, System.String details, System.Boolean showUser) [0x00108] in <d2bde5042d2b4c728acdbf713dfe8772>:0 at Hyena.Log.Debug (System.String message, System.String details) [0x0000c] in <d2bde5042d2b4c728acdbf713dfe8772>:0 at Hyena.Log.Debug (System.String message) [0x0000c] in <d2bde5042d2b4c728acdbf713dfe8772>:0 at Hyena.Log.DebugFormat (System.String format, System.Object[] args) [0x00013] in <d2bde5042d2b4c728acdbf713dfe8772>:0 at PdfMod.PdfMod.Main (System.String[] args) [0x0001a] in <8a959f5af7e94e12b2f71027f73493b5>:0 [ERROR] FATAL UNHANDLED EXCEPTION: System.TypeInitializationException: The type initializer for 'System.Console' threw an exception. ---> System.TypeInitializationException: The type initializer for 'System.ConsoleDriver' threw an exception. ---> System.Exception: Magic number is wrong: 542 at System.TermInfoReader.ReadHeader (System.Byte[] buffer, System.Int32& position) [0x0002b] in <373b6e083d6e45e498c9082a8eebd27f>:0 at System.TermInfoReader..ctor (System.String term, System.String filename) [0x00065] in <373b6e083d6e45e498c9082a8eebd27f>:0 at System.TermInfoDriver..ctor (System.String term) [0x00058] in <373b6e083d6e45e498c9082a8eebd27f>:0 at System.ConsoleDriver.CreateTermInfoDriver (System.String term) [0x00000] in <373b6e083d6e45e498c9082a8eebd27f>:0 at System.ConsoleDriver..cctor () [0x00062] in <373b6e083d6e45e498c9082a8eebd27f>:0 --- End of inner exception stack trace --- at System.Console.SetupStreams (System.Text.Encoding inputEncoding, System.Text.Encoding outputEncoding) [0x0000a] in <373b6e083d6e45e498c9082a8eebd27f>:0 at System.Console..cctor () [0x000a8] in <373b6e083d6e45e498c9082a8eebd27f>:0 --- End of inner exception stack trace --- at Hyena.Log.Commit (Hyena.LogEntryType type, System.String message, System.String details, System.Boolean showUser) [0x00108] in <d2bde5042d2b4c728acdbf713dfe8772>:0 at Hyena.Log.Debug (System.String message, System.String details) [0x0000c] in <d2bde5042d2b4c728acdbf713dfe8772>:0 at Hyena.Log.Debug (System.String message) [0x0000c] in <d2bde5042d2b4c728acdbf713dfe8772>:0 at Hyena.Log.DebugFormat (System.String format, System.Object[] args) [0x00013] in <d2bde5042d2b4c728acdbf713dfe8772>:0 at PdfMod.PdfMod.Main (System.String[] args) [0x0001a] in <8a959f5af7e94e12b2f71027f73493b5>:0 Expected results: GUI window showing up Additional info: Worked just before I upgraded from f27 to f28
Exactly the same issue. I cleaned out pdfmod and reinstalled it and gave the same error. System is a brand new Fedora 28 installation (ie not upgraded) (64bit).
It's a known bug in mono (pdfmod uses mono.) Here's info on the bug from upstream: https://github.com/mono/mono/issues/6752 A workaround for the meanwhile is to set TERM=xterm before running pdfmod. That should let you run it. There is a fix upstream already as I understand so for Fedora to fix this we'd need updated mono packages.
I can confirm that the workaround does solve the issue for the time being on my systems.
Since I use pdfmod as my viewer with mutt, I've added the following to the mailcap file: application/pdf; { set -m \; /bin/mv -T %s %s.mv \; ( export TERM=xterm\; pdfmod %s.mv \; /bin/rm %s.mv \; ) & } \; disown -a added the export TERM=xterm portion.
*** This bug has been marked as a duplicate of bug 1580447 ***
(In reply to Harish Pillay from comment #3) > I can confirm that the workaround does solve the issue for the time being on > my systems. +1 Thanks!