question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Update to ncurses causes sbt to throw an exception on startup

See original GitHub issue

After upgrading ncurses, starting sbt shows the following error:

amu ~ >sbt
[ERROR] Failed to construct terminal; falling back to unsupported
java.lang.NumberFormatException: For input string: "0x100"
at java.lang.NumberFormatException.forInputString(NumberFormatException.java:65)
at java.lang.Integer.parseInt(Integer.java:580)
at java.lang.Integer.valueOf(Integer.java:766)
at jline.internal.InfoCmp.parseInfoCmp(InfoCmp.java:59)
at jline.UnixTerminal.parseInfoCmp(UnixTerminal.java:233)
...

This is because of a recent update to ncurses: http://invisible-island.net/ncurses/NEWS.html#index-t20170506

    + modify tic/infocmp display of numeric values to use hexadecimal when
          they are "close" to a power of two, making the result more readable.

steps

I’m using Arch Linux and have ncurses updated from 6.0+20170429-1 to 6.0+20170527-1. Just run sbt after installing the newest version and the error will appear.

problem

sbt uses jline for some terminal stuff. jline itself uses the infocmp utility provided by ncurses to determine terminal capabilities. It didn’t expect a hex value and only parsed decimal values. This behaviour was already fixed: https://github.com/jline/jline2/commit/c1b1676de1803278289af0622ad202f1c7a526ec

sbt should update its jline dependency to include the fix.

expectation

sbt should start without issues.

notes

Using sbt version 0.13.15.

Is it possible to force sbt to use a locally compiled version of jline?

Stackoverflow issue: https://stackoverflow.com/q/44317384/2014080 jline issue: https://github.com/jline/jline2/issues/281

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Reactions:29
  • Comments:42 (17 by maintainers)

github_iconTop GitHub Comments

103reactions
captainjucommented, Jun 6, 2017

I found using export TERM=xterm-color better than downgrading ncurses

10reactions
wsxarchercommented, Jun 6, 2017

jline-2.14.4 is out with the fix

Read more comments on GitHub >

github_iconTop Results From Across the Web

sbt Reference Manual — Combined Pages
The command causes the build.sbt file to be re-read, and its settings applied. ... Throws an error if you run sbt from /...
Read more >
scala - sbt.TrapExitSecurityException thrown at "sbt run"
The class exactly shows when the exception sbt.TrapExitSecurityException gets thrown - whenever the method java.lang.Runtime.exit(int) is called.
Read more >
org/netbeans/modules/scala/sbt/project/SBTProjectOpenedHook
Add an attachment (proposed patch, testcase, etc.) ... project n.mirzadeh: Error raised during importing a Scala project GUEST: create sbt ...
Read more >
chromium / external / github.com / python ... - Google Git
Issue #15394: An issue in PyModule_Create that caused references to be leaked. on some error paths has been fixed. Patch by Julia Lawall....
Read more >
Bug listing with status UNCONFIRMED as at 2022/12/19 13 ...
StackOverflowError thrown from the UncaughtExceptionHandler in thread "process ... Bug:601898 - "sys-apps/portage: slot conflict during ncurses-6 upgrade, ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found