Author Topic: [v1.7.0.10] Profile unload command can be stopped multiple times on close  (Read 2711 times)

Pfeil

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 4762
  • RTFM
When an unload commands makes VoiceAttack wait before shutdown(either through pause or loop), clicking the "Stop Commands" button(or the equivalent keyboard shortcut) will stop the command and close VoiceAttack.

However, if VoiceAttack is told to close again(either by the "X" button or Alt-F4), "Stop Commands" must be triggered a second time before VoiceAttack will actually close.

This state can also be induced multiple times, I.E. if VoiceAttack is told to close twice, then "Stop Commands" is triggered, keeping VoiceAttack running, telling VoiceAttack to close again will once again make it require "Stop Commands" to be triggered twice before it will close.


The second instance of the command does not produce any output(write to log, play sound, tts) *until* "Stop Commands" is issued, at which point it appears to run like a normal command would.

Testing with a unique-ish identifier(the second at which the command was started) shows that the second command actually replaces the first command(and each subsequent one its predecessor as well, as long as the sequence of close, then stop, is maintained).


I have the "Cancel Blocked Commands" option checked, though there is no "Command canceled: Another command is not allowing others to execute (canceled: command name)." visible in the log when this situation occurs.
Turning this option off does not appear to make a difference.

Having the "Allow other commands to execute while this one is running" option checked does not appear to make a difference either.


EDIT: In v1.7.0.12, if VoiceAttack is told to close while an unload command is already running, it will close after that unload command stops(either by finishing or otherwise).
The command will not be triggered a second time.
« Last Edit: June 16, 2018, 10:59:36 AM by Pfeil »

Gary

  • Administrator
  • Hero Member
  • *****
  • Posts: 2827
Good catch on that one.  This has been resolved (also added instructions in the log to click, 'Stop Commands').

Pfeil

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 4762
  • RTFM
This is partially fixed in v1.7.0.11; If the "Reset the Active Profile" action is used, the close button still adds a second execution of the unload command after the first one is stopped.

This does not occur if the profile unload command is running because of a profile switch(I.E. the unload command triggered on change finishes, and no unload command is triggered on close, which makes sense as the profile is already unloaded; If the profile switched-to also has an unload command, that unload command does subsequently run on close, as it should).

Gary

  • Administrator
  • Hero Member
  • *****
  • Posts: 2827
Here's what I'm seeing:

-Reload profile action invoked
-Current profile unload command invoked (loops continuously)
-Click VA exit (close)
-Warning displayed to click stop to break out of running unload command
-Click stop commands, which breaks the current unload
-VA exit routine begins
-Current profile is now unloaded because the app is closing
-Goes into looping unload command again
-Click VA exit (close)
-Another warning
-Click stop commands and VA exits

I would say that it's technically doing what it should be doing, however that may not be evident to the user in this situation.  I'm thinking that long-running, looping and pausing unload commands to the point where somebody would need to break out of it because it takes too long will be something that most will try to avoid and having them chain together between profiles is probably even more of an edge case.  I can change the unload log entry on closing to be different than the profile changing/reloading so that it may be a better indication.

I think I speak on behalf of the VA community by saying that your commitment to thoroughness is seriously appreciated.

Pfeil

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 4762
  • RTFM
I feel the problem with this is the profile loading again even though it should have unloaded already anyway.

This is also true when switching to a profile that also has an unload command, in the sense that there's no reason to load the next profile if the application is asked to quit already.

Even if "Stop Commands" is not used, as long as an attempt is made to close VoiceAttack during an unload command, it will run two unload commands in sequence.

The log implies that the next profile is only loaded after the unload command has finished or otherwise stopped, so then there shouldn't be a reason to unload a profile that hasn't been loaded yet, surely?


Obligatory:

Gary

  • Administrator
  • Hero Member
  • *****
  • Posts: 2827
Fair enough.