FPDB-for-OSX icon indicating copy to clipboard operation
FPDB-for-OSX copied to clipboard

HUD sometimes attaches itself to main fpdb window instead of poker table window

Open andersea opened this issue 8 years ago • 14 comments

I am playing smallstakes and freeroll tournaments on the bwin/partypoker network using the danskespil.dk client. This works fine most of the time, but sometimes it seems fpdb gets confused about which window to attach the hud to, and then it attaches itself to the main window instead.

Only common thing I remember is that I was sitting at table 4 both the times it did it.

Screenshot

andersea avatar Mar 13 '16 09:03 andersea

I can see that in poker table the window title exchanges the english word "Table" with the danish word "Bord", but it the hand history files it uses the word english word "Table".

andersea avatar Mar 13 '16 10:03 andersea

Hmm. At a guess it's seeing the number 4 in the FPDB window and latching on to that. If you look in the HUD log, are there any lines starting with something like the following?

Party.getTableTitleRe: returns: 

If so, what do they say it returns?

philroberts avatar Mar 14 '16 07:03 philroberts

Here it has latched on to the tournament lobby instead of the poker table:

2016-03-14 20:03:32,092 parser INFO Party.getTableTitleRe: table_name='None' tournament='123048656' table_number='12' 2016-03-14 20:03:32,092 parser INFO Party.getTableTitleRe: returns: '#?12'

Here is a screenshot of the table title:

Table

Here is the lobby:

Lobby

andersea avatar Mar 14 '16 19:03 andersea

I got moved to table 11 in the same tournament. Now it finds the right window.

2016-03-14 20:32:29,220 parser INFO Party.getTableTitleRe: table_name='None' tournament='123048656' table_number='11' 2016-03-14 20:32:29,220 parser INFO Party.getTableTitleRe: returns: '#?11'

andersea avatar Mar 14 '16 19:03 andersea

Yep. '#?12' will match any window with '12' in the title. It just gets a list of windows from the system and picks the first one (if any) that matches. I can think of a couple of ideas to make the matching more specific, but we have to be careful we don't break it for other tournament types. Maybe something like

<tournament ID>.*<table ID>

would work.

philroberts avatar Mar 15 '16 00:03 philroberts

So I gather it is using a regular expression to match the title. In that case yes, that solution looks like an improvement. it would match first the tournament number, then 0 or many of any character followed by the table number.

andersea avatar Mar 15 '16 20:03 andersea

Yup. The only problem is, I didn't write this code - maybe the person who did had a good reason for making it this way. I guess I can make the change and if someone complains we can investigate further.

philroberts avatar Mar 15 '16 23:03 philroberts

Feel free to be aggressive with changes to the getTableTitleRe regex. It doesn't have to support anything but the most current window naming pattern used by the sites (unlike hand histories which have loads of regression tests to deal with).

ChazDazzle avatar Mar 16 '16 12:03 ChazDazzle

That is a good point Chaz. My concern is that other tournament types might have different naming schemes. This is a bridge we can cross if we come to it.

philroberts avatar Mar 16 '16 12:03 philroberts

Well it took me a while but I made this change finally. Will be in next release.

philroberts avatar Jan 12 '17 23:01 philroberts

Excellent!

ChazDazzle avatar Jan 13 '17 00:01 ChazDazzle

Similarly on PokerStars the HUD sometimes attaches itself to the replayer instead of the table. Both windows are named identically...

I can work around it by closing the replayer, waiting for the next hand, then reopening the replayer, but that's a huge pita while streaming.

dsnvwlmnt avatar Jan 18 '17 08:01 dsnvwlmnt

Yeah unfortunately if the windows have identical names there's not much we can do under the current system. I do have a pipedream idea of letting the user manually specify a window to attach to, but I'm not sure if this is even possible. The problem you see on PokerStars doesn't happen if you already had the HUD attached to the correct window before you open the replayer, right? Or am I misremembering the behaviour?

philroberts avatar Jan 18 '17 09:01 philroberts

The problem you see on PokerStars doesn't happen if you already had the HUD attached to the correct window before you open the replayer, right? Or am I misremembering the behaviour?

If it's already attached to the correct window, presumably it's fine. I guess i've mainly had this issue because the HUD is crashing for me constantly, so i have to reopen it dozens of times, and it sometimes attaches to the wrong window. If the Right Click Crashing goes away, it's probably not a big deal.

dsnvwlmnt avatar Jan 18 '17 16:01 dsnvwlmnt