Author Topic: [v1.6.4.3/.4/.5] VoiceAttack crashes on an empty profile  (Read 3093 times)

Pfeil

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 4761
  • RTFM
[v1.6.4.3/.4/.5] VoiceAttack crashes on an empty profile
« on: April 29, 2017, 08:47:49 PM »
When VoiceAttack v1.6.4.3 attempts to load an empty profile on startup, it crashes ("VoiceAttack has stopped working", "System.InvalidOperationException"). Having a single command in the startup profile will allow it to load. This does not occur when switching to an empty profile.

When VoiceAttack v1.6.4.4 and v1.6.4.5 attempt to load an empty profile, an "Unable to enable speech recognition.  Make sure your mic is plugged in and enabled through sound properties." message is displayed in the log(even though the recording device is working, and restarting VoiceAttack after switching to a non-empty profile does not display the message).

When An empty profile is saved thereafter(by clicking done, even without making changes), sometimes only after saving multiple times, VoiceAttack crashes with the following unhandled exception:
Quote
System.InvalidOperationException: At least one grammar must be loaded before doing a recognition.
   at System.Speech.Recognition.SpeechRecognitionEngine.RecognizeAsync(RecognizeMode mode)
   at VoiceAttack.SpeechSapi.()
   at VoiceAttack.frmMain.(String )
   at VoiceAttack.frmMain.(Object , EventArgs )
   at System.Windows.Forms.Control.OnClick(EventArgs e)
   at System.Windows.Forms.Button.OnClick(EventArgs e)
   at System.Windows.Forms.Button.OnMouseUp(MouseEventArgs mevent)
   at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
   at System.Windows.Forms.Control.WndProc(Message& m)
   at System.Windows.Forms.ButtonBase.WndProc(Message& m)
   at System.Windows.Forms.Button.WndProc(Message& m)
   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)

If a non-empty profile is switched to after the "Unable to enable speech recognition.  Make sure your mic is plugged in and enabled through sound properties." message is displayed in the log, the speech engine starts working again, and when switching back to the empty profile it keeps working. Saving the empty profile now(multiple times) seems to have no effect.


None of this occurs in v1.6.4.2, so presumably the Speech Platform 11 changes have something to do with it.


EDIT: Fixed in v1.6.4.6
« Last Edit: May 13, 2017, 07:40:22 PM by Pfeil »

Gary

  • Administrator
  • Hero Member
  • *****
  • Posts: 2826
Re: [v1.6.4.3/.4/.5] VoiceAttack crashes on an empty profile
« Reply #1 on: April 29, 2017, 09:05:27 PM »
Oy!

Edit: Yup.  That was it, although I need to do a compare and find out why the built-in speech engine worked before and doesn't now.  Weird.

Thanks again!
« Last Edit: April 29, 2017, 09:34:23 PM by Gary »