GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — System.TermInfoReader cannot handle new NCurses 6 TermInfo files · Issue #6752 · mono/mono

System.TermInfoReader cannot handle new NCurses 6 TermInfo files #6752

New issue
Copy link
New issue
Copy link
Closed
#6960
Closed
System.TermInfoReader cannot handle new NCurses 6 TermInfo files#6752
#6960
Copy link
Assignees
lewurm
Labels
area-BCL: mscorlibos-linux
Milestone
2018-02 (5.12.xx)

Description

@directhex
directhex
opened on Feb 1, 2018
Issue body actions

Steps to Reproduce

  1. Install NCurses 6.1 (e.g. on Arch)
  2. Try to do anything, e.g. make runtime

Current Behavior

Crashes

On which platforms did you notice this

[ ] macOS
[X] Linux
[ ] Windows

Version Used:

Any

Stacktrace

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 <10f1e38af51947f98c2267bd20fa8c60>:0 
  at System.TermInfoReader..ctor (System.String term, System.String filename) [0x0005f] in <10f1e38af51947f98c2267bd20fa8c60>:0 
  at System.TermInfoDriver..ctor (System.String term) [0x00055] in <10f1e38af51947f98c2267bd20fa8c60>:0 
  at System.ConsoleDriver.CreateTermInfoDriver (System.String term) [0x00000] in <10f1e38af51947f98c2267bd20fa8c60>:0 
  at System.ConsoleDriver..cctor () [0x0004d] in <10f1e38af51947f98c2267bd20fa8c60>:0 
   --- End of inner exception stack trace ---
  at System.Console.SetupStreams (System.Text.Encoding inputEncoding, System.Text.Encoding outputEncoding) [0x00007] in <10f1e38af51947f98c2267bd20fa8c60>:0 
  at System.Console..cctor () [0x0008e] in <10f1e38af51947f98c2267bd20fa8c60>:0 
   --- End of inner exception stack trace ---
  at Microsoft.CodeAnalysis.CommandLine.BuildClient.RunCompilation (System.Collections.Generic.IEnumerable`1[T] originalArguments, Microsoft.CodeAnalysis.BuildPaths buildPaths, System.IO.TextWriter textWriter) [0x00005] in <0d46d413edc9411fa4eb1c4cbce40409>:0 
  at Microsoft.CodeAnalysis.CommandLine.DesktopBuildClient.Run (System.Collections.Generic.IEnumerable`1[T] arguments, Microsoft.CodeAnalysis.CommandLine.RequestLanguage language, Microsoft.CodeAnalysis.CommandLine.CompileFunc compileFunc, Microsoft.CodeAnalysis.IAnalyzerAssemblyLoader analyzerAssemblyLoader) [0x00037] in <0d46d413edc9411fa4eb1c4cbce40409>:0 
  at Microsoft.CodeAnalysis.CSharp.CommandLine.Program.MainCore (System.String[] args) [0x00017] in <0d46d413edc9411fa4eb1c4cbce40409>:0 
  at Microsoft.CodeAnalysis.CSharp.CommandLine.Program.Main (System.String[] args) [0x00000] in <0d46d413edc9411fa4eb1c4cbce40409>: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 <10f1e38af51947f98c2267bd20fa8c60>:0 
  at System.TermInfoReader..ctor (System.String term, System.String filename) [0x0005f] in <10f1e38af51947f98c2267bd20fa8c60>:0 
  at System.TermInfoDriver..ctor (System.String term) [0x00055] in <10f1e38af51947f98c2267bd20fa8c60>:0 
  at System.ConsoleDriver.CreateTermInfoDriver (System.String term) [0x00000] in <10f1e38af51947f98c2267bd20fa8c60>:0 
  at System.ConsoleDriver..cctor () [0x0004d] in <10f1e38af51947f98c2267bd20fa8c60>:0 
   --- End of inner exception stack trace ---
  at System.Console.SetupStreams (System.Text.Encoding inputEncoding, System.Text.Encoding outputEncoding) [0x00007] in <10f1e38af51947f98c2267bd20fa8c60>:0 
  at System.Console..cctor () [0x0008e] in <10f1e38af51947f98c2267bd20fa8c60>:0 
   --- End of inner exception stack trace ---
  at Microsoft.CodeAnalysis.CommandLine.BuildClient.RunCompilation (System.Collections.Generic.IEnumerable`1[T] originalArguments, Microsoft.CodeAnalysis.BuildPaths buildPaths, System.IO.TextWriter textWriter) [0x00005] in <0d46d413edc9411fa4eb1c4cbce40409>:0 
  at Microsoft.CodeAnalysis.CommandLine.DesktopBuildClient.Run (System.Collections.Generic.IEnumerable`1[T] arguments, Microsoft.CodeAnalysis.CommandLine.RequestLanguage language, Microsoft.CodeAnalysis.CommandLine.CompileFunc compileFunc, Microsoft.CodeAnalysis.IAnalyzerAssemblyLoader analyzerAssemblyLoader) [0x00037] in <0d46d413edc9411fa4eb1c4cbce40409>:0 
  at Microsoft.CodeAnalysis.CSharp.CommandLine.Program.MainCore (System.String[] args) [0x00017] in <0d46d413edc9411fa4eb1c4cbce40409>:0 
  at Microsoft.CodeAnalysis.CSharp.CommandLine.Program.Main (System.String[] args) [0x00000] in <0d46d413edc9411fa4eb1c4cbce40409>:0 

Relevant, is file's support for recognising the new files: file/file@8f8d2c0#diff-fe71ced20976bbadd001fc32fbea03a7

I'm not sure how much deeper the changes go

Reacted by Harry, Matti Andreas Nielsen, Gereon Fox, Nathan Lowe, Ludvig, Paul Julien, puffybsd, hr567, Daniel, Bertrand Bonnefoy-Claudet and 1 more

Activity

Next
  1. directhex
    added
    area-BCL: mscorlib
    on Feb 1, 2018
  2. directhex commented on Feb 1, 2018

    @directhex
    directhex
    on Feb 1, 2018
    ContributorAuthor
    More actions

    Looks like a big ol' new ABI in NCurses 6. https://www.gnu.org/software/ncurses/

  3. gfhcs commented on Feb 8, 2018

    @gfhcs
    gfhcs
    on Feb 8, 2018
    More actions

    Same problem on OpenSUSE Tumbleweed.

  4. gfhcs commented on Feb 8, 2018

    @gfhcs
    gfhcs
    on Feb 8, 2018
    More actions

    Workaround: On OpenSUSE Tumbleweed I was able to downgrade the packages "terminfo" and "terminfo-base" from 6.1 to 5.9 without breaking any (encoded) dependencies. Now terminal output with mono works again.

    I just hope that I didn't break anything with this downgrade, 'cause I have no clue what terminfo is used for...

    Reacted by Gankov Andrey and zaqwer101
  5. marek-safar
    added
    os-linux
    on Feb 8, 2018
  6. lewurm
    self-assigned this
    on Feb 8, 2018
  7. migueldeicaza commented on Feb 13, 2018

    @migueldeicaza
    migueldeicaza
    on Feb 13, 2018
    Contributor
    More actions

    Slang added support for this recently: hankem/S-Lang@6dd5ade

    Looks like the format change is fairly simple, introduced new magic value, and now entries use ints instead of shorts.

  8. lewurm commented on Feb 13, 2018

    @lewurm
    lewurm
    on Feb 13, 2018
    Contributor
    More actions

    fix is in progress. A simple workaround is to set TERM=xterm for example, that is, some terminfo file that is in the old file format.

    Reacted by Роман Корцаков, Thibault Saunier, wtfblub, christiansk, Adriano Costa, joejoepie, Alexander Kapshuna, Joel Purra, Jirka Daněk, Dimiter 'malkia' Stanev and 10 more
    Reacted by Matyas Albert Nagy, Adrià Arrufat, dionisos, relte, Adam R. Nelson, Starbeamrainbowlabs, Dmitry Dubina, Francisco Breno, Simão Gomes Viana, Роман Корцаков and 5 more
    Reacted by Gereon Fox, Miguel de Icaza, Matyas Albert Nagy, Jonas Jensen, Dmitry Dubina, wtfblub, christiansk, franeklubi, Yog Sottot, joejoepie and 5 more
  9. lewurm
    added a commit that references this issue on Feb 13, 2018

    [TermInfo] support new file format terminfo2 introduced with ncurses6.1

    f136119
  10. akoeplinger
    closed this as completedin #6960on Feb 14, 2018
  11. akoeplinger
    added a commit that references this issue on Feb 14, 2018

    [TermInfo] support new file format terminfo2 introduced with ncurses6…

    2c1f45f
  12. baulig
    added a commit that references this issue on Feb 15, 2018

    Merge with master.

    66a0858
  13. sbrl commented on Feb 27, 2018

    @sbrl
    sbrl
    on Feb 27, 2018
    More actions

    Any timeline on when this will be included in a release? (and if so, which release(s)?)

  14. lewurm commented on Feb 27, 2018

    @lewurm
    lewurm
    on Feb 27, 2018
    Contributor
    More actions

    @marek-safar should we backport this change to release branches? I'm not sure about it, given there is a fairly simple workaround for it.

  15. 12 remaining items

  16. directhex commented on Apr 19, 2018

    @directhex
    directhex
    on Apr 19, 2018
    ContributorAuthor
    More actions

    The fix for this was backported to Mono 5.10.x, and is in 5.10.1.45 as a minimum, which is in the mono-project.com preview and stable release branches (it is not yet included in a vs branch package)

  17. ht990332 commented on Apr 19, 2018

    @ht990332
    ht990332
    on Apr 19, 2018 via email
    More actions
    On Wed, 2018-04-18 at 21:03 -0700, Panos V. wrote: I'm still dealing with the exact same issue. (in Arch Linux) — You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or mute the thread.
    If you can, rebuild the arch linux package after editing the PKGBUILD and changing the _gitcommit variable to b4e428d
  18. jonpryor
    added a commit that references this issue on Apr 24, 2018

    Bump to mono/2017-12/ea8a24b1

    a305bd2
  19. stehgold commented on Jul 12, 2018

    @stehgold
    stehgold
    on Jul 12, 2018
    More actions

    Does anyone know why Fedora comes with 4.8. If this was fixes in 5.10 when will this arrive in Fedora, F30 ? Oh, TERM=xterm does not work here.

    Reacted by Venelin Stoykov, Alexander Lipatov and Robert Hailey
  20. HinTak commented on Jul 12, 2018

    @HinTak
    HinTak
    on Jul 12, 2018 via email
    Contributor
    More actions
    I can think of one reason - mono 5 has many incompatible(?) changes / additions, including a new c# compiler contributed by Microsoft. In fact I am not upgrading until one (the ability to build ironpython correctly) is fixed. But the ncurse issue in the subject is already backported to 4.8 (at least as distributed by fedora) and fixed. On Thursday, 12 July 2018, 20:00:50 GMT+8, Stephan Goldenberg <[email protected]> wrote: Does anyone know why Fedora comes with 4.8. If this was fixes in 5.10 when will this arrive in Fedora, F30 ? — You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or mute the thread.
  21. jonpryor
    added 2 commits that reference this issue on Aug 8, 2018

    Bump to mono/mono:2018-04@f3a2216b (#1503)

    90edf81

    Bump to mono/mono:2018-04@f3a2216b (#1503)

    5807e4e
  22. ramcq
    added a commit that references this issue on Nov 15, 2018

    Port to freedesktop.org 18.08 SDK

    936f3d3
  23. nedrichards
    added a commit that references this issue on Feb 20, 2019

    Port to freedesktop.org 18.08 SDK

    8279251
  24. ojwb
    added 2 commits that reference this issue on Mar 28, 2019

    Work around mono terminfo parsing bug

    5434d25

    Work around mono terminfo parsing bug

    7faa45a
  25. picenka21
    added a commit that references this issue on Feb 18, 2022

    [TermInfo] support new file format terminfo2 introduced with ncurses6…

    296222d
  26. msk
    added a commit that references this issue on May 11, 2026

    Update to 1.4.12. From the changelog:

    90124a6
  27. jperkin
    added a commit that references this issue on May 14, 2026

    Update to 1.4.12. From the changelog:

    4665c22
  28. tsutsui
    added a commit that references this issue on Oct 17, 2026

    Update to 1.4.12. From the changelog:

    094e555
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

  • @lewurm
    lewurm

Labels

area-BCL: mscorlibos-linux

Type

No type

Projects

No projects

    Milestone

    • 2018-02 (5.12.xx)

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

    You are visitor 01402503 — GeezerVison does not store the pages you look up.
    Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.