bugpokersource - Bugs: bug #13613, pokertable tournament update...

Show feedback again

You are not allowed to post comments on this tracker with your current authentification level.

bug #13613: pokertable tournament update recursion

Submitted by:  Loic Dachary <loic>
Submitted on:  Tue Jun 2 11:58:30 2009  
Category: poker-networkSeverity: 2 - Minor
Priority: 3 - LowStatus: Need Info
Privacy: PublicAssigned to: None
Open/Closed: Open

Tue Feb 23 18:07:49 2010, comment #3:

Does this still happen with latest version of poker-network 1.7.7 or 2.0 ?

Johan Euphrosine <proppy>
Project Member
Tue Jun 2 12:38:07 2009, comment #2:

A tentative patch would be to replace movePlayer other_table.update with

if not other_table.update_recursion:

since the comment associated with other_table.update addition is

r4769 | loic | 2008-10-23 17:36:38 +0200 (Thu, 23 Oct 2008) | 2 lines : call update when the player moves or the hand may not be dealt in a heads up tournament table.

The action associated with movePlayer / balance games was designed to not create any pokergame events that would require calling table.update

Loic Dachary <loic>
Project Administrator
Tue Jun 2 12:13:02 2009, comment #1:

In pokertable.py:movePlayer the update is called at the end of the function and nothing is done afterwards.


Loic Dachary <loic>
Project Administrator
Tue Jun 2 11:58:30 2009, 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,] File "/usr/lib/python2.5/site-packages/pokernetwork/pokeravatar.py", line 342, in handlePacketDefer
2009-06-01 17:47:50+0200 [HTTPChannel,37619321,] self.handlePacketLogic(packet)
2009-06-01 17:47:50+0200 [HTTPChannel,37619321,] File "/usr/lib/python2.5/site-packages/pokernetwork/pokeravatar.py", line 771, in handlePacketLogic
2009-06-01 17:47:50+0200 [HTTPChannel,37619321,] table.update()
2009-06-01 17:47:50+0200 [HTTPChannel,37619321,] File "/usr/lib/python2.5/site-packages/pokernetwork/pokertable.py", line 855, in update
2009-06-01 17:47:50+0200 [HTTPChannel,37619321,] self.tourneyEndTurn()
2009-06-01 17:47:50+0200 [HTTPChannel,37619321,] File "/usr/lib/python2.5/site-packages/pokernetwork/pokertable.py", line 681, in tourneyEndTurn
2009-06-01 17:47:50+0200 [HTTPChannel,37619321,] self.factory.tourneyEndTurn(self.tourney, game.id)
2009-06-01 17:47:50+0200 [HTTPChannel,37619321,] File "/usr/lib/python2.5/site-packages/pokernetwork/pokerservice.py", line 828, in tourneyEndTurn
2009-06-01 17:47:50+0200 [HTTPChannel,37619321,] if not tourney.endTurn(game_id):
2009-06-01 17:47:50+0200 [HTTPChannel,37619321,] File "/usr/lib/python2.5/site-packages/pokerengine/pokertournament.py", line 493, in endTurn
2009-06-01 17:47:50+0200 [HTTPChannel,37619321,] if loosers_count > 0 or self.need_balance: self.balanceGames()
2009-06-01 17:47:50+0200 [HTTPChannel,37619321,] File "/usr/lib/python2.5/site-packages/pokerengine/pokertournament.py", line 522, in balanceGames
2009-06-01 17:47:50+0200 [HTTPChannel,37619321,] self.callback_move_player(self, from_id, to_id, serial)
2009-06-01 17:47:50+0200 [HTTPChannel,37619321,] File "/usr/lib/python2.5/site-packages/pokernetwork/pokerservice.py", line 955, in tourneyMovePlayer
2009-06-01 17:47:50+0200 [HTTPChannel,37619321,] from_table.movePlayer(from_table.serial2client.get(serial, None), serial, to_game_id)
2009-06-01 17:47:50+0200 [HTTPChannel,37619321,] File "/usr/lib/python2.5/site-packages/pokernetwork/pokertable.py", line 1061, in movePlayer
2009-06-01 17:47:50+0200 [HTTPChannel,37619321,] other_table.update()
2009-06-01 17:47:50+0200 [HTTPChannel,37619321,] File "/usr/lib/python2.5/site-packages/pokernetwork/pokertable.py", line 839, in update
2009-06-01 17:47:50+0200 [HTTPChannel,37619321,] self.error("unexpected recursion (ignored)\n" + "".join(traceback.format_list(traceback.extract_stack())))
2009-06-01 17:47:50+0200 [HTTPChannel,37619321,]

Loic Dachary <loic>
Project Administrator


No files currently attached


Depends on the following items: None found

Items that depend on this one: None found


Carbon-Copy List
  • -unavailable- added by proppy (Posted a comment)
  • -unavailable- added by loic (Submitted the item)

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.


    Error: not logged in



    Follow 2 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Tue Feb 23 18:07:49 2010proppyCategoryNone=>poker-network
      StatusConfirmed=>Need Info
    Show feedback again

    Back to the top

    Powered by Savane 3.1-cleanup