Author Topic: Crash and problem keyrecognition after profile reload  (Read 5281 times)

Hollywood_315

  • Guest
Crash and problem keyrecognition after profile reload
« on: November 15, 2016, 10:03:32 AM »
Hi,

An issue I experience with 1.6 is that after a profile reload it no longer recognizes keyboard keypresses to trigger commands. VA needs to be fully restarted to get it working again. I have seen it generate a crash after profile reload, report attached for reference.

All the best,
Hollywood

Gary

  • Administrator
  • Hero Member
  • *****
  • Posts: 2832
Re: Crash and problem keyrecognition after profile reload
« Reply #1 on: November 15, 2016, 10:18:45 AM »
When you say, 'profile reload', what is it exactly that you are referring to?

Also, is there any way you could send your VoiceAttack.dat file and any steps to reproduce the problem over to support@voiceattack.com?  I can throw it on the debugger and see if there's something amiss.

Hollywood_315

  • Guest
Re: Crash and problem keyrecognition after profile reload
« Reply #2 on: November 15, 2016, 10:47:21 AM »
Hi there

Thanks for the swift response, I'll send some additional info over via email.



Hollywood_315

  • Guest
Re: Crash and problem keyrecognition after profile reload
« Reply #3 on: November 17, 2016, 06:51:00 AM »
Hi

Additional info, I found the line that is causing the problem.

One of the adressed commands (_Menu_Collect_Data) contains an action to set a text variable from a file (URI).
Perhaps relevant (or not): a token {VA_APPS} is used for constructing the path of the file to read.

The programs chokes if I have the PTT key (1) held down during execution of this Set A Text Value action, as descibed in email i.e. the keyboard no longer works and a hook exception is generated.
But if I remove the Set A Text Value line, all works normal.

Hope this is helpful.


 

Gary

  • Administrator
  • Hero Member
  • *****
  • Posts: 2832
Re: Crash and problem keyrecognition after profile reload
« Reply #4 on: November 17, 2016, 09:53:00 PM »
Inside the _Menu_Collect_Data_ command, if you disable certain lines in there, does everything work?

I'm particularly curious about this line:

Run application '{VA_APPS}\VAICOM\Tools\VAICOM_fetch_data.cmd' (hidden) - wait until it completes

There's a mission.lua that gets set to a variable.  Does that ever get invoked?  I'm not seeing a place where it would be (using the DCS_Setting_Theater variable).


Also, there's the menu chatter feature that plays one of 421 random sounds.  If you create a folder and change that random function to point to that folder, you'll shrink the size of your profile down some.  The folder can contain file shortcuts (.lnk) to the actual files if you are just trying to keep a subset of sounds.  Just a housekeeping tip ;)

Hollywood_315

  • Guest
Re: Crash and problem keyrecognition after profile reload
« Reply #5 on: November 18, 2016, 12:44:03 AM »
Yes it is that line that creates the problems i.e. where it sets the DCS_Setting_Theater variable from URI (mission.lua file).
If you remove that line or just change Set Text Value To: to text field instead of URI then the crashes while holding PTT disappear. N.B. the line that runs the .cmd has no influence, I already removed that one to test but then the error is still there.

Regarding the chatter files.. yeah I'm pretty sure I had a good reason to do it that way, just can't remember what it was though lol ;D. Thanks for the tip I plan to change it in next versions.

Hollywood_315

  • Guest
Re: Crash and problem keyrecognition after profile reload
« Reply #6 on: December 28, 2016, 01:10:10 PM »
Update on this one after having done some more testing.

The situation has improved! In that VA no longer crashes (using beta 1.6.1.8 ).
But still there is a reproducible problem when using PTT in combination with readout of a specific file which is used with DCS. 
I attached a very simple debug profile to show the issue.

*) Press '1' key for PTT and say 'reset'. It will read the mission.lua file into a text variable (set the path first).
*) Repeat this once or twice and you will see that the PTT key stops working.

If you do the same using a joystick button for PTT there is no problem.
The only funny thing I can see about the mission.lua text file is that it contains some Russian (yes) characters.
Could be a clue maybe? Thanks a lot

« Last Edit: December 28, 2016, 03:11:15 PM by Hollywood_315 »

Gary

  • Administrator
  • Hero Member
  • *****
  • Posts: 2832
Re: Crash and problem keyrecognition after profile reload
« Reply #7 on: January 08, 2017, 09:52:19 PM »
Starting to dig into this.  Sorry for the delay...  this came in right as I was sick and then getting ready to get on the road for checkups.  I'll see what I can find.


Edit:
First thing I am wondering is why are you using commands with shortcuts?  There is a global hotkey (and a global joystick... and mouse button) that does the same thing & doesn't require commands (unless this is just for the purpose of illustrating).

Edit 2:
I'm able to do all you are saying over, and over and over and over.  Tried on an SSD and then a mechanical drive.  I then thought I would see if there would be anything telling if I moved the .lua to VoiceAttack.com and accessed it using a URL.  It works each time, and I even got myself the, 'You look like a bot' message for downloading too many times ;)

You may want to do a Chkdsk on the drive you are using if it is hanging on load.  Something else to consider is if it's too much to load the file, it may require you to break it up into smaller parts and then concatenate the text using {TXTCONCAT}.

I was hoping I could reproduce this problem and have a solution for you :(

« Last Edit: January 08, 2017, 10:23:06 PM by Gary »

Hollywood_315

  • Guest
Re: Crash and problem keyrecognition after profile reload
« Reply #8 on: January 10, 2017, 08:27:25 PM »
No worries - sorry to hear you got sick, take it easy! Appreciate you looking into this.

RE Edit: Use of schortcuts. This is because in DCS jet aircraft there are multiple radios to operate, each with their own PTT key on the HOTAS controls. This multi-radio behaviour is emulated in the VAICOM profiles. Also for technical reasons to do with DCS it is critical that PTT press and release are managed separately in the profiles.
So the global hotkey approach does not really apply here.

RE Edit2: Lol@bot message. Yeah I can reproduce the error consistently but it's still guesswork what's causing the issue. I am starting to suspect now it may have to do with the way that the mission.lua is generated locally by DCS e.g. if the file has become corrupted somehow. The thing is this used to work without problems. Thnaks for the update I'll try some more tests with 1.5.12. 





 

Gary

  • Administrator
  • Hero Member
  • *****
  • Posts: 2832
Re: Crash and problem keyrecognition after profile reload
« Reply #9 on: January 10, 2017, 09:14:53 PM »
Also, there's a profile-level hotkey if you're interested in that (in profile options).  Not sure if that would be helpful, but I thought I'd throw that out there.