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 02 Jun 2009 11:58:30 AM UTC  
 
Category: poker-networkSeverity: 2 - Minor
Priority: 3 - LowStatus: Need Info
Privacy: PublicAssigned to: None
Open/Closed: Open

Tue 23 Feb 2010 06:07:49 PM UTC, comment #3:

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

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

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

if not other_table.update_recursion:
other_table.scheduleAutoDeal()

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 02 Jun 2009 12:13:02 PM UTC, comment #1:

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

other_table.sendNewPlayerInformation(serial)
other_table.update()

Loic Dachary <loic>
Project Administrator
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

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.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 2 latest changes.

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

    Back to the top


    Powered by Savane 3.1-cleanup