Tue 02 Jun 2009 11:58:30 AM UTC, original submission:
When endTurn is run because of a packet received by tableA and balanceGame breaks tableA, the movePlayer callback will invoque table.update and trigger a recursion warning.
There should be a way to detect this specific case and not run table.update. Since the table.update is called at the very end of the process, there is no harm done.
2009-06-01 17:47:50+0200 [HTTPChannel,37619321,172.19.21.3] File "/usr/lib/python2.5/site-packages/pokernetwork/pokeravatar.py", line 342, in handlePacketDefer
2009-06-01 17:47:50+0200 [HTTPChannel,37619321,172.19.21.3] self.handlePacketLogic(packet)
2009-06-01 17:47:50+0200 [HTTPChannel,37619321,172.19.21.3] File "/usr/lib/python2.5/site-packages/pokernetwork/pokeravatar.py", line 771, in handlePacketLogic
2009-06-01 17:47:50+0200 [HTTPChannel,37619321,172.19.21.3] table.update()
2009-06-01 17:47:50+0200 [HTTPChannel,37619321,172.19.21.3] File "/usr/lib/python2.5/site-packages/pokernetwork/pokertable.py", line 855, in update
2009-06-01 17:47:50+0200 [HTTPChannel,37619321,172.19.21.3] self.tourneyEndTurn()
2009-06-01 17:47:50+0200 [HTTPChannel,37619321,172.19.21.3] File "/usr/lib/python2.5/site-packages/pokernetwork/pokertable.py", line 681, in tourneyEndTurn
2009-06-01 17:47:50+0200 [HTTPChannel,37619321,172.19.21.3] self.factory.tourneyEndTurn(self.tourney, game.id)
2009-06-01 17:47:50+0200 [HTTPChannel,37619321,172.19.21.3] File "/usr/lib/python2.5/site-packages/pokernetwork/pokerservice.py", line 828, in tourneyEndTurn
2009-06-01 17:47:50+0200 [HTTPChannel,37619321,172.19.21.3] if not tourney.endTurn(game_id):
2009-06-01 17:47:50+0200 [HTTPChannel,37619321,172.19.21.3] File "/usr/lib/python2.5/site-packages/pokerengine/pokertournament.py", line 493, in endTurn
2009-06-01 17:47:50+0200 [HTTPChannel,37619321,172.19.21.3] if loosers_count > 0 or self.need_balance: self.balanceGames()
2009-06-01 17:47:50+0200 [HTTPChannel,37619321,172.19.21.3] File "/usr/lib/python2.5/site-packages/pokerengine/pokertournament.py", line 522, in balanceGames
2009-06-01 17:47:50+0200 [HTTPChannel,37619321,172.19.21.3] self.callback_move_player(self, from_id, to_id, serial)
2009-06-01 17:47:50+0200 [HTTPChannel,37619321,172.19.21.3] File "/usr/lib/python2.5/site-packages/pokernetwork/pokerservice.py", line 955, in tourneyMovePlayer
2009-06-01 17:47:50+0200 [HTTPChannel,37619321,172.19.21.3] from_table.movePlayer(from_table.serial2client.get(serial, None), serial, to_game_id)
2009-06-01 17:47:50+0200 [HTTPChannel,37619321,172.19.21.3] File "/usr/lib/python2.5/site-packages/pokernetwork/pokertable.py", line 1061, in movePlayer
2009-06-01 17:47:50+0200 [HTTPChannel,37619321,172.19.21.3] other_table.update()
2009-06-01 17:47:50+0200 [HTTPChannel,37619321,172.19.21.3] File "/usr/lib/python2.5/site-packages/pokernetwork/pokertable.py", line 839, in update
2009-06-01 17:47:50+0200 [HTTPChannel,37619321,172.19.21.3] self.error("unexpected recursion (ignored)\n" + "".join(traceback.format_list(traceback.extract_stack())))
2009-06-01 17:47:50+0200 [HTTPChannel,37619321,172.19.21.3]
2
|