Closed schuettec closed 3 years ago
After fiddling around I found out that the error occurs if the terminal window is not big enough to display the message dialog box. I put a stacktrace in the message dialog and it exceeds the window width.
What can I do?
Best thing to do would be creating a pull request with a fix for it ;-)
Otherwise, someone else might look into it and - unless the other one is mabe02 himself - create a PR as well...
I likely won't get into it in the next few days, but maybe more likely towards the weekend.
On Sat, May 1, 2021 at 10:16 AM Christopher Schütte < @.***> wrote:
After fiddling around I found out that the error occurs if the terminal window is not big enough to display the message dialog box. I put a stacktrace in the message dialog and it exceeds the window width.
What can I do?
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/mabe02/lanterna/issues/544#issuecomment-830578190, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABIDBMSGWBZQJGCU5P7XT5LTLO2FLANCNFSM436CTQMQ .
Hi, I figured out that the error came from an invalid layout data: BorderLayout settings were passed into a GridLayout. I think the API should prevent such errors with an exception but this seems only to happen if the actual layout becomes visible.
The above exception is a consequence of this. I will close this one.
Hi, nice library, thanks for that work! I got a StringIndexOutOfBoundsException in one of my applications. I tried to build an SSCCE but I cannot reproduce the bug in a short example. In my application I use two nested panels, basically a BorderLayout as parent and a GridLayout in a child component. When showing a message dialog using
the following exception occurs:
I tried to analyse the problem: The string that is processed in method
TerminalTextUtils.getStringCharacterIndex(TerminalTextUtils.java:230)
has a length of 83. The methodTerminalTextUtils.getWordWrappedText(TerminalTextUtils.java:323)
in the parent stack frame uses some width of a component, somaxWidth
is 86. The loop inTerminalTextUtils.getStringCharacterIndex(TerminalTextUtils.java:230)
overruns the string length.This might be a simple bug I think.