Author Topic: [v1.7.1] VoiceAttack throws exception with v1.7.0.15 settings  (Read 95 times)

Pfeil

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 1448
  • RTFM
VoiceAttack v1.7.1 throws "System.NullReferenceException: Object reference not set to an instance of an object." on startup, if the following is present in user.config:
Code: [Select]
<setting name="GlobalHotkeyIndex" serializeAs="String">
    <value>0</value>
</setting>
It is possible to click "Continue" to have VoiceAttack start up, after this occurs.

The same setting is fine in v1.7.0.15, which handles all values(even negative ones) relatively gracefully(values out of the normal range result in the hotkey getting disabled).

I didn't artificially insert this value into user.config initially, VoiceAttack crashed on the first startup after upgrading to v1.7.1


I tested with a near-blank config file(only license info), and as soon as "GlobalHotkeyIndex" is inserted and set to a value of zero of less(positive values outside of the normal range, E.G. "60000", are handled in the same manner as v1.7.0.15), VoiceAttack throws this exception on startup.


Extended exception information:
Code: [Select]
System.NullReferenceException: Object reference not set to an instance of an object.
   at VoiceAttack.frmMain.(Boolean , Boolean )
   at VoiceAttack.frmMain.‡()
   at VoiceAttack.frmMain.‰()
   at VoiceAttack.frmMain.()
   at VoiceAttack.frmMain.(Object , EventArgs )
   at System.Windows.Forms.Form.OnLoad(EventArgs e)
   at VoiceAttack.VABaseForm.OnLoad(EventArgs e)
   at System.Windows.Forms.Form.OnCreateControl()
   at System.Windows.Forms.Control.CreateControl(Boolean fIgnoreVisible)
   at System.Windows.Forms.Control.CreateControl()
   at System.Windows.Forms.Control.WmShowWindow(Message& m)
   at System.Windows.Forms.Control.WndProc(Message& m)
   at System.Windows.Forms.ScrollableControl.WndProc(Message& m)
   at System.Windows.Forms.Form.WmShowWindow(Message& m)
   at System.Windows.Forms.Form.WndProc(Message& m)
   at VoiceAttack.frmMain.(Message& )
   at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
   at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
   at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)


EDIT: It's worse than that; If "Enable keyboard global hotkey" is unchecked, VoiceAttack throws that exception on clicking "OK" to save the setting(on the options window, not the key picker dialog).

If not changed, from that point onward VoiceAttack will throw the exception and essentially fail to start cleanly.


EDIT #2: Fixed in v1.7.2
« Last Edit: July 11, 2018, 03:24:11 am by Pfeil »

Gary

  • Administrator
  • Hero Member
  • *****
  • Posts: 1584
Re: [v1.7.1] VoiceAttack throws exception with v1.7.0.15 settings
« Reply #1 on: July 10, 2018, 05:09:31 pm »
I'm on it.

Gary

  • Administrator
  • Hero Member
  • *****
  • Posts: 1584
Re: [v1.7.1] VoiceAttack throws exception with v1.7.0.15 settings
« Reply #2 on: July 10, 2018, 05:11:32 pm »
I put a build out in, 'unofficial'.  Does this fix the issue you are seeing?

http://www.voiceattack.com/unofficial

Pfeil

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 1448
  • RTFM
Re: [v1.7.1] VoiceAttack throws exception with v1.7.0.15 settings
« Reply #3 on: July 10, 2018, 05:21:40 pm »
Indeed it does.

Gary

  • Administrator
  • Hero Member
  • *****
  • Posts: 1584
Re: [v1.7.1] VoiceAttack throws exception with v1.7.0.15 settings
« Reply #4 on: July 10, 2018, 05:22:27 pm »
THANK YOU!

Update coming

Pfeil

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 1448
  • RTFM
Re: [v1.7.1] VoiceAttack throws exception with v1.7.0.15 settings
« Reply #5 on: July 10, 2018, 05:35:50 pm »
It's a happy coincidence that I don't use the global hotkey, so I leave it disabled.

I'll take credit for narrowing down what caused the exception, but actually discovering that it could happen at all is 100% luck.


Now I'm off to the next global crisis! bed.

Gary

  • Administrator
  • Hero Member
  • *****
  • Posts: 1584
Re: [v1.7.1] VoiceAttack throws exception with v1.7.0.15 settings
« Reply #6 on: July 10, 2018, 05:52:02 pm »
I put a new version out there: http://www.voiceattack.com/download

  Sleep tight, Superman!