runtime: System.Console fails with ncurses 6.1
Released on Jan 27, 2018 - Announcement https://www.gnu.org/software/ncurses/
Original report: https://bugs.archlinux.org/task/57260
MSBUILD : error MSB1025: An internal failure occurred while running MSBuild.
System.InvalidOperationException: The terminfo database is invalid.
at System.TermInfo.Database..ctor(String term, Byte[] data)
at System.TermInfo.Database.ReadDatabase(String term, String directoryPath)
at System.TermInfo.Database.ReadDatabase(String term)
at System.TermInfo.Database.ReadActiveDatabase()
at System.ConsolePal.TerminalFormatStrings.<>c.<.cctor>b__27_0()
at System.Lazy`1.ViaFactory(LazyThreadSafetyMode mode)
at System.Lazy`1.ExecutionAndPublication(LazyHelper executionAndPublication, Boolean useDefaultConstructor)
at System.Lazy`1.CreateValue()
at System.ConsolePal.EnsureInitializedCore()
at System.ConsolePal.ControlCHandlerRegistrar.Register()
at System.Console.add_CancelKeyPress(ConsoleCancelEventHandler value)
at Microsoft.Build.CommandLine.MSBuildApp.Execute(String[] commandLine) in E:\A\_work\17\s\src\MSBuild\XMake.cs:line 526
Unhandled Exception: System.InvalidOperationException: The terminfo database is invalid.
at System.TermInfo.Database..ctor(String term, Byte[] data)
at System.TermInfo.Database.ReadDatabase(String term, String directoryPath)
at System.TermInfo.Database.ReadDatabase(String term)
at System.TermInfo.Database.ReadActiveDatabase()
at System.ConsolePal.TerminalFormatStrings.<>c.<.cctor>b__27_0()
at System.Lazy`1.ViaFactory(LazyThreadSafetyMode mode)
at System.Lazy`1.ExecutionAndPublication(LazyHelper executionAndPublication, Boolean useDefaultConstructor)
at System.Lazy`1.CreateValue()
at System.ConsolePal.EnsureInitializedCore()
at System.ConsolePal.ControlCHandlerRegistrar.Register()
at System.Console.add_CancelKeyPress(ConsoleCancelEventHandler value)
at Microsoft.Build.CommandLine.MSBuildApp.Execute(String[] commandLine) in E:\A\_work\17\s\src\MSBuild\XMake.cs:line 748
at Microsoft.Build.CommandLine.MSBuildApp.Main(String[] args) in E:\A\_work\17\s\src\MSBuild\XMake.cs:line 215
About this issue
- Original URL
- State: closed
- Created 6 years ago
- Reactions: 11
- Comments: 69 (18 by maintainers)
Commits related to this issue
- change default term to urxvt for dotnet/corefx#26966 — committed to jogleasonjr/vscode by deleted user 6 years ago
@welkie as a workaround this should work:
@danmosemsft, frankly based on the impact of this issue, this should had been prioritized and shipped by now (the merge in release/2.0 branch happened 31 days ago) and folks are still waiting and opening duplicate issues all over the place.
That workaround will work, but we are working on adding support for ncurses 6.1 on Console so that this workaround isn’t required. I have a PR up right (#27109) now which we will merge as soon as I fix one last issue I’m seeing and we will then merge that change into release branch so that it makes it to the 2.1 release.
Few hours ago 2.1.0 Preview2 was released. I can confirm that the fix works 👍
Here is PKGBUILD for people in need. https://raw.githubusercontent.com/instalab/DotNetArch/master/PKGBUILD
PR has been merged now, so this change is in master and will soon make it to our release branches. The fix should be there for release/2.1 preview 2, and I will also backport this to our other release branches.
And here is PKGBUILD of dotnet-runtime, for people in need: https://raw.githubusercontent.com/instalab/DotNetCoreArch/master/PKGBUILD
Backport pull requests are in progress:
https://github.com/dotnet/corefx/pull/27614 - v2.0.0 https://github.com/dotnet/corefx/pull/27632 - v1.1.0 https://github.com/dotnet/corefx/pull/27634 - v1.0.0
@joperezr, when it will be backported to 2.0, 1.1 and 1.0 branches, how it will be shipped? Would there be a minor/patch version update and we will have to wait for a release that will be announced on .NET Blog at some point. Or do the releases after backport immediately available for consumption? Not asking for ETA etc. but trying to understand usually on what grounds team decides to release the next minor/patch version?
v2.0.7 is out https://github.com/dotnet/core/blob/master/release-notes/2.0/2.0.7.md with the fix for .Net Core 2.0. We can release Arch Linux package. @welkie, do you know who maintains the package?
2.1.300-preview2-008530confirmed working on Antergos. Able to build without changingXTERMetc.Awesome. 😃 Thanks for your work on this.
@instalab Those worked great for me, thank you! I’ve finally got my VS Code dev environment working again. No more switching into Windows. 🐧
@kasper3 The maintainer is Maxime Gauduin. It looks like it was already flagged out of date on April 5th but they have not yet updated it.
The Arch package is on 2.1.103 right now. So we’d need the them to update the Arch package to 2.1.105.
@himejisyana are you building from the integrated terminal in VSCode, or using the debugger? If the former, you can just set
TERM=xtermonce in the integrated terminal. If the latter, what you’re doing is possible intasks.json. See what I wrote above for an example of that.In both case you wouldn’t need to hijack your PATH or the dotnet executable.
Side note - if you use
xterm-256colorin place ofxterm, you’ll get colored output for warnings and errors in the integrated terminal.There will be a patch version update which we will announce on the blog. In general we are servicing at roughly monthly intervals: these would not be in this month’s, but potentially not too long.
You can download old versions of ncurses from https://archive.archlinux.org/repos/2018/02/17/core/os/x86_64/ and then use pacman -U to roll back this one (note: this may cause serious consequences)
none of the workarounds worked for me, I had to write an extra script with the same name called
dotnetand the contents are:Then make sure only this script is on the PATH, not the real dotnet executable so that vscode can only call this script. The exec line replaces the process in place so that everything keeps working properly even in debug.
@lewurm I am running Tumbleweed on my laptop with ncurses 6.1-1.1 and dotnet 2.1.4. Tried several terminals: