Author Topic: [v1.8.3.7] Exception thrown when hovering over a log item with a null value  (Read 1755 times)

Pfeil

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 4759
  • RTFM
This is a followup to [v1.8.3.6] Log hangs on null with "Do not show unrecognized items" enabled, sort of:

While the log no longer hangs when a null value is written to it, hovering the mouse cursor over the log entry with that null value in it will throw
Quote
System.NullReferenceException: Object reference not set to an instance of an object.
   at (Object )
   at VoiceAttack.frmMain.( )
   at VoiceAttack.frmMain.(Object , ToolTipTextNeededEventArgs )
   at Telerik.WinControls.RadControl.OnToolTipTextNeeded(Object sender, ToolTipTextNeededEventArgs e)
   at Telerik.WinControls.RadControl.Telerik.WinControls.IComponentTreeHandler.CallOnToolTipTextNeeded(Object sender, ToolTipTextNeededEventArgs e)
   at Telerik.WinControls.ComponentBehavior.OnToolTipTextNeeded(RadElement sender)
   at Telerik.WinControls.RadElement.DoMouseHover(EventArgs e)
   at Telerik.WinControls.MouseHoverTimer.OnTick(Object sender, EventArgs e)
   at System.Windows.Forms.Timer.OnTick(EventArgs e)
   at System.Windows.Forms.Timer.TimerNativeWindow.WndProc(Message& m)
   at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)

This also applies up to v1.8.3.24


Not sure how I missed that :-\


EDIT: Fixed and tooltip info added in v1.8.3.26
« Last Edit: March 10, 2020, 07:23:48 PM by Pfeil »

Gary

  • Administrator
  • Hero Member
  • *****
  • Posts: 2827
Bleh - lol


I'll get 'er sorted ;)

Thanks, man!

Gary

  • Administrator
  • Hero Member
  • *****
  • Posts: 2827
Got it!

Pfeil

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 4759
  • RTFM
Now that I think of it (a little late, seeing as you've already handled it): Would it be useful to have the tooltip show that it is actually a null value, rather than a regular blank entry? That may come in handy for debugging.

E.G. something like "<this log entry is a null value>".

Gary

  • Administrator
  • Hero Member
  • *****
  • Posts: 2827
I was thinking that the null would be for intentional blanks -  ?

Pfeil

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 4759
  • RTFM
I'd generate a blank line using
Code: [Select]
vaProxy.WriteToLog("");rather than
Code: [Select]
vaProxy.WriteToLog(null);
In my case, at least, null would be the result of something like
Code: [Select]
vaProxy.WriteToLog(vaProxy.GetText(valueThatIsn'tSet));in which case knowing whether the value was null can be useful, as otherwise it'd be impossible to distinguish between "" and null/"Not Set" without additional handling.

Gary

  • Administrator
  • Hero Member
  • *****
  • Posts: 2827
Done ;)