contour: Set terminal title by .Net console application throwing an exception
Contour Terminal version
0.3.11.258
Installer source
GitHub: release page
Operating System
Ubuntu 22.04.2 LTS
Architecture
x86-64
Other Software
NVIM v0.9.0
Steps to reproduce
Creating a dotnet console application with:
dotnet new console
That will creates a .Net application, so just edit the file Program.cs:
Console.Title = "Test"
And run it:
dotnet run
Expected Behavior
The behavior expected is the name of console changes the bottom title bar:
Before execution:
After execution:
Actual Behavior
Throwing an exception:
Unhandled exception. System.InvalidOperationException: Stack empty.
at System.Collections.Generic.Stack`1.ThrowForEmptyStack()
at System.Collections.Generic.Stack`1.Pop()
at System.TermInfo.ParameterizedStrings.EvaluateInternal(String format, Int32& pos, FormatParam[] args, Stack`1 stack, FormatParam[]& dynamicVars, FormatParam[]& staticVars)
at System.TermInfo.ParameterizedStrings.Evaluate(String format, FormatParam[] args)
at System.ConsolePal.set_Title(String value)
Additional notes
No response
About this issue
- Original URL
- State: closed
- Created a year ago
- Comments: 21 (14 by maintainers)
To summarise the Discord’s outcome.
tslstands for “to status line” and was only abused by xterm and the likes to set the window title, which is wrong to begin with)We’ve fixed the problem for @AugustoDeveloper by providing an up-to-date terminfo file (which contains a more trivialized form of
tslto move to the (host writable) status line, which also does not imply 2 parameters on the stack anymore.But it also showed that we really should create a new bugfix release ASAP. 😃
I can’t reproduce it on latest master
Looks like something is wrond with terminfo file, can you check what is
echo $TERMtelling you? First thing that you can try is to set same TERM (export TERM=....) for contour as for gnome-terminal, and see if this will resolve issue, then we can identify what we need to fix exactly.