Terminal.Gui: Debian issues, Unhandled exception

Hi All,

i have a console Application which is running fine on windows. Now i built it for linux-x64 and wanted it to run on my debian 10 machine. I get the following error and have no clue where to look for issues.

Unhandled exception. System.ArgumentOutOfRangeException: Specified argument was out of the range of valid values. (Parameter 'Value is beyond the supplementary range!') at System.Rune..ctor(UInt32 rune) at System.Rune.op_Implicit(UInt32 value) at Terminal.Gui.CursesDriver.Init(Action terminalResized) at Terminal.Gui.Application.Init(Func1 topLevelFactory, ConsoleDriver driver, IMainLoopDriver mainLoopDriver) at Terminal.Gui.Application.Run[T]() at my.Program.Main() Aborted

Sorry in advance if this is a easy fix but i couldnt find anything related yet.

KR Pete

About this issue

  • Original URL
  • State: closed
  • Created 3 years ago
  • Comments: 17

Most upvoted comments

On WSL (Debian and Ubuntu) I am getting the same error. Will try another distro soon too. I am still using Terminal gui 0.9 can that be an issue?

I really don’t know as I’m using the latest master version. Please try with this version and then say anything.

I tried all and didnt work. I ended up copying all my code to a new solution… this worked… i dunno what fucked up my old one.

Sorry for all the inconveniences and thank you for your help!

KR Pete

using Terminal.Gui;

namespace hzauto
{
    static class Program
    {
        static void Main()
        {
            Application.Run<HzAuto>();
        }
    }
}

< Program.cs

partial class HzAuto : Window
    {
        public HzAuto()
        {
            _leftPane = new FrameView("Main")
            {
                X = 0,
                Y = 1, // for menu
                Width = 25,
                Height = Dim.Fill(1),
                CanFocus = false
            };
            _leftPane.Title = $"{_leftPane.Title}";

            _rightPane = new FrameView("hzAuto")
            {
                X = 25,
                Y = 1, // for menu
                Width = Dim.Fill(),
                Height = Dim.Fill(1),
                CanFocus = true
            };
            _rightPane.Title = $"{_rightPane.Title}";

            _capslock = new StatusItem(Key.CharMask, "Caps", null);
            _numlock = new StatusItem(Key.CharMask, "Num", null);
            _scrolllock = new StatusItem(Key.CharMask, "Scroll", null);

            _statusBar = new StatusBar()
            {
                Visible = true,
            };
            _statusBar.Items = new StatusItem[] {
                _capslock,
                _numlock,
                _scrolllock,
                new StatusItem(Key.F10, "~F10~ Hide/Show Status Bar", () => {
                    _statusBar.Visible = !_statusBar.Visible;
                    _leftPane.Height = Dim.Fill(_statusBar.Visible ? 1 : 0);
                    _rightPane.Height = Dim.Fill(_statusBar.Visible ? 1 : 0);
                    this.LayoutSubviews();
                }),
            };

            this.KeyDown += KeyDownHandler;
            this.Add(_leftPane);
            this.Add(_rightPane);
            this.Add(_statusBar);


        }
}

< hzauto.cs

This is what i have and if i try to run this remote via ssh on my server i get the error from up. Cant get the Code formatting here right somehow, sorry for that.

KR and thanks for the help!