Author Topic: VA hangs when accessing invalid URI  (Read 4850 times)

samkatakouzinos

  • Newbie
  • *
  • Posts: 14
VA hangs when accessing invalid URI
« on: February 13, 2017, 05:00:34 PM »
I use a profile that access a web service at an ip address/port URI.
These values are manually typed into a profile then access by other profile parts.

If I enter invalid URI details, calls made to that web service are of course not established.
Yet VA will hang and die when there is no response from that invalid URI.

May VA have say an internal timeout so that incorrect URI calls are recoverable.
May it also supply a value to indicate that a URI call was not established?

I'd like VA to keep running while I'm attending to my hands on game even when I screw up entering details incorrectly.

Gary

  • Administrator
  • Hero Member
  • *****
  • Posts: 2832
Re: VA hangs when accessing invalid URI
« Reply #1 on: February 13, 2017, 05:28:27 PM »
There is a 30-second default timeout in the event the request happens to not return.  You should get a message in the log that says, 'Unable to get value from URI - The operation has timed out.'  This can be tested against http://www.voiceattack.com/testtimeout.aspx

If that's not what it's doing, what is the URI that you are trying to access?

samkatakouzinos

  • Newbie
  • *
  • Posts: 14
Re: VA hangs when accessing invalid URI
« Reply #2 on: February 13, 2017, 07:01:44 PM »
As you say it is returning that message in the log.

VA does hang and turn white and when touched Windows asks me if I want to close or wait for the program.
If I choose wait eventually VA wakes up and the message is produced in the log window.
VA is not 'responsive' during the timeout period.

The profile is accessing a local ip:port serviced by a local exe that provides data based on URI path.
The profile runs loops checking for changes in variables from the URI paths and acts on them.

Can a profile read that log message? As in (after 30 seconds) VA times out from my invalid URI and the profile can then use that log message as an exception?
If so, I could ask the profile creator to make an initial test 'ping' to the web service to establish a valid connection before diving into the loops.

Gary

  • Administrator
  • Hero Member
  • *****
  • Posts: 2832
Re: VA hangs when accessing invalid URI
« Reply #3 on: February 13, 2017, 09:12:16 PM »
Yikes!  Yeah... it's hanging the main thread.  It's fixed now.  Also, as a stopgap for testing, I added, '-uritimeout' as a command-line option:

-uritimeout 5000 sets the timeout to 5 seconds.  The default is 30 seconds.

I put a build out in, 'unofficial' if you want to try it out before the next beta:

http://www.voiceattack.com/unofficial


Good catch on that.  Surprised it's taken this long to come up.

samkatakouzinos

  • Newbie
  • *
  • Posts: 14
Re: VA hangs when accessing invalid URI
« Reply #4 on: February 14, 2017, 03:54:39 PM »
Well that is a remarkable improvement!

This VA unofficial version is responsive while my profile is brilliantly ongoingly failing to access the web service that I deliberately turned off.

I'm running VA with no startup values defined.
It's window doesn't turn white, I can minimize, maximize and drag the window around the desktop, even enter Options.
At no point does Windows ask me to close the program.

And it doesn't wait 30s to return the 'Unable to get value from URI - The operation has timed out.' log message.
Much closer to under 3s.

A deserving 'Woot!' from me!

Gary

  • Administrator
  • Hero Member
  • *****
  • Posts: 2832
Re: VA hangs when accessing invalid URI
« Reply #5 on: February 15, 2017, 01:42:45 PM »
Ok, cool.  Thanks for letting me know.

I had to double-check that I didn't set the default timeout to 3000 instead of 30000 lol.

Again, thanks for the heads-up.

samkatakouzinos

  • Newbie
  • *
  • Posts: 14
Re: VA hangs when accessing invalid URI
« Reply #6 on: February 15, 2017, 05:59:02 PM »
One question.

What value, message or flag should a profile look out for to know that there was no connection / timeout with a URI?
If it's in the help pdf I must've missed it.

Gary

  • Administrator
  • Hero Member
  • *****
  • Posts: 2832
Re: VA hangs when accessing invalid URI
« Reply #7 on: February 15, 2017, 10:42:01 PM »
There is no implemented flag system other than creating a variable and checking if the value is, 'not set' after the call is made.