Author Topic: system.outofmemoryexception  (Read 5280 times)

rpoteat

  • Guest
system.outofmemoryexception
« on: May 02, 2017, 02:11:35 PM »
Need some help - I have been running into this particular error message about 75% of the times that i use voice attack. (about 3 out of 5 uses will end with this message and corruption of my dat file). 

According to voice attack, my states are as follows:

voiceattack version: 1.6.4.1
os win 10 home 6.2.9200.0 en-us

total physical mem: 16gb
available physical mem: 3gb

total virtual memory: 1gb
avail virtual memory  1gb

This problem occurs at random, i can be opening a vap file, importing, editing, switching to a different profile - i just does not seem to matter. even when using a fresh install. Also of note, this problem has been happening for the past several releases, not just this one.

I've checked at my dat files, and it seems like voice attack runs into this with any .dat file that tries to cross 90,000 kb. I've had a few that have reached 103,000 before crashing, and my largest was 151,932 kb - but any larger than 100 crash every time voice attack has to do anything related to the vap files. (or at least that is my impression of what's happening).

Windows task manager states that cpu use is at 6% and memory is at 68% usage when the last crash happened, and i have over 4GB free hard drive space.

I REALLY need some help, I've literally reached the breaking point with this. Please help save my sanity, (well, what little there is left of it....)  ;)

Pfeil

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 4761
  • RTFM
Re: system.outofmemoryexception
« Reply #1 on: May 02, 2017, 03:40:24 PM »
Do your commands have a large amount of phrase variations? That tends to eat up memory quickly when generating phrase lists for the speech engine.

The file size itself is unlikely to be the issue, rather it's what the information in that file expands to that's taking up memory to calculate and generate.


I seem to recall this came up before, though I can't find the post at the moment; I believe Gary's advice then was to split up your database into multiple .dat files(by having fewer profiles per file) manually.

rpoteat

  • Guest
Re: system.outofmemoryexception
« Reply #2 on: May 02, 2017, 04:24:41 PM »
Do your commands have a large amount of phrase variations? That tends to eat up memory quickly when generating phrase lists for the speech engine.

The file size itself is unlikely to be the issue, rather it's what the information in that file expands to that's taking up memory to calculate and generate.


I seem to recall this came up before, though I can't find the post at the moment; I believe Gary's advice then was to split up your database into multiple .dat files(by having fewer profiles per file) manually.

the phrase variation question is difficult, for some profiles yes, for others no. for most of the errors, i'd have to say no, i was in the process of creating a new profile, and the crash occurs whenever the system does anything remotely connected to the .dat file.  At this point, i wonder if it's just a limitation due to the program being 32-bit, as opposed to a 64-bit program (which should be able to access more system resources & memory at one time, IMH&UO. 

I'm going to try to split the dat up into multiple files, but i think that will also require several different shortcuts for the program as well.  Please let me know if you find the post with instructions on this.

Thanks,
Lensman

Pfeil

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 4761
  • RTFM
Re: system.outofmemoryexception
« Reply #3 on: May 02, 2017, 05:46:45 PM »
I'm going to try to split the dat up into multiple files, but i think that will also require several different shortcuts for the program as well.  Please let me know if you find the post with instructions on this.
I'm not sure that post had instructions, but here's two ways to do it:

VoiceAttack allows you to specify where to look for the profile database by using the "-datadir" parameter, so you can have multiple folders, each containing a reasonably sized profile database, and switch between them.

You don't have to copy a database over if you'd like to start with a clean one, VoiceAttack will save a new database to any empty directory you specified when you click "Done" in the command list.


You can do the switching manually, by having a bunch of shortcuts and clicking the one you want(option 1), or, you can let VoiceAttack do the switching for you by voice command(option 2).

You can put your profile databases anywhere, but for the sake of simplicity, let's say you put them in subfolders of the default directory.
E.G. you'd have "%appdata%/VoiceAttack/db1" and "%appdata%/VoiceAttack/db2", in addition to the default database.

Option 1: You create(or duplicate) a shortcut to VoiceAttack.exe, where the "Target" would be set to something like
Code: [Select]
C:\Program Files (x86)\VoiceAttack\VoiceAttack.exe -datadir "%appdata%/VoiceAttack/db1/"To switch to your first additional database, change "db1" to the appropriate subfolder, and VoiceAttack will use the database in that folder.

You can still start VoiceAttack via the regular shortcut as well(without any parameters), which means it uses the default database("%appdata%/VoiceAttack/VoiceAttack.dat").


Option 2: You use the default database as a launching point for the others, so you can switch databases by voice command.
You'd start VoiceAttack by the normal shortcut, then speak which database you want to switch to. You could also switch by speaking the profile name(more on that below).

Each database would contain the commands necessary to switch to the other databases, these commands would look something like this:
Change to database one
Code: [Select]
Run application 'C:\Program Files (x86)\VoiceAttack\Apps\RestartVAwDB.bat' -with parameters '"%appdata%/VoiceAttack/db1/"'
Close window 'VoiceAttack'

This will make VoiceAttack close itself and start a new instance with a different database, using a batch file as the intermediary("RestartVAwDB.bat", though you're free to choose the name and location, as long as the "Run application" path points to it).

The batch file contains:
Code: [Select]
TIMEOUT /T 3
start "" "C:\Program Files (x86)\VoiceAttack\VoiceAttack.exe" -datadir "%~1" -profile "%~2"
The timeout at the top is set to 3 seconds(for my machine), to allow VoiceAttack to shutdown fully before the next instance is started. If this is too short, or not there at all, the new instance will close because it detects VoiceAttack is already running, and you'll end up with no VoiceAttack running at all.

Note that there's a "-profile" parameter as well. This is optional(you don't have to provide data for that parameter in the "Run  an Application" "With these parameters" field if you just want the alphabetically first profile in the database) and can be used to switch to a profile directly within another database.
E.G.
Change to profile five
Code: [Select]
Run application 'C:\Program Files (x86)\VoiceAttack\Apps\RestartVAwDB.bat' -with parameters '"%appdata%/VoiceAttack/db2/" "profile five"'
Close window 'VoiceAttack'

rpoteat

  • Guest
Re: system.outofmemoryexception
« Reply #4 on: May 02, 2017, 05:51:52 PM »
will give option 2 a try later tonight or tomorrow!

thanks for the help on this!
Lensman

rpoteat

  • Guest
Re: system.outofmemoryexception
« Reply #5 on: May 03, 2017, 12:31:39 PM »
I'm going to try to split the dat up into multiple files, but i think that will also require several different shortcuts for the program as well.  Please let me know if you find the post with instructions on this.
I'm not sure that post had instructions, but here's two ways to do it:

VoiceAttack allows you to specify where to look for the profile database by using the "-datadir" parameter, so you can have multiple folders, each containing a reasonably sized profile database, and switch between them.

You don't have to copy a database over if you'd like to start with a clean one, VoiceAttack will save a new database to any empty directory you specified when you click "Done" in the command list.


You can do the switching manually, by having a bunch of shortcuts and clicking the one you want(option 1), or, you can let VoiceAttack do the switching for you by voice command(option 2).

You can put your profile databases anywhere, but for the sake of simplicity, let's say you put them in subfolders of the default directory.
E.G. you'd have "%appdata%/VoiceAttack/db1" and "%appdata%/VoiceAttack/db2", in addition to the default database.

Option 1: You create(or duplicate) a shortcut to VoiceAttack.exe, where the "Target" would be set to something like
Code: [Select]
C:\Program Files (x86)\VoiceAttack\VoiceAttack.exe -datadir "%appdata%/VoiceAttack/db1/"To switch to your first additional database, change "db1" to the appropriate subfolder, and VoiceAttack will use the database in that folder.

You can still start VoiceAttack via the regular shortcut as well(without any parameters), which means it uses the default database("%appdata%/VoiceAttack/VoiceAttack.dat").


Option 2: You use the default database as a launching point for the others, so you can switch databases by voice command.
You'd start VoiceAttack by the normal shortcut, then speak which database you want to switch to. You could also switch by speaking the profile name(more on that below).

Each database would contain the commands necessary to switch to the other databases, these commands would look something like this:
Change to database one
Code: [Select]
Run application 'C:\Program Files (x86)\VoiceAttack\Apps\RestartVAwDB.bat' -with parameters '"%appdata%/VoiceAttack/db1/"'
Close window 'VoiceAttack'

This will make VoiceAttack close itself and start a new instance with a different database, using a batch file as the intermediary("RestartVAwDB.bat", though you're free to choose the name and location, as long as the "Run application" path points to it).

The batch file contains:
Code: [Select]
TIMEOUT /T 3
start "" "C:\Program Files (x86)\VoiceAttack\VoiceAttack.exe" -datadir "%~1" -profile "%~2"
The timeout at the top is set to 3 seconds(for my machine), to allow VoiceAttack to shutdown fully before the next instance is started. If this is too short, or not there at all, the new instance will close because it detects VoiceAttack is already running, and you'll end up with no VoiceAttack running at all.

Note that there's a "-profile" parameter as well. This is optional(you don't have to provide data for that parameter in the "Run  an Application" "With these parameters" field if you just want the alphabetically first profile in the database) and can be used to switch to a profile directly within another database.
E.G.
Change to profile five
Code: [Select]
Run application 'C:\Program Files (x86)\VoiceAttack\Apps\RestartVAwDB.bat' -with parameters '"%appdata%/VoiceAttack/db2/" "profile five"'
Close window 'VoiceAttack'

Option 2 works like a charm!

Now we just need the ability to customize the plugins so that only certain ones load with each profile, and maybe a way to make the profile global or the default profile you use no matter which other profile(s) you are running. I've currently got it linked with all of my major programs, but the global profile may be a better solution in the future.

I'm still hopeful for a 64-bit version of VA, but i'm sure gary has a trick or two up his sleeve for the future...  :)

Thanks again for all the help - until next time. 

Gangrel

  • Caffeine Fulled Mod
  • Global Moderator
  • Full Member
  • *****
  • Posts: 216
  • BORK FNORK BORD
Re: system.outofmemoryexception
« Reply #6 on: May 03, 2017, 03:06:47 PM »
Well, you can do the "global" profile, by using the "include commands from another profile" option....

Yes, you would have to do that on a per profile basis (ie for each additional profile you make), but it *is* doable.