Div by zero errors in new nightly

Hi Chris,

I just upgraded our test machines to a new nightly (old: 140512, new: today’s).

I now get these new errors in the console, for the same experiment code:

00:00:05: Loaded wav file (/var/folders/cy/74p2fr416js2y2mbv2bwtgz40000gp/T/MWorks/Experiment Cache/_Users_histed_ExperimentXML-git_HoldAndDetectConstant_HoldAndDetectConstant8/tmp/…/wavs/noiseBlob.wav; format=4353, size=960, freq=96000
00:00:05: ERROR: Division by zero
00:00:05: ERROR: Division by zero
00:00:05: ERROR: Division by zero
00:00:05: ERROR: Division by zero
00:00:05: Experiment successfully loaded, using protocol: JuiceOnHoldProtocol
00:00:05: Received new codec, updating variable registry.

I did some digging around on tender and found this:
http://help.mworks-project.org/discussions/problems/94-load-time-errors-in-conditional-statements-and-transitions

Is that a likely source of the errors? Or might it be coming from somewhere else?
I don’t know how to debug where these errors are coming from. It’s suboptimal for us where technicians are sometimes running the machines to have them ignore errors on every experiment load, but we can do this.

thanks,
Mark

Hi Mark,

There should be some way to eliminate the errors. If you send me a copy of your experiment, I’ll figure out where they’re coming from and how to get rid of them.

Cheers,
Chris

Hi Chris,

I thought you might have some immediate ideas, but I was able to zero in on the problem pretty quickly.

There are some assignments in my experiment along the lines of

And as you’ve noted before those are evaluated at load time with the default value of var2, which was zero. Changing the default to 1 fixed the errors. There are no consequences for the experiment because var2 is always set to a value via a prior action before the division action is executed.

Thanks,
Mark