Scheduled tasks not on time

Hi Chris,

i stumbled upon a new issue when I tested one of my new Plugins.

It happens when MWorks constructs a timer object that is renewed as soon as it fires.
The attached experiment does this: when the state “endlessly repeating state” is entered, a timer object is created. If the timer expires, the state is reentered and the timer is renewed. This repeats endlessly unless an abort variable is set.

This script runs for a while (depending on the number of times the state is reentered, that is the time you set in the timer object), and then strange things happen. First there are some warnings that the timer is not on time. Later these warnings become errors and then the whole server starts freezing for up to several seconds. During these “freezes” even monitoring applications like the OSX Activity Monitor or “top” stop updating. However, after a while the Server comes back to life and resumes the execution of the script.

I am using the current nightly build (May 20, 2011)

Thank you,
Philipp

Attachment: only_timer.xml (2.55 KB)

just a quick update to give more evidence:

using “wait” instead of “start timer” is a workaround…

Philipp

Hi Philipp,

Thanks for the report. I tried your example and reproduced the warnings and errors (although I never reached the point where MWServer was freezing for several seconds or causing other applications to lock up).

I think this behavior is due to a problem that I recently found and fixed while investigating another issue. (I didn’t have any examples of it causing problems in the wild, so thanks for providing one :slight_smile: With my fix in place, your script seems to run indefinitely without issue.

The relevant change will be in tonight’s nightly build. Can you download it and see if it resolves the issue for you?

Thanks,
Chris

Hi Chris,

I tested the script with the current nightly build and I can confirm that the errors are gone.

Thank you very much!
Philipp