bugpokersource - Bugs: bug #18471, rarely, when a player move to...

 
 
Show feedback again

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

bug #18471: rarely, when a player move to another table, it can block the tournament

Submitted by:  Vandemeulebroucke <ramboz>
Submitted on:  Mon 08 Aug 2011 09:08:52 PM UTC  
 
Category: poker-networkSeverity: 3 - Normal
Priority: 5 - NormalStatus: None
Privacy: PublicAssigned to: None
Open/Closed: Open

Mon 08 Aug 2011 09:08:52 PM UTC, original submission:

stack trace :

[HTTPChannel,1896316,127.0.0.1] File "/usr/lib/python2.5/site-packages/pokerengine/pokertournament.py", line 521, in balanceGames
[HTTPChannel,1896316,127.0.0.1] self.callback_move_player(self, from_id, to_id, serial)
[HTTPChannel,1896316,127.0.0.1] File "/usr/lib/python2.5/site-packages/pokernetwork/pokerservice.py", line 1032, in tourneyMovePlayer
[HTTPChannel,1896316,127.0.0.1] to_game_id, reason = PacketPokerTable.REASON_TOURNEY_MOVE)
[HTTPChannel,1896316,127.0.0.1] File "/usr/lib/python2.5/site-packages/pokernetwork/pokertable.py", line 1106, in movePlayer
[HTTPChannel,1896316,127.0.0.1] self.destroyPlayer(avatar, serial)
[HTTPChannel,1896316,127.0.0.1] File "/usr/lib/python2.5/site-packages/pokernetwork/pokertable.py", line 1364, in destroyPlayer
[HTTPChannel,1896316,127.0.0.1] del avatar.tables[self.game.id]
[HTTPChannel,1896316,127.0.0.1] exceptions.KeyError: 1075L
[HTTPChannel,1896316,127.0.0.1]

I fixed the problem with the following patch:

#P poker-network-trunk
Index: pokernetwork/pokertable.py
===================================================================
--- pokernetwork/pokertable.py (revision 6581)
+++ pokernetwork/pokertable.py (working copy)
@@ -1325,7 +1325,10 @@
self.observers.remove(avatar)
else:
self.avatar_collection.remove(serial, avatar)
- del avatar.tables[self.game.id]
+ if self.game.id in avatar.tables:
+ del avatar.tables[self.game.id]
+ else:
+ self.error("server can't remove a table for player %d : game_id is not in the list of know tables " % serial)

def buyInPlayer(self, avatar, amount):
game = self.game

Vandemeulebroucke <ramboz>

 

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 ramboz (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):

     

     

    No Changes Have Been Made to This Item
    Show feedback again

    Back to the top


    Powered by Savane 3.1-cleanup