Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

sample-lanterna-java : exception on terminal size #103

Open
shoon opened this issue Sep 11, 2015 · 1 comment
Open

sample-lanterna-java : exception on terminal size #103

shoon opened this issue Sep 11, 2015 · 1 comment

Comments

@shoon
Copy link

shoon commented Sep 11, 2015

Remoting into an Ubuntu 14.04 machine with bash shell and byobu (screen) and running the lanterna sample is not able to get the terminal size:

[2015-09-11 09:55:48,276] [main] ERROR griffon.core.GriffonExceptionHandler - Uncaught Exception
java.io.IOException: Timeout while waiting for terminal size report! Maybe your terminal doesn't support cursor position report, please consider using a custom size querier
        at com.googlecode.lanterna.terminal.InputEnabledAbstractTerminal.waitForTerminalSizeReport(InputEnabledAbstractTerminal.java:79)
        at com.googlecode.lanterna.terminal.text.ANSITerminal.getTerminalSize(ANSITerminal.java:62)
        at com.googlecode.lanterna.terminal.text.UnixTerminal.getTerminalSize(UnixTerminal.java:159)
        at com.googlecode.lanterna.screen.Screen.startScreen(Screen.java:203)
        at griffon.lanterna.LanternaGriffonApplication.initialize(LanternaGriffonApplication.java:47)
        at org.example.Launcher.main(Launcher.java:7)

Possible solution is to use private mode prior to requesting the size:

        terminal.enterPrivateMode();
        TerminalSize terminalSize = terminal.getTerminalSize();
        terminal.exitPrivateMode();

Older discussion here:
https://code.google.com/p/lanterna/issues/detail?id=61

Steps to recreate

lazybones create griffon-lanterna-java sample-lanterna-java
  (select defaults)
cd sample-lanterna-java/
gradle build
gradle run
@shoon
Copy link
Author

shoon commented Sep 11, 2015

This worked just fine on a windows machine so probably something to do with the remote session, will keep looking

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant