Duplicate Hand Loop [wine]

Experiencing technical difficulties? Think you've found a problem with PokerTracker 3? Report it here.

Moderator: Moderators

Duplicate Hand Loop [wine]

Postby plexiq » Fri Jul 04, 2008 2:08 pm

Hi,

i am running PokerTracker in wine. HUD & Import works well, most of the time. Great so far :)

However, there is a major bug:
When i try to import a hand that is already in the database, PT3 will get caught up in some endless loop, trying to insert the hand into the db.

In the postgresql logfiles, i can see PT trying to insert the very same hand over and over, obviously failing every time because of the hhs-unique_hand_no / thhs-unique_hand_no constraints. I removed these 2 constraints, and things work perfectly fine after that. But obviously, having duplicate hands in the database isnt really a good long-term solution. I'm really hoping you guys can look into fixing this.

Minor annoyance:
When starting PT3, i get an error message like 80% of the time, telling me PT3 refuses to start while debugger is running. Other 20% of the time it starts fine.

Greets,
Helmuth
plexiq
 
Posts: 16
Joined: Mon Feb 18, 2008 6:24 am

Re: Duplicate Hand Loop [wine]

Postby keggler » Fri Jul 04, 2008 2:33 pm

maybe if you can isolate the rogue hh[s] and forward them to the support here via a ticket...

regards the debugger error; comment out this line: shared_preload_libraries = '$libdir/plugins/plugin_debugger.dll' # (change requires restart)

in postgresql.conf and restart the postmaster...


susan
keggler
 
Posts: 640
Joined: Sun Jun 01, 2008 4:53 am

Re: Duplicate Hand Loop [wine]

Postby plexiq » Fri Jul 04, 2008 3:36 pm

Thanks for the fast reply.

About the HH:
Any HH will cause the hang if a hand of the file is already in the database. Also, this is not a pokersite specific problem.

Concerning the debugging error:
The shared_preload_libraries setting is already commented out in my postgres installation.

Helmuth
plexiq
 
Posts: 16
Joined: Mon Feb 18, 2008 6:24 am

Re: Duplicate Hand Loop [wine]

Postby plexiq » Mon Jul 07, 2008 3:02 am

In case anyone else is trying to run PT3 in wine, here is some temporary fix for the duplicate hands:

I am still working with 2 of the unique constraints removed, in order to prevent the hang mentioned above. I am using the query below to purge duplicate hands from the database (cashgame only):
Code: Select all
select hs1.id_hand into temporary table dupes
from holdem_hand_summary hs1, holdem_hand_summary hs2
where hs1.hand_no=hs2.hand_no and hs1.id_hand>hs2.id_hand;

delete from holdem_hand_summary where id_hand in (select id_hand from dupes);
delete from holdem_hand_histories where id_hand in (select id_hand from dupes);
delete from holdem_hand_player_combinations where id_hand in (select id_hand from dupes);
delete from holdem_hand_player_detail where id_hand in (select id_hand from dupes);
delete from holdem_hand_player_statistics where id_hand in (select id_hand from dupes);

select distinct hhps.id_session into temporary table corruptsessions
from holdem_hand_player_statistics hhps, dupes d where hhps.id_hand=d.id_hand;

update holdem_table_session_summary set
cnt_hands=t.cnt_hands, cnt_hands_won=t.cnt_hands_won, cnt_ttl_players=t.cnt_players,
amt_pot=t.amt_pot, amt_won=t.amt_won, amt_rake=t.amt_rake, amt_mgr=t.amt_mgr
from
(
select hhps.id_session, count(*) as cnt_hands,
sum(CASE WHEN flg_won_hand=true THEN 1 ELSE 0 END) as cnt_hands_won,
sum(amt_pot) as amt_pot, sum(amt_won) as amt_won,
sum(amt_rake * (CASE WHEN flg_won_hand=true THEN 1 ELSE 0 END)) as amt_rake,
sum(amt_mgr) as amt_mgr,
sum(cnt_players) as cnt_players
from holdem_hand_player_statistics hhps, holdem_hand_summary hhs, corruptsessions cs
where hhps.id_session=cs.id_session and hhs.id_hand=hhps.id_hand group by hhps.id_session
) as t
where holdem_table_session_summary.id_session=t.id_session;

drop table corruptsessions;
drop table dupes;


Side note:
I noticed "cnt_ttl_players_flop" of table holdem_table_session_summary is always "0" in my database. Is it supposed to be like this?
plexiq
 
Posts: 16
Joined: Mon Feb 18, 2008 6:24 am

Re: Duplicate Hand Loop [wine]

Postby Moah » Thu Jul 24, 2008 3:50 pm

I have the same problem (hang on duplicate hands) even though I don't run PT3 in Wine (but in Vista).
Moah
 
Posts: 5
Joined: Thu Jul 17, 2008 1:52 pm

Re: Duplicate Hand Loop [wine]

Postby WhiteRider » Thu Jul 24, 2008 5:00 pm

Moah wrote:I have the same problem (hang on duplicate hands) even though I don't run PT3 in Wine (but in Vista).

Which version of PT3 are you running?
What version of Postgres?
Is this for every duplicate hand, or a particular hand?

Please enable logging, reproduce the problem and submit your PokerTracker.log to the
Support system , and link to this thread.
WhiteRider
Moderator
 
Posts: 54018
Joined: Sat Jan 19, 2008 7:06 pm
Location: UK

Re: Duplicate Hand Loop [wine]

Postby Moah » Thu Jul 24, 2008 5:56 pm

I'm using the Beta 15, but had the same problem with Beta 14, using postgressql 8.4, running under vista, any duplicate hand does it, and i've submitted a ticket already, which i'm in a process of updating.

Thanks,
Gwenael.
Moah
 
Posts: 5
Joined: Thu Jul 17, 2008 1:52 pm

Re: Duplicate Hand Loop [wine]

Postby plexiq » Fri Jul 25, 2008 5:50 am

I figure i ll update my post above. The original query i posted was actually a bit mixed up.

Temporary workaround for the hang:
First, delete the 2 unique constraints and replace them with normal indices:
Code: Select all
DROP INDEX "hhs-unique_hand_no";
DROP INDEX "thhs-unique_hand_no";
CREATE INDEX "hhs-hand_no" on holdem_hand_summary(hand_no);
CREATE INDEX "thhs-hand_no" on tourney_holdem_hand_summary(hand_no);


You only have to run above code once. This removes the hang, but PT will now import duplicate hands into the database.

To remove all duplicates from your database, run:
Code: Select all
select hs1.id_hand into temporary table dupes
from holdem_hand_summary hs1, holdem_hand_summary hs2
where hs1.hand_no=hs2.hand_no and hs1.id_hand>hs2.id_hand;

select distinct hhps.id_session into temporary table corruptsessions
from holdem_hand_player_statistics hhps ,dupes d where hhps.id_hand=d.id_hand;

delete from holdem_hand_summary where id_hand in (select id_hand from dupes);
delete from holdem_hand_histories where id_hand in (select id_hand from dupes);
delete from holdem_hand_player_combinations where id_hand in (select id_hand from dupes);
delete from holdem_hand_player_detail where id_hand in (select id_hand from dupes);
delete from holdem_hand_player_statistics where id_hand in (select id_hand from dupes);

update holdem_table_session_summary set
cnt_hands=t.cnt_hands, cnt_hands_won=t.cnt_hands_won, cnt_ttl_players=cnt_players,
amt_pot=t.amt_pot, amt_won=t.amt_won, amt_rake=t.amt_rake, amt_mgr=t.amt_mgr
from
(
select hhps.id_session, count(*) as cnt_hands,
sum(CASE WHEN flg_won_hand=true THEN 1 ELSE 0 END) as cnt_hands_won,
sum(amt_pot) as amt_pot, sum(amt_won) as amt_won,
sum(amt_rake * (CASE WHEN flg_won_hand=true THEN 1 ELSE 0 END)) as amt_rake,
sum(amt_mgr) as amt_mgr,
sum(cnt_players) as cnt_players
from holdem_hand_player_statistics hhps, holdem_hand_summary hhs, corruptsessions cs
where hhps.id_session=cs.id_session and hhs.id_hand=hhps.id_hand group by hhps.id_session
) as t
where holdem_table_session_summary.id_session=t.id_session;

drop table corruptsessions;
drop table dupes;


You can do this whenever you think dupes have been imported (PT3 should be closed). It deletes all duplicates from the database, and updates the session-summaries, etc accordingly.
plexiq
 
Posts: 16
Joined: Mon Feb 18, 2008 6:24 am

Re: Duplicate Hand Loop [wine]

Postby Stipok » Fri Jul 25, 2008 7:30 am

Stipok
 
Posts: 9
Joined: Tue Feb 12, 2008 10:24 am


Return to Technical Support / Bug Reports [Read Only]

Who is online

Users browsing this forum: No registered users and 25 guests

cron