Author Topic: Voice Attack 1.7.2 (steam version) crashing repeatedly  (Read 7672 times)

kenjiro

  • Guest
Voice Attack 1.7.2 (steam version) crashing repeatedly
« on: August 24, 2018, 08:22:48 PM »
I really don't know in which version the problem started, but my Voice Attack has been crashing a lot on me.

I would like to add some sort of error log to this post, however I couldn't find the file where it logs its errors. The software simply crashes without displaying any error.

Gary

  • Administrator
  • Hero Member
  • *****
  • Posts: 2827
Re: Voice Attack 1.7.2 (steam version) crashing repeatedly
« Reply #1 on: August 24, 2018, 09:14:42 PM »
If VoiceAttack suddenly starts crashing, something has changed on your system that VoiceAttack is relying on to work properly.  VA connects to a lot of different system components that, when not set up right or have been corrupted in some way, will be very evident when VA accesses them.  Something to look for is the VoiceAttackFault.txt file that would exist in your VA installation folder (usually C:\Program Files (x86)\Steam\SteamApps\common\VoiceAttack on a Steam installation and C:\Program Files (x86)\VoiceAttack in a standalone installation).  If you have that file, could you post it here or send to support@voiceattack.com?  That way it can be looked at to see if anything has been caught by VA that would be making it crash.

Then, I would suggest making sure all your audio drivers are up to date (and joystick drivers if you are using your joystick as a controller).  I'd take a look at this thread, as it's helped a lot of mysterious system issues that deal with speech engine components (ignore the title): http://voiceattack.com/SMF/index.php?topic=64.0
I'd run a system scan to see if anything can be detected, too (doesn't hurt to do this from time to time):  https://support.microsoft.com/en-us/help/929833/use-the-system-file-checker-tool-to-repair-missing-or-corrupted-system
And a chkdsk is usually not a bad idea:  https://www.tekrevue.com/tip/fix-hard-drives-chkdsk-windows-10/

Hope some of that helps!

kenjiro

  • Guest
Re: Voice Attack 1.7.2 (steam version) crashing repeatedly
« Reply #2 on: August 24, 2018, 10:08:14 PM »
Here is what I found there:

Code: [Select]
8/25/2018 1:01:55 AM***************************************************************************************
System.ArgumentException: Cannot set voice. No matching voice is installed or the voice was disabled.
   at System.Speech.Synthesis.SpeechSynthesizer.SelectVoice(String name)
   at EddiSpeechService.SpeechService.<>c__DisplayClass21_1.<speak>b__1()
   at System.Threading.ThreadHelper.ThreadStart_Context(Object state)
   at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
   at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
   at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
   at System.Threading.ThreadHelper.ThreadStart()

Really weird because it works just fine, then out of the blue it crashes. For what the error says at the beginning, if I got it right, VA tried to use a TTS voice but couldn't find it. But how? If it was talking just before the crash happened?

P.S.- If I use only EDDI (without VA running), it never crashes. So I don't think it would be EDDI's fault

Gary

  • Administrator
  • Hero Member
  • *****
  • Posts: 2827
Re: Voice Attack 1.7.2 (steam version) crashing repeatedly
« Reply #3 on: August 24, 2018, 11:32:11 PM »
The EDDI standalone and the EDDI plugin exist in two very different environments.  As you can see, the fourth line in that message indicates it's within the EDDI plugin.

Please try disabling the EDDI plugin and run VA for a while without it.  I would recommend disabling all plugins and re-enable each one by one.  To do this, go to Options > General and click, 'Plugin Manager'.  Then, uncheck all the listed plugins to disable.

Very sorry... I seemed to have forgotten my usual first question which is, 'Are you running any plugins?'.

kenjiro

  • Guest
Re: Voice Attack 1.7.2 (steam version) crashing repeatedly
« Reply #4 on: August 25, 2018, 01:35:46 PM »
Well, looks like it is really something related to the "plugin thingy".

EDDI alone works without problems
VA alone works without problems

Put them together and hell breaks loose :P

So, what now? Any hints?

Tkael

  • Newbie
  • *
  • Posts: 49
Re: Voice Attack 1.7.2 (steam version) crashing repeatedly
« Reply #5 on: August 31, 2018, 10:55:19 PM »
I believe that that larger issue may be related VoiceAttack actions switching between synchronous and asynchronous modes using the "wait until [action] completes" option?

This command, using VoiceAttack's native say action, always crashes VoiceAttack in my testing on either on the first or second run
- even if the EDDI plugin is disabled,
- even if EDDI has not sent any information to the speech synthesizer,
- even if I disable all of the code that is run when the plugin is initialized, essentially turning the EDDI off from my side, or
- even when all plugins are disabled:

Code: [Select]
Write [Blue] 'Beginning test' to log
Say, '1'
Say, '2'  (and wait until it completes)
Say, '3'
Say, '4'  (and wait until it completes)
Say, '5'
Write [Blue] 'Ending test' to log

Neither this command

Code: [Select]
Write [Blue] 'Beginning test' to log
Say, '1'  (and wait until it completes)
Say, '2'  (and wait until it completes)
Say, '3'  (and wait until it completes)
Say, '4'  (and wait until it completes)
Say, '5'  (and wait until it completes)
Write [Blue] 'Ending test' to log

nor this command

Code: [Select]
Write [Blue] 'Beginning test' to log
Say, '1'
Say, '2'
Say, '3'
Say, '4'
Say, '5'
Write [Blue] 'Ending test' to log

cause VoiceAttack to crash.

I see similar results when invoking speech through the EDDI plugin.
EDDI natively uses synchronous speech. I believe VoiceAttack natively uses asynchronous speech.

Perhaps conflicts between synchronous and asynchronous actions in a single command are at the heart of this issue?

Gary, I'd appreciate your feedback so that we can put this issue to rest.

Tkael

  • Newbie
  • *
  • Posts: 49
Re: Voice Attack 1.7.2 (steam version) crashing repeatedly
« Reply #6 on: August 31, 2018, 11:13:59 PM »
Note: I added defensive coding around `System.Speech.Synthesis.SpeechSynthesizer.SelectVoice(String name)` I can still force a crash. The logged error noted above appears to be incidental.

When I force a crash, neither EDDI nor VoiceAttack logs the crash directly but a .dmp file is generated at AppData\Local\CrashDumps which reports the crashing process as follows:
Process Name: VoiceAttack.exe : F:\Program Files (x86)\Steam\steamapps\common\VoiceAttack\VoiceAttack.exe
Exception Code: 0xC0000005
Exception Information: The thread tried to read from or write to a virtual address for which it does not have the appropriate access.

Pfeil

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 4759
  • RTFM
Re: Voice Attack 1.7.2 (steam version) crashing repeatedly
« Reply #7 on: September 01, 2018, 06:43:57 AM »
I have to go, but I ran a quick test of
Code: [Select]
Write [Blue] 'Beginning test' to log
Say, '1'
Say, '2'  (and wait until it completes)
Say, '3'
Say, '4'  (and wait until it completes)
Say, '5'
Write [Blue] 'Ending test' to log

If I understood correctly, that crashes VoiceAttack(read diagonally, admittedly); On my non-Steam install of v1.7.2.16, it has no ill effects that I can observe, even running it many times, including simultaneously.

Tkael

  • Newbie
  • *
  • Posts: 49
Re: Voice Attack 1.7.2 (steam version) crashing repeatedly
« Reply #8 on: September 02, 2018, 04:08:34 PM »
Oddly, my test code only seems to crash VA on the Steam version (though once again, that's even with the plugin manager disabled).

As far as this being the same issue that is causing VoiceAttack to crash when EDDI is running... that is purely speculative and came as a result of my attempts to create a replicable test for this issue. Gary may be able to confirm if this is the true issue or unrelated but I don't have enough visibility into what is happening on the VA side to make any definitive conclusions.

Pfeil

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 4759
  • RTFM
Re: Voice Attack 1.7.2 (steam version) crashing repeatedly
« Reply #9 on: September 02, 2018, 04:20:55 PM »
Testing on the Steam version with v1.7.2, closest I could get to a failure is
Quote
Audio stream did not play in a timely manner.
Error initializing sound - Stream failure : Audio stream did not load in a timely manner.
Error initializing TTS routed audio' : Audio stream did not load in a timely manner.

Which only happens when spamming the command using a keyboard trigger over 10 times.

Though this also occurs in v1.7.2.16("regular").


This is using a default Windows 10 TTS voice("Microsoft David Desktop").

Tkael

  • Newbie
  • *
  • Posts: 49
Re: Voice Attack 1.7.2 (steam version) crashing repeatedly
« Reply #10 on: September 02, 2018, 04:41:06 PM »
In my case, it always crashes on the second execution with no keyboard spamming necessary. With Ivona Amy.

Gary

  • Administrator
  • Hero Member
  • *****
  • Posts: 2827
Re: Voice Attack 1.7.2 (steam version) crashing repeatedly
« Reply #11 on: September 02, 2018, 04:56:39 PM »
What if, 'Single TTS instance' is checked?  Options > System/Advanced

Pfeil

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 4759
  • RTFM
Re: Voice Attack 1.7.2 (steam version) crashing repeatedly
« Reply #12 on: September 02, 2018, 06:37:42 PM »
Switching profiles revealed that some of the commands actually keep running(well, existing, anyways) in the background.
Comparing the amount of "Beginning test" to "Ending test" shows that the amount of commands that actually run properly is small: 22 beginning, to 4 ending in a single test.

Waiting a few minutes did not result in either TTS playing, or log entries appearing.

Triggering the command again does run it from beginning to end, with TTS playing.

Oddly, after the errors in the log, keyboard-triggering commands no longer works(neither does the "Stop Commands" hotkey). F1 to open VoiceAttackHelp.pdf does still work, though I assume that's using a winforms event rather than the general keyboard hook.

CPU usage was 0% while these commands existed in the background.


This occurs regardless of the state of the "Single TTS Instance" option.

Gary

  • Administrator
  • Hero Member
  • *****
  • Posts: 2827
Re: Voice Attack 1.7.2 (steam version) crashing repeatedly
« Reply #13 on: September 02, 2018, 07:45:52 PM »
Were you using a pause to keep commands open?  If you were using a pause to keep a command open on profile switch or command stop, that is by design.  In order to keep timing as close as it can be, there is no check to see if a command is stopped during a pause.  The reason is that since there is nothing going on during the pause, it doesn't hurt to just keep going until it expires.  The command exits when it is done.

Pfeil

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 4759
  • RTFM
Re: Voice Attack 1.7.2 (steam version) crashing repeatedly
« Reply #14 on: September 02, 2018, 09:28:00 PM »
Were you using a pause to keep commands open?
No pause involved, the command is exactly this:
Code: [Select]
Write [Blue] 'Beginning test' to log
Say, '1'
Say, '2'  (and wait until it completes)
Say, '3'
Say, '4'  (and wait until it completes)
Say, '5'
Write [Blue] 'Ending test' to log

Gary

  • Administrator
  • Hero Member
  • *****
  • Posts: 2827
Re: Voice Attack 1.7.2 (steam version) crashing repeatedly
« Reply #15 on: September 02, 2018, 10:33:32 PM »
I'm able to gum it up pretty easy by keyboard spamming on v1.7.2.16, versus v1.7.2.  I'll have to look into what has changed.

Gary

  • Administrator
  • Hero Member
  • *****
  • Posts: 2827
Re: Voice Attack 1.7.2 (steam version) crashing repeatedly
« Reply #16 on: September 02, 2018, 10:51:21 PM »
I made a certain area where it was checking state a little bit overzealous.  I reverted it back to what it was.  We can still keyboard spam it to break, tho (even in 1.7.2).  I don't think I will have a resolution for that for the next few weeks, as I will be mostly out of pocket.  This hasn't come up in almost ten years, so, I'm not going to classify this as an emergency just yet.  I put a build out in the, 'unofficial' bin that rolls back that particular section to 1.7.2's state check:  http://www.voiceattack.com/unofficial  Sorry about that!


Edit by Pfeil: The URL wasn't wrapped in BBCode tags, which lead to the text after it getting tacked onto the end making both the URL invalid and the text invisible. I hope you don't mind, but I took the liberty of fixing that.
« Last Edit: September 03, 2018, 02:03:33 AM by Pfeil »

Tkael

  • Newbie
  • *
  • Posts: 49
Re: Voice Attack 1.7.2 (steam version) crashing repeatedly
« Reply #17 on: September 03, 2018, 01:52:26 AM »
Hi guys, 'Single TTS Instance is checked`, `Enable plugin support` is unchecked, the speech engine is the Windows default (Windows 10 x64), and the audio output type is `Integrated components`. Let me know if there are any other settings you'd like me to check?

I dropped the "unofficial" test exe into my steamapps folder but I'm still getting a crash on the second execution of my test command (just right clicking and executing the command twice, with a short pause between each execution).

Pfeil

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 4759
  • RTFM
Re: Voice Attack 1.7.2 (steam version) crashing repeatedly
« Reply #18 on: September 03, 2018, 02:39:02 AM »
As it appears there are two separate, if potentially related, issues here, I created a new topic for the one not described in the OP so discussion can be grouped with its respective issue.

Tkael

  • Newbie
  • *
  • Posts: 49
Re: Voice Attack 1.7.2 (steam version) crashing repeatedly
« Reply #19 on: September 03, 2018, 03:40:31 AM »
Fair enough. As I've already stated, I don't think that I'm in a position where I can definitively assess the cause of these crashes. All of my investigations have ended with a .dmp file like the one I already described above and the dmp files generated by my test code appear to be similar (e.g. have the same exception message) as the dmp files generated when VA crashes with EDDI. But I could be barking up the wrong tree. :-) My intent isn't to hijack the thread.

I should probably also note that I've observed the same sort of crashes as described by the OP on my own setup while running VoiceAttack with EDDI (these crashes sometimes occur multiple times per day and can be very disruptive to gameplay). I've tried to monitor these crashes with Visual Studios set up to debug the EDDI plugin while it is attached to VoiceAttack.exe. With this setup, I can see when the exception occurs but since the exception is reported as being on the VoiceAttack side and neither EDDI nor VoiceAttack log the error I don't know if there's a way for me to address it on my side.

Tkael

  • Newbie
  • *
  • Posts: 49
Re: Voice Attack 1.7.2 (steam version) crashing repeatedly
« Reply #20 on: September 04, 2018, 01:17:28 AM »
The "unofficial" build in the other thread seems to be much more stable with respect to VoiceAttack `say` actions. Unfortunately, my test commands incorporating EDDI's `say` actions are still crashing.

Code: [Select]
Write [Blue] 'Beginning test' to log
Say, '1'  (and wait until it completes)
Set Text [Script] to '2'
Execute external plugin, 'EDDI 3.0.2-b2' and wait for return
Say, '3'  (and wait until it completes)
Set Text [Script] to '4'
Execute external plugin, 'EDDI 3.0.2-b2' and wait for return
Say, '5'  (and wait until it completes)
Write [Blue] 'Ending test' to log

With this test command, EDDI successfully speaks "two" and completes the invoked method, returning control to VA. However, VA crashes before it's able to speak "3".

My debugger reports the following unhandled exception:

System.AccessViolationException: 'Attempted to read or write protected memory. This is often an indication that other memory is corrupt.'

This exception occurs in unnamed worker thread:

Not Flagged   >   16704   33   Worker Thread   <No Name>   System.Speech.dll!System.Speech.Internal.Synthesis.TtsProxySapi.Speak
                        [External Code]

kenjiro

  • Guest
Re: Voice Attack 1.7.2 (steam version) crashing repeatedly
« Reply #21 on: September 04, 2018, 05:04:02 AM »
Please, hijack the thread as much as needed, as long as the "bug" gets killed :D

Pfeil, I was reading the other thread you created. It looks to me that what Tkael has described does have to do with my OP. Thinking back, I believe these crashes started to happen after I imported EDDI's VA profile into my own (Sigma).

J. Calvert (Joshua)

  • Newbie
  • *
  • Posts: 30
Re: Voice Attack 1.7.2 (steam version) crashing repeatedly
« Reply #22 on: September 04, 2018, 05:56:44 AM »
Don't know if this is helpful or not but I copied Tkaels latest command into my profile and no crashes here.
I'm using VA 1.7.2.19 and EDDI 3.0.3-rc1, Single TTS is unchecked and I'm using default Sapi speech engine and Ivona Amy as default voice.

Edit: my bad, this was using the non-steam version of VA
« Last Edit: September 04, 2018, 09:17:51 AM by J. Calvert (Joshua) »

Pfeil

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 4759
  • RTFM
Re: Voice Attack 1.7.2 (steam version) crashing repeatedly
« Reply #23 on: September 04, 2018, 07:18:51 AM »
Pfeil, I was reading the other thread you created. It looks to me that what Tkael has described does have to do with my OP. Thinking back, I believe these crashes started to happen after I imported EDDI's VA profile into my own (Sigma).
Unfortunately that's what I intended to convey, but apparently failed to. I felt the immediate crash, potentially related to EDDI, was separate from the issue caused by running many TTS instances at once.


Tkael

  • Newbie
  • *
  • Posts: 49
Re: Voice Attack 1.7.2 (steam version) crashing repeatedly
« Reply #24 on: September 08, 2018, 02:27:34 AM »
Hi guys, what else can we investigate / look at to put this issue to bed?

Gary

  • Administrator
  • Hero Member
  • *****
  • Posts: 2827
Re: Voice Attack 1.7.2 (steam version) crashing repeatedly
« Reply #25 on: September 08, 2018, 08:08:30 AM »
I've updated VA to not crash when multiple instances of a speech synth are in use.  I found that using more than, say, three at a time caused them to start hanging, so, I've limited VA to three going forward.  What I would recommend is making sure that you are using only one synth.

Tkael

  • Newbie
  • *
  • Posts: 49
Re: Voice Attack 1.7.2 (steam version) crashing repeatedly
« Reply #26 on: September 09, 2018, 12:56:06 AM »
Hi Gary,
More testing is needed, but converting EDDI to a single synth does appear to have helped with stability (my test commands no longer cause crashes). Thank you! :-)

Gary

  • Administrator
  • Hero Member
  • *****
  • Posts: 2827
Re: Voice Attack 1.7.2 (steam version) crashing repeatedly
« Reply #27 on: September 09, 2018, 07:05:33 AM »
That's good to hear.  I'm thinking something has changed somewhere in the speech components, as this has all not been a problem before (as far as I can recall).  I'd have to try this out on an old Windows 7 installation to see if that's true or not.  I had to include the, 'Single TTS Instance' for VA a while back since some voices would not work, but the built-in ones and Ivona seemed to be OK o_O