jfcorbett Posted January 3, 2011 Posted January 3, 2011 Is there a way to suppress or tame the "Script execution is taking longer than expected" message box? What is the criterion for this expectation?Some of my scripts take sort of a long time to run, though not really "longer than expected". More often than not, WAsP brings up a "Script is taking longer than expected. End / Continue" message box, sometimes multiple times during script execution. This box pops up on top of other applications, which is a minor annoyance. Also, the keyboard shortcut for the "End" option is "E", which I've accidentally pressed a few times, meaning the script was terminated and I had to restart it from scratch. Any tips are appreciated!Jean-François
Duncan Posted January 5, 2011 Posted January 5, 2011 This is a windows scripting feature. We might be able to change the setting to change the timeout.How long are your scripts taking?
jfcorbett Posted January 6, 2011 Posted January 6, 2011 A few to several minutes. But the timeout seems to be random. Sometimes the message pops up after under a minute, sometimes several minutes, sometimes twice in quick succession, sometimes not at all. So it's a bit difficult to request a specific timeout.
jfcorbett Posted January 6, 2011 Posted January 6, 2011 Perhaps a quick and dirty solution would be to change the default button to Continue (instead of End) and remove the keyboard shortcuts, if this is at all possible. This would greatly reduce the likelihood of accidentally ending a script when the message pops up while typing in another application. Right now "End" is triggered upon typing "e", space, or return, which are all quite frequent keystrokes. If the changes above could be implemented, then no single keystroke could end the script (though still certain combinations such as left arrow + space, but these are a couple of orders of magnitude less frequent).
Duncan Posted January 10, 2011 Posted January 10, 2011 The message which appears is part of Windows, and is not under our control. But we can adjust this timeout setting.I have checked the code and it's set to 60 seconds. Of course the script might take longer to execute, but this is how long the scripting engine will wait when it thinks the script is hanging. You are the first person to experience this as far as I know, but most people are not doing what you're trying to do. Perhaps the best thing is simply to remove the timeout completely. This means that if the script hangs, then the whole WAsP session will need to be killed off, losing any unsaved work. We can put that change into the next WAsP 10 release (10.1).
HPJ Posted January 13, 2011 Posted January 13, 2011 I, for one, would like to keep the timeout. However, it must be possible to make it user (or even script-) adjustable. That way, if you know you have a long execution time ahead of you you can change the default setting?
jfcorbett Posted January 14, 2011 Posted January 14, 2011 A user-defined timeout would definitely be a step forward. When I want to stop a script, I just press "Cancel" on whichever progress box is currently showing. What exactly is the use of the timeout? Is it for cases when one accidentally programmed e.g. an infinite loop? (e.g. Do Until False = True : Loop)
Duncan Posted January 14, 2011 Posted January 14, 2011 How about putting it in the header part of the script file as an optional attribute to override the default? Then we can all be happy..!
Duncan Posted January 18, 2011 Posted January 18, 2011 I have added this as a feature request for 10.1
avnerfurshpan Posted February 3, 2014 Posted February 3, 2014 Hello, I have the same timeout problem, with WASP 11 (version number 11.00.0232).Was this ever fixed, as suggested by Duncan's post from 3 years ago?Thank you!
jfcorbett Posted February 3, 2014 Posted February 3, 2014 Not that I know of. Our engineers run scripts all the time and they constantly run into this annoyance.
Duncan Posted February 3, 2014 Posted February 3, 2014 Hello. I'm sorry to report that this feature request got "lost in the long grass" while we worked on the CFD integration for WAsP 11. I found it assigned to a future milestone. Now it's been moved up to the next release. If you're ever "constantly running into an annoyance", please keep on telling us! We have many items on our radar, and sometimes they can be accidentally dropped like this. Apologies again.Duncan.
jfcorbett Posted February 4, 2014 Posted February 4, 2014 Hi Duncan, sorry, I didn't mean to put you on the spot! Here's me asking again. We've resorted to having a Msgbox warn the user prior to running the script that they may see these "Script execution is taking longer than expected" messages, so they don't worry unduly and keep their guard up against accidentally pressing a keyboard shortcut for "End".
avnerfurshpan Posted February 4, 2014 Posted February 4, 2014 Unfortunately, my problem with this is more than a mild annoyance, as my script is supposed to run overnight, and the message eventually crashes the script. Is there any workaround to this problem (even if it would take considerably longer to run)? What exactly does the timer count (it's obviously not counting time from the start of the script run)? Is it idle time, processor use?Thank you for the speedy response!
Duncan Posted February 4, 2014 Posted February 4, 2014 Avnerfurshpan, I have emailed you directly from waspsupport to ask you more about your case.I think that for the script timeout to arise, you need to have invoked a single (atomic) operation which takes a long time. The script might take a long time to run if it does many operations, and no problem will arise. The error is caused by a single operation taking a long time.I'm interested in what kind of operation you're running that takes so long to complete. Is it a big wake calculation, or a resource grid? How big are your maps?Duncan
Ray Posted July 28, 2014 Posted July 28, 2014 Hi guys,just letting you know we now have a build of WAsP that supports the timeout attribute in the script header! If anyone would be interested in testing this feature please let me know via email and we will get a special build out to you.Cheers,Ray
vob Posted April 15, 2015 Posted April 15, 2015 Thanks for integrating this into Wasp, from the changelog I take it that this has already been included in build 58 of Wasp11.2. Nevertheless I still don't know _how_ to activate the timeout settings. Has this been documented somewhere? What exctly needs to be written in the script header to set (or completely deactivate?) the timer?BTW: Has there been any update of the Rvea_scripting.chm help file? The version I have dates back to 2011...Thanks!
vob Posted April 21, 2015 Posted April 21, 2015 Anyone?...I would be really greatful if someone could point me to the correct way of implementing that setting. We currently have a couple of calculations with large wind farms that frequently run into that problem and it would really ease our life if this message could be suppressed.Thanks for any reply.
Duncan Posted April 21, 2015 Posted April 21, 2015 You can add an attribute to the DOM root of the script XML. Here is an example 10 second one.
Duncan Posted April 21, 2015 Posted April 21, 2015 Ray wrote this:The Timeout attribute allows the user to override the internal scripting timeout used by WAsP whenever a script is run. The Timeout value is specified in seconds. A default timeout value of 60 seconds will be used if the attribute is not specified.The Timeout attribute is only read when WAsP is started. This means that if you edit the attribute while WAsP is running you will need to restart WAsP before the change takes effect.
vob Posted April 27, 2015 Posted April 27, 2015 Thanks, Duncan, for letting us know. I'll test that. Is there any upper limit for the timeout? And is there any special value to disable the timeout completely?Thanks again!
Duncan Posted April 27, 2015 Posted April 27, 2015 Hi,I have asked Ray to reply here. He's the best qualified to help.Expect something in the next 36 hours.Duncan.
Ray Posted April 27, 2015 Posted April 27, 2015 Hi, there is no special value to disable the timeout completely. To avoid your script getting interrupted you can just set the value to something far greater than you might expect the script to run. For example 100000 will give you just over a day before the dialog appears. The upper limit is 2147483647 (68 years!).Cheers,Ray
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now