fowode / pychess

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

pre-move crash in Pieces.drawPiece2 #806

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
I was trying to make (or made; can't remember which) a premove and my opponent 
made his move which caused this crash:

13:58:07 ('mgatto', 'lines') Debug: <12> -------- ----R--- -------- ------K- 
-P-k---- -------- P---pr-- -------- B -1 0 0 0 0 0 417 Tetragrammaton mgatto 1 
7 0 7 6 56970 4093 48 P/b3-b4 (0:04.447) b4 1 1 88
13:58:07 Default Debug: ICGameModel.onBoardUpdate: id=140390346034464 
self.ply=94 self.players=[Tetragrammaton (1583), mgatto (1702)] gameno=417 
wname=Tetragrammaton bname=mgatto ply=95 curcol=1 lastmove=b4 
fen=8/4R3/8/6K1/1P1k4/8/P3pr2/8 b - - 0 48 wms=56970 bms=4093
13:58:07 Default Debug: ICGameModel.onBoardUpdate: id=140390346034464, 
self.players=[Tetragrammaton (1583), mgatto (1702)]: updating time and/or ply
13:58:07 Default Debug: ICGameModel.onBoardUpdate: id=140390346034464 
self.players=[Tetragrammaton (1583), mgatto (1702)]: updating timemodel
13:58:07 Default Debug: ICPlayer.__boardUpdate: id(self)=140390340539728 
self=Tetragrammaton (1583) 417 Tetragrammaton mgatto 95 1 b4 
8/4R3/8/6K1/1P1k4/8/P3pr2/8 b - - 0 48 56970 4093
13:58:07 Default Debug: ICPlayer.__boardUpdate: id=140390340539728 
self=Tetragrammaton (1583) gameno=417: this is my move
13:58:07 Default Debug: ICPlayer.__boardUpdate: id=140390340539728 
self=Tetragrammaton (1583) ply=95: putting move=b4 in queue
13:58:07 Default Debug: ICPlayer.makemove: id(self)=140390340539728 
self=Tetragrammaton (1583) from queue got: ply=95 sanmove=b4
13:58:07 Default Debug: ICPlayer.makemove: id(self)=140390340539728 
self=Tetragrammaton (1583) parsed move=b3b4
13:58:07 Default Debug: ICPlayer.makemove: id(self)=140390340539728 
self=Tetragrammaton (1583) returning move=b3b4
13:58:07 Default Debug: GameModel.run: id=140390346034464, 
players=[Tetragrammaton (1583), mgatto (1702)], self.ply=94: got move=b3b4 from 
Tetragrammaton (1583)
13:58:07 ('mgatto', 'onStyle12') Debug: <12> -------- ----R--- -------- 
------K- -P-k---- -------- P---pr-- -------- B -1 0 0 0 0 0 417 Tetragrammaton 
mgatto 1 7 0 7 6 56970 4093 48 P/b3-b4 (0:04.447) b4 1 1 88
13:58:07 Default Debug: GameModel.run: id=140390346034464, 
players=[Tetragrammaton (1583), mgatto (1702)], self.ply=94: acquiring 
self.applyingMoveLock
13:58:07 Default Debug: GameModel.run: id=140390346034464, 
players=[Tetragrammaton (1583), mgatto (1702)], self.ply=94: applying move=b3b4
13:58:07 ('mgatto', 'lines') Debug: 
13:58:07 ('mgatto', 'nonmatched') Debug: 
13:58:07 Default Debug: GameModel.run: releasing self.applyingMoveLock
13:58:07 Default Debug: GameModel.run: id=140390346034464, 
players=[Tetragrammaton (1583), mgatto (1702)], self.ply=95: updating mgatto 
(1702)'s time
13:58:07 Default Debug: GameModel.run: id=140390346034464, 
players=[Tetragrammaton (1583), mgatto (1702)], self.ply=95: calling mgatto 
(1702).makeMove()
13:58:07 Default Debug: Human.makeMove: move=b3b4, board1=#Black - -
# . . . . . . . . 
# . . . . ♖ . . . 
# . . . . . . . . 
# . . . . . . ♔ . 
# . ♙ . ♚ . . . . 
# . . . . . . . . 
# ♙ . . . ♟ ♜ . . 
# . . . . . . . . 
#  board2=#White - -
# . . . . . . . . 
# . . . . ♖ . . . 
# . . . . . . . . 
# . . . . . . ♔ . 
# . . . ♚ . . . . 
# . ♙ . . . . . . 
# ♙ . . . ♟ ♜ . . 
# . . . . . . . . 
# 
13:58:07 Default Debug: Human.makeMove: Setting move to premove d4 d3
13:58:07 ('GuestQVMR', 'raw') Debug: 
{Game 204 (imodium vs. pulsefrequency) pulsefrequency checkmated} 1-0
fics% 
imodium Blitz (1860), Std (2123), Wild (----), Light(----), Bug(----)
  is now available for matches.
fics% 
pulsefrequency Blitz (1849), Std (1593), Wild (----), Light(1720), Bug(----)
  is now available for matches.
fics% 
13:58:07 ('GuestQVMR', 'nonmatched') Debug: 
13:58:07 ('GuestQVMR', 'lines') Debug: {Game 204 (imodium vs. pulsefrequency) 
pulsefrequency checkmated} 1-0
13:58:09 stdout Debug: Traceback (most recent call last):
13:58:09 stdout Debug:   File 
"/home/gatto/code/hg/pychess/lib/pychess/widgets/BoardView.py", line 581, in 
expose
13:58:09 stdout Debug:     self.draw(context, event.area)
13:58:09 stdout Debug:   File 
"/home/gatto/code/hg/pychess/lib/pychess/widgets/BoardView.py", line 656, in 
draw
13:58:09 stdout Debug:     self.drawPieces (context, r)
13:58:09 stdout Debug:   File 
"/home/gatto/code/hg/pychess/lib/pychess/widgets/BoardView.py", line 889, in 
drawPieces
13:58:09 stdout Debug:     self.__drawPiece(context, self.premovePiece, 
self.premove1.x, self.premove1.y)
13:58:09 stdout Debug:   File 
"/home/gatto/code/hg/pychess/lib/pychess/widgets/BoardView.py", line 820, in 
__drawPiece
13:58:09 stdout Debug:     s-CORD_PADDING*2, 
allWhite=self.model.variant==AllWhiteChess)
13:58:09 stdout Debug:   File 
"/home/gatto/code/hg/pychess/lib/pychess/gfx/Pieces.py", line 65, in drawPiece2
13:58:09 stdout Debug:     if not psize in 
parsedPieces[piece.color][piece.sign]:
13:58:09 stdout Debug: AttributeError: 'NoneType' object has no attribute 
'color'

Original issue reported on code.google.com by mattgatto on 6 Aug 2013 at 10:03

GoogleCodeExporter commented 9 years ago
It was a Fischer Random game.

Original comment by mattgatto on 6 Aug 2013 at 10:07

Attachments:

GoogleCodeExporter commented 9 years ago
This issue was closed by revision d08e7ae251fd.

Original comment by gbtami on 22 Aug 2013 at 9:40

GoogleCodeExporter commented 9 years ago

Original comment by gbtami on 27 Aug 2013 at 1:13

GoogleCodeExporter commented 9 years ago
Committed a possible (trivial) fix in rev 0e1666bb5eb6.

Original comment by gbtami on 29 Aug 2013 at 9:42

GoogleCodeExporter commented 9 years ago

Original comment by gbtami on 12 Feb 2014 at 2:18