What steps will reproduce the problem?
1. Load an invalid FEN string. For example, a file with just
"8/q6k/q6p/pR3Np1/P3P3/6P1/1Q3P1P/6K1" in it.
What is the expected output? What do you see instead?
pychess should probably display a warning dialog giving an error message.
Instead it crashes:
Traceback (most recent call last):
File "/home/gatto/code/hg/pychess/lib/pychess/widgets/BoardPreview.py", line 123, in on_selection_changed
self.chessfile.loadToModel(sel, -1, self.gamemodel)
File "/home/gatto/code/hg/pychess/lib/pychess/Savers/fen.py", line 32, in loadToModel
model.boards = [model.variant.board(setup=fen)]
File "/home/gatto/code/hg/pychess/lib/pychess/Utils/Board.py", line 41, in __init__
self.board.applyFen(setup)
File "/home/gatto/code/hg/pychess/lib/pychess/Utils/lutils/LBoard.py", line 139, in applyFen
len(fenstr)
SyntaxError: Needs at least 6 fields in fenstr. Pos(36)
Original issue reported on code.google.com by mattgatto on 22 Jan 2014 at 2:47
Original issue reported on code.google.com by
mattgatto
on 22 Jan 2014 at 2:47