Author Topic: OSD breaks after system standby  (Read 4906 times)

0 Members and 1 Guest are viewing this topic.

Telorast

  • $upporter
  • Jr. Member
  • *****
  • Posts: 28
  • Karma: 0
    • View Profile
OSD breaks after system standby
« on: March 20, 2014, 06:42:22 PM »
Is this where you want bug reports for version 2?

I get this error often after having the system in standby:
unexpected error:
System.ObjectDisposedException: Cannot access a disposed object.
Object name: 'OsdShowRecognized'.
   at System.Windows.Forms.Control.CreateHandle()
   at System.Windows.Forms.Form.CreateHandle()
   at System.Windows.Forms.Control.get_H

I have show OSD on alternates enabled. The error happens whenever a commad is recognized and prevents execution.

I use an Intel I5 with the built in graphics card and drivers. It likes forgetting monitors that aren't connected and causing problems when I turn on my TV and such, might be linked to that.

Also wondering why OSD shows up when a command without prefix is recognized while prefix mode is active?

jitterjames

  • Administrator
  • Hero Member
  • *****
  • Posts: 7715
  • Karma: 116
    • View Profile
    • VoxCommando
Re: OSD breaks after system standby
« Reply #1 on: March 20, 2014, 09:24:37 PM »
Yes it's OK to post it here.

Are you sure this is only an issue with version 2?  I feel like I've seen this before, but I have so many problems with various systems after resuming from Standby that I don't worry too much about it.  I think I have an idea how to fix it even though I'm not really sure what causes it.

OSD shows for commands even if you are in standby, but the command is not executed.  I don't think this is specific to Version 2 either.  It is something some people prefer and some don't.  Until I get around to making an option for every possible combination of scenarios there will be things like this don't necessarily work the way you expect that they should.  For me, if I give a command and nothing happens, I like to see the visual reminder that the command was recognized.  Then I can figure out that the reason was that I was in standby.  I totally get that different people like to use VC in different ways and I always try to design with that in mind, but it is difficult to get it right sometimes especially without spending too much time on each thing and without allowing the available options to balloon into a big mess.

Telorast

  • $upporter
  • Jr. Member
  • *****
  • Posts: 28
  • Karma: 0
    • View Profile
Re: OSD breaks after system standby
« Reply #2 on: March 21, 2014, 06:47:30 AM »
Havn't tried OSD in old version. Just had to go back to tweaking things with the new engine so turned it on. Guess I'll just trigger a restart on system resume event.

Does the new engine still use the windows speech recognition profiles?

Kalle

  • $upporter
  • Hero Member
  • *****
  • Posts: 2319
  • Karma: 47
    • View Profile
Re: OSD breaks after system standby
« Reply #3 on: March 21, 2014, 06:55:18 AM »
I think this will show you the main features VC1 vs. VC2

http://voxcommando.com/forum/index.php?topic=1352.msg11815#msg11815
***********  get excited and make things  **********

Telorast

  • $upporter
  • Jr. Member
  • *****
  • Posts: 28
  • Karma: 0
    • View Profile
Re: OSD breaks after system standby
« Reply #4 on: March 21, 2014, 07:47:34 AM »
I read that, and the Optimized for many speakers VS optimized to train for one user made it sound like it doesn't use the profiles but I couldn't find any confirmation on that. Just because it's optimized for something doesn't mean it's the only thing it can do, so entirely possible it's still possible to train it.
« Last Edit: March 21, 2014, 07:50:17 AM by Telorast »

nime5ter

  • Administrator
  • Hero Member
  • *****
  • Posts: 2012
  • Karma: 61
    • View Profile
    • Getting Started with VoxCommando
Re: OSD breaks after system standby
« Reply #5 on: March 21, 2014, 08:27:56 AM »
See the wiki documentation (http://voxcommando.com/mediawiki/index.php?title=Version_2#Choice_of_speech_engines) and James's video introduction.

You have understood correctly. The new engine does not support training and therefore does not allow users to create custom profiles.

Training = profile. Any profile that you have already created in Windows is only associated with the original SAPI desktop engine.



TIPS: POST VC VERSION #. Explain what you want VC to do. Say what you've tried & what happened, or post a video demo. Attach VC log. Link to instructions followed.  Post your command (xml)

jitterjames

  • Administrator
  • Hero Member
  • *****
  • Posts: 7715
  • Karma: 116
    • View Profile
    • VoxCommando
Re: OSD breaks after system standby
« Reply #6 on: March 21, 2014, 08:48:27 AM »
Havn't tried OSD in old version. Just had to go back to tweaking things with the new engine so turned it on. Guess I'll just trigger a restart on system resume event.

I will try to fix it, now that I know others have the same problem. It is difficult to test though since it only happens to me extremely rarely.  On the other hand doing a full restart of VoxCommando on system resume is not the worst idea ever, as long as it doesn't take too long, it may prevent other sleep disorders from popping up.

Telorast

  • $upporter
  • Jr. Member
  • *****
  • Posts: 28
  • Karma: 0
    • View Profile
Re: OSD breaks after system standby
« Reply #7 on: March 22, 2014, 12:52:15 PM »
Yeah restarting Vox Commando is easy enough, I used to have to restart EventGhost as well because of conflicts with the Tellstick drivers and it was a lot messier.
« Last Edit: March 22, 2014, 12:58:09 PM by Telorast »

Telorast

  • $upporter
  • Jr. Member
  • *****
  • Posts: 28
  • Karma: 0
    • View Profile
Re: OSD breaks after system standby
« Reply #8 on: March 24, 2014, 09:53:47 AM »
There seems to a be a problem with the Full Restart action, it looks very much like a quick restart:


jitterjames

  • Administrator
  • Hero Member
  • *****
  • Posts: 7715
  • Karma: 116
    • View Profile
    • VoxCommando
Re: OSD breaks after system standby
« Reply #9 on: March 24, 2014, 10:39:14 AM »
The action description for full restart is wrong.  It actually does a rebuild and reloads all your groups and macros but it does not restart the program itself.

To get around it you would need to use eventGhost to close and relaunch VC (for now anyway).

I think at some point I changed my thinking on the restart full, after I had written the action description.  Sorry.

Kalle

  • $upporter
  • Hero Member
  • *****
  • Posts: 2319
  • Karma: 47
    • View Profile
Re: OSD breaks after system standby
« Reply #10 on: March 24, 2014, 12:25:18 PM »
Here is a VBscript solution which restart VoxCommando after System resume.

1. put this command group in your VC command tree.
Code: [Select]
<?xml version="1.0" encoding="utf-16"?>
<!--VoxCommando 1.9.1.7-->
<commandGroup open="False" name="restartVC after  System resume" enabled="True" prefix="" priority="0" requiredProcess="" description="">
  <command id="1416" name="restart VC after System resume" enabled="true" alwaysOn="False" confirm="False" requiredConfidence="0" loop="False" loopDelay="0" loopMax="0" description="">
    <action>
      <cmdType>Launch.OpenBat</cmdType>
      <params>
        <param>restartVCafterSystemResume.vbs</param>
      </params>
      <cmdRepeat>1</cmdRepeat>
    </action>
    <action>
      <cmdType>Window.Focus</cmdType>
      <params>
        <param>VoxCommando</param>
      </params>
      <cmdRepeat>1</cmdRepeat>
    </action>
    <action>
      <cmdType>Window.Close</cmdType>
      <params />
      <cmdRepeat>1</cmdRepeat>
    </action>
    <event>System.Resume</event>
  </command>
</commandGroup>

2. save the attached "restartVCafterSystemResume.vbs" in your VoxCommando mainfolder.
3. open the file in the windows txt editor and change the path in the last line with your VC path and save the file.
How this command work: When VC generate the System.Resume event after windows resume, VC start the VB script and close it self. The script start VC after 3 seconds (you can also change the restart time in the VB script).

Kalle
***********  get excited and make things  **********

jitterjames

  • Administrator
  • Hero Member
  • *****
  • Posts: 7715
  • Karma: 116
    • View Profile
    • VoxCommando
Re: OSD breaks after system standby
« Reply #11 on: March 24, 2014, 12:46:42 PM »
thanks Kalle.

by the way, the next release of VC2 will be out soon and I have attempted a fix for the OSD issue.