Prevent stack overflow in model relay through introduction of NaN values into model and other causes

Description

So far our "link counting system" described in FLUID-5303 is inactive, which leaves us at high risk of runaway propagation of updates. We should at least add back in a safety net of some kind to ensure that runaway propagation triggers a framework diagnostic rather than a stack overflow.

We should also fix the algorithm in fluid.model.isSameValue to cut off the currently dominant possibility for failure to settle - any NaN that gets into the model will ensure that it can never compare equal to itself. This was observed during development of Flocking -

Clark Kent: I get the most informative error
<error>
Antranig Basman: !
From where
Clark Kent: fetchChangeChildren
Antranig Basman: All it says is <error"?
Clark Kent: yes, literally <error>
Antranig Basman: This must be Chrome
It's got far far worse at diagnostics recently
Clark Kent: yes
Firefox is telling me I have too much recursion
Antranig Basman: Yup, it calls fluid.audioSystem.calcNumBlocks with (undefined, undefined)
It returns NaN which then gets into the model and then everything goes bananas

Environment

None

Activity

Show:

Antranig Basman August 20, 2015 at 6:44 PM

Merged into trunk at revision 282f1a318718eed0b0ec060fb8b4ad254417fd7e

Fixed

Details

Assignee

Reporter

Components

Fix versions

Affects versions

Priority

Created April 17, 2015 at 5:48 PM
Updated February 27, 2017 at 8:49 PM
Resolved August 20, 2015 at 6:44 PM