Bug 1080430 - Mono console applications don't work with the update to terminfo 6.1
Mono console applications don't work with the update to terminfo 6.1
Status: RESOLVED FIXED
Classification: openSUSE
Product: openSUSE Tumbleweed
Classification: openSUSE
Component: Mono
Current
Other Other
: P5 - None : Normal (vote)
: ---
Assigned To: E-mail List
E-mail List
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2018-02-10 09:38 UTC by Andreas Schneider
Modified: 2020-08-25 09:30 UTC (History)
0 users

See Also:
Found By: ---
Services Priority:
Business Priority:
Blocker: ---
Marketing QA Status: ---
IT Deployment: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Andreas Schneider 2018-02-10 09:38:02 UTC
Since the update of terminfo to 6.1, running console applications with mono doens't work anymore:

-----------------------------------------------------
mono UnSIN.exe 

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) [0x00028] in <8f8a76535f644930b25f735cdc17065c>:0 
  at System.TermInfoReader..ctor (System.String term, System.String filename) [0x0005f] in <8f8a76535f644930b25f735cdc17065c>:0 
  at System.TermInfoDriver..ctor (System.String term) [0x00055] in <8f8a76535f644930b25f735cdc17065c>:0 
  at System.ConsoleDriver.CreateTermInfoDriver (System.String term) [0x00000] in <8f8a76535f644930b25f735cdc17065c>:0 
  at System.ConsoleDriver..cctor () [0x0004d] in <8f8a76535f644930b25f735cdc17065c>:0 
   --- End of inner exception stack trace ---
  at System.Console.SetupStreams (System.Text.Encoding inputEncoding, System.Text.Encoding outputEncoding) [0x00007] in <8f8a76535f644930b25f735cdc17065c>:0 
  at System.Console..cctor () [0x0008e] in <8f8a76535f644930b25f735cdc17065c>:0 
   --- End of inner exception stack trace ---
  at UnSIN.Program.Main (System.String[] args) [0x00006] in <7c4247c4deca4ba5a7657dbbe6ac76e0>: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) [0x00028] in <8f8a76535f644930b25f735cdc17065c>:0 
  at System.TermInfoReader..ctor (System.String term, System.String filename) [0x0005f] in <8f8a76535f644930b25f735cdc17065c>:0 
  at System.TermInfoDriver..ctor (System.String term) [0x00055] in <8f8a76535f644930b25f735cdc17065c>:0 
  at System.ConsoleDriver.CreateTermInfoDriver (System.String term) [0x00000] in <8f8a76535f644930b25f735cdc17065c>:0 
  at System.ConsoleDriver..cctor () [0x0004d] in <8f8a76535f644930b25f735cdc17065c>:0 
   --- End of inner exception stack trace ---
  at System.Console.SetupStreams (System.Text.Encoding inputEncoding, System.Text.Encoding outputEncoding) [0x00007] in <8f8a76535f644930b25f735cdc17065c>:0 
  at System.Console..cctor () [0x0008e] in <8f8a76535f644930b25f735cdc17065c>:0 
   --- End of inner exception stack trace ---
  at UnSIN.Program.Main (System.String[] args) [0x00006] in <7c4247c4deca4ba5a7657dbbe6ac76e0>:0
-----------------------------------------------------

My TERM is set to screen-256color, changing it to xterm fixed it.

-----------------------------------------------------
TERM=xterm mono UnSIN.exe 
ERROR: Invalid parameters!
-----------------------------------------------------

libslang2 seems to have had a similar issue see:

https://build.opensuse.org/request/show/574532
Comment 1 Andreas Schneider 2020-08-25 09:30:22 UTC
Seems to be working again ...