PDA

View Full Version : .NET error (NRE) when double-clicking HUD



Veteran68
07-05-2011, 09:43 PM
Just playing a session and went to double-click a villain's HUD panel to switch to session stats (I assume this still works as it did on HM1), and got the following .NET NRE exception (trimmed off the assemblies list since it was too big for a single post):

See the end of this message for details on invoking
just-in-time (JIT) debugging instead of this dialog box.

************** Exception Text **************
System.NullReferenceException: Object reference not set to an instance of an object.
at HoldemManager.Modules.UI.HUD.LayeredWindow.MouseDo ubleClick(Object sender, MouseEventArgs e)
at HoldemManager.Modules.UI.HUD.MouseForm.MouseForm_M ouseDoubleClick(Object sender, MouseEventArgs e)
at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.Form.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)

udbrky
07-05-2011, 11:54 PM
Session stats are currently being worked on.

Do you have the latest version of .net?

Does this recur?

Veteran68
07-06-2011, 12:39 AM
Session stats are currently being worked on.

Do you have the latest version of .net?

Does this recur?
Yes I'm up to date on .NET, and I didn't try it again as I was just finishing up a session when I noticed. It didn't seem to have any ill effects, the HUD kept working.

Veteran68
07-06-2011, 11:24 PM
Does this recur?
Yes, I've been able to reproduce it repeatedly. Every time I double-click on a HUD panel.

udbrky
07-07-2011, 02:50 PM
Is this with all huds or just one or two?

Veteran68
07-07-2011, 03:50 PM
Is this with all huds or just one or two?
I've only used my Merge Tourney HUD, imported from HM1, so far. All I'm playing these days are DONs and the occasional SNG on Merge (primarily Lock) so I've not bothered trying my imported HUDs I had setup for other sites/game types.

udbrky
07-08-2011, 03:44 PM
Can you send me the hud from 1.0 that caused this?

Veteran68
07-08-2011, 06:07 PM
As extracted from prefs.xml. If you want the entire prefs.xml, let me know and I'll attach it.


<Cfgaj Name="mergetourney" font_size="6.75" font_name="DejaVu Sans" font_attr="1" popup_font_size="12" popup_font_name="Arial" popup_font_attr="0" text_color="Color [A=255, R=255, G=255, B=255]" background="Color [A=255, R=0, G=0, B=1]" alt_background="Color [A=255, R=175, G=0, B=0]" popup_color="#FFFFFFAF" popup_text_color="#FF000000" alt_popup_color="#FFC0FFC0" hi_popup_color="#FFFF0000" lo_popup_color="#FF5A5A5A" sng_bb_grid="True" show_abrev="False" opacity="7" card_opacity="10" seperate_panels="False" pots="3" site_index="4" avg_vpip="True" fix_my_stats="True" show_notes="True" show_autorate="True" disable_hero="False" scale_fonts="False" drop_shadow="True" force_topmost="False" active_only="False" min_hands="0" separator=" ">
<MainPopup>
<node name="Default_Preflop" />
<node name="Default_Postflop" />
</MainPopup>
<positions>
<max6>
<MER Seat0="0.394, 0.283, 0.414, 0.007" Seat1="0.091, 0.396, 0.006, 0.501" Seat2="0.336, 0.065, 0.170, 0.144" Seat3="0.584, 0.061, 0.690, 0.132" Seat4="0.839, 0.400, 0.815, 0.506" Seat5="0.586, 0.677, 0.550, 0.751" Seat6="0.332, 0.685, 0.233, 0.751" />
</max6>
</positions>
<stats>
<Hands dim_sample="False" abrev="H:" villainHero="both" format="0" min_samples="0" popup="Default_Winrate" font_size="7" font_attr="1" font_name="DejaVu Sans">
<Ranges>
<Range color="Color [A=255, R=255, G=255, B=175]" upper_bound="1000000" />
</Ranges>
</Hands>
<Name dim_sample="False" abrev="" villainHero="both" format="0" min_samples="0" popup="Default_Winrate" font_size="7" font_attr="1" font_name="DejaVu Sans">
<Ranges>
<Range color="Color [A=255, R=255, G=255, B=255]" upper_bound="1000000" />
</Ranges>
</Name>
<Big_Blinds dim_sample="False" abrev="BB" villainHero="both" format="0" min_samples="0" font_size="7" font_attr="1" font_name="DejaVu Sans">
<Ranges>
<Range color="Color [A=255, R=255, G=64, B=64]" upper_bound="15" />
<Range color="Color [A=255, R=255, G=255, B=0]" upper_bound="30" />
<Range color="Color [A=255, R=64, G=255, B=64]" upper_bound="1000000" />
</Ranges>
</Big_Blinds>
<Trny_M dim_sample="False" abrev="M" villainHero="both" format="1" min_samples="0" font_size="7" font_attr="1" font_name="DejaVu Sans">
<Ranges>
<Range color="Color [A=255, R=255, G=64, B=64]" upper_bound="5" />
<Range color="Color [A=255, R=255, G=192, B=0]" upper_bound="10" />
<Range color="Color [A=255, R=255, G=255, B=0]" upper_bound="20" />
<Range color="Color [A=255, R=0, G=255, B=0]" upper_bound="1000000" />
</Ranges>
</Trny_M>
<New_Line villainHero="both" />
<VPIP.total dim_sample="False" abrev="VP:" villainHero="both" format="0" min_samples="0" popup="Default_Preflop" font_size="7" font_attr="1" font_name="DejaVu Sans">
<Ranges>
<Range color="Color [A=255, R=255, G=0, B=0]" upper_bound="20" />
<Range color="Color [A=255, R=255, G=255, B=0]" upper_bound="30" />
<Range color="Color [A=255, R=0, G=255, B=0]" upper_bound="1000000" />
</Ranges>
</VPIP.total>
<PFR.total dim_sample="False" abrev="PF:" villainHero="both" format="0" min_samples="0" popup="Default_Preflop" font_size="7" font_attr="1" font_name="DejaVu Sans">
<Ranges>
<Range color="Color [A=255, R=0, G=255, B=0]" upper_bound="10" />
<Range color="Color [A=255, R=255, G=255, B=0]" upper_bound="15" />
<Range color="Color [A=255, R=255, G=0, B=0]" upper_bound="1000000" />
</Ranges>
</PFR.total>
<Aggression_Factor.total dim_sample="False" abrev="AG:" villainHero="both" format="1" min_samples="0" popup="Default_Postflop" font_size="7" font_attr="1" font_name="DejaVu Sans">
<Ranges>
<Range color="Color [A=255, R=0, G=255, B=0]" upper_bound="1.5" />
<Range color="Color [A=255, R=255, G=255, B=0]" upper_bound="6" />
<Range color="Color [A=255, R=255, G=0, B=0]" upper_bound="1000000" />
</Ranges>
</Aggression_Factor.total>
<C_Bet.flop dim_sample="False" abrev="CB:" villainHero="both" format="0" min_samples="0" popup="Default_CBet" font_size="7" font_attr="1" font_name="DejaVu Sans">
<Ranges>
<Range color="Color [A=255, R=0, G=255, B=0]" upper_bound="60" />
<Range color="Color [A=255, R=255, G=255, B=0]" upper_bound="80" />
<Range color="Color [A=255, R=255, G=0, B=0]" upper_bound="1000000" />
</Ranges>
</C_Bet.flop>
<Steal_Att.total dim_sample="False" abrev="ST" villainHero="both" format="0" min_samples="0" popup="Default_Steal" font_size="7" font_attr="1" font_name="DejaVu Sans">
<Ranges>
<Range color="Color [A=255, R=255, G=64, B=64]" upper_bound="31.2" />
<Range color="Color [A=255, R=255, G=161, B=64]" upper_bound="40.2" />
<Range color="Color [A=255, R=64, G=255, B=64]" upper_bound="1000000" />
</Ranges>
</Steal_Att.total>
</stats>
</Cfgaj>


Curious as to why the developers chose to assign unique XML tags to each HUD? That sure seems counter to clean and well-formed XML design. Why wouldn't each HUD be of the same HUD object type within a collection of HUDs? This would make them programmatically much easier to work with, allow the XML to be validated via XSD, etc. It seems you're making more error-prone work for yourself to name them Cfgaa-Cfgaz, and breaking much of the OOP-ness that XML/XSD gives you. Anyway, sorry, that's just the developer nit in me again, you guys are probably used to hearing it from me by now... :)

udbrky
07-08-2011, 06:15 PM
You can export the hud, and attach that file here.

Veteran68
07-08-2011, 07:19 PM
Duh, forgot about exporting it. :o

udbrky
07-08-2011, 07:58 PM
I don't get this issue.

Export from 1.0 and attach it.

Veteran68
07-08-2011, 09:48 PM
I don't get this issue.

Export from 1.0 and attach it.

Exported from 1.11.06g

udbrky
07-08-2011, 09:57 PM
Still no issue.

Did you try reimporting?

Veteran68
07-08-2011, 11:03 PM
Still no issue.

Did you try reimporting?

My 1.0 HUDs have been imported probably a half-dozen times due to all the issues I had with updates installing to the wrong place, and me wiping and reinstalling from scratch. But I'm not sure if it's been reimported since I first noticed this.

sreticentv
07-09-2011, 05:18 PM
are you using note caddy, veteran? If so, please try this with it turned off

Veteran68
07-18-2011, 02:52 PM
are you using note caddy, veteran? If so, please try this with it turned off
Pretty sure I turned it off for awhile and still had the problem, but will try again and confirm. I'm assuming you're talking about the "Show Caddy Notes" checkbox in the HUD options, or is there somewhere else I should check?

udbrky
07-18-2011, 03:05 PM
I would try reimporting it. I didn't have any issues with them as I recall.

Veteran68
07-25-2011, 10:08 PM
Finally got around to revisiting this issue. To eliminate the 1.0 HUD import as the culprit, I created a brand new HUD layout from scratch, using the default layout as the base (I'm assuming this default layout came with HM2 and wasn't imported from HM1?). Spent a great deal of time getting it setup. And it had the same result, this .NET error when double-clicked. So it's not a problem due to the old HUD.

Also, once I did this, I could no longer get hero stats to update on any table. 0 hands, and -' s for all hero stats except BB and M. All other players were updating. Hero stats were working fine on my imported HUD before I made this new one, and switching back to my previous HUD didn't fix it. Did I miss a setting somewhere, or is this related to the issue that others have been reporting since this last update?

Also, I can't for the life of me find where to edit the font of the table stats? The new HUD has a smaller font that I can't easily read. My imported HUD had a nice clean font for the table stats. Is this because it imported the font settings but HM2 doesn't provide a place to edit those fonts?

Also ran into several usability/UI issues with building out a new HUD that I think should be addressed, as things were far more tedious than they had to be. Some I believe I reported awhile ago, others I just ran into. I'll try to write them up separately.