jwill / lanterna

Automatically exported from code.google.com/p/lanterna
GNU Lesser General Public License v3.0
0 stars 0 forks source link

Error from lanterna while showing a wide table on a window #49

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
I run into this issue and start getting exceptions in an infinite loop when I 
show a table that's wider than a certain width. This happens with v2.1.1 of 
lanterna. I am attaching the source file that reproduces this issue here. 
However I was able to get the same code working with v2.0.3 of lanterna(with 
minor API related changes ofcourse).

Generated exception

java.lang.IllegalArgumentException: TerminalSize.columns cannot be less than 0!
    at com.googlecode.lanterna.terminal.TerminalSize.setColumns(TerminalSize.java:49)
    at com.googlecode.lanterna.gui.TextGraphics.subAreaGraphics(TextGraphics.java:111)
    at com.googlecode.lanterna.gui.component.Panel.repaint(Panel.java:143)
    at com.googlecode.lanterna.gui.component.Table.repaint(Table.java:147)
    at com.googlecode.lanterna.gui.component.Panel.repaint(Panel.java:147)
    at com.googlecode.lanterna.gui.component.Panel.repaint(Panel.java:147)
    at com.googlecode.lanterna.gui.component.Panel.repaint(Panel.java:147)
    at com.googlecode.lanterna.gui.Window.repaint(Window.java:133)
    at com.googlecode.lanterna.gui.GUIScreen.repaint(GUIScreen.java:187)
    at com.googlecode.lanterna.gui.GUIScreen.update(GUIScreen.java:200)
    at com.googlecode.lanterna.gui.GUIScreen.doEventLoop(GUIScreen.java:235)
    at com.googlecode.lanterna.gui.GUIScreen.showWindow(GUIScreen.java:307)
    at com.googlecode.lanterna.gui.GUIScreen.showWindow(GUIScreen.java:263)
    at TestMain.main(TestMain.java:65)

Original issue reported on code.google.com by m.vino...@gmail.com on 15 Nov 2012 at 7:05

Attachments:

GoogleCodeExporter commented 9 years ago
I can reproduce this too, must be something wrong with the layout system

Original comment by mab...@gmail.com on 18 Nov 2012 at 10:04

GoogleCodeExporter commented 9 years ago
Ok, I think I've fixed it now. If you can, please try latest 2.1.x branch or 
default. I've pushed out new snapshots to sonatype as well.

Original comment by mab...@gmail.com on 18 Nov 2012 at 12:21