Race condition when logging message while JLine is not reading input
Closed this issue · 1 comments
stephan-gh commented
Related to PaperMC/Waterfall#188, PaperMC/Paper#1093
There is a possible race condition when logging a message using TerminalConsoleAppender, while the JLine LineReader
is changing state (e.g. shortly before it starts reading or shortly after).
This results in an error when re-drawing the input prompt:
ERROR An exception occurred processing Appender TerminalConsole java.lang.IllegalStateException
at org.jline.reader.impl.LineReaderImpl.callWidget(LineReaderImpl.java:651)
at net.minecrell.terminalconsole.TerminalConsoleAppender.append(TerminalConsoleAppender.java:265)
at org.apache.logging.log4j.core.config.AppenderControl.tryCallAppender(AppenderControl.java:156)
at org.apache.logging.log4j.core.config.AppenderControl.callAppender0(AppenderControl.java:129)
at org.apache.logging.log4j.core.config.AppenderControl.callAppenderPreventRecursion(AppenderControl.java:120)
at org.apache.logging.log4j.core.config.AppenderControl.callAppender(AppenderControl.java:84)
at org.apache.logging.log4j.core.config.LoggerConfig.callAppenders(LoggerConfig.java:448)
stephan-gh commented
Related: jline/jline3#292