Details
Assignee
Antranig BasmanAntranig BasmanReporter
Antranig BasmanAntranig BasmanComponents
Affects versions
Priority
Major
Details
Details
Assignee
Antranig Basman
Antranig BasmanReporter
Antranig Basman
Antranig BasmanComponents
Affects versions
Priority
Created April 9, 2014 at 4:11 AM
Updated April 9, 2014 at 4:11 AM
Right now it is relatively easy to designate a component which appears as a subcomponent of itself - for example, the following definition appeared during the development of the ontology server for the GPII -
fluid.defaults("gpii.ontologyHandler", {
gradeNames: ["fluid.littleComponent", "autoInit"],
....
ontologyHandler: {
type: "gpii.ontologyHandler"
}
},
....
});
Currently the framework accepts these kinds of definitions and tries to instantiate an indefinite number of components as a result. There isn't any visible diagnostic and the user symptoms are a hung process. Unfortunately the current "overflow detection" that we have in both the merging and expansion pathways can't spot this kind of runaway since each instantiated component is individually small. The simplest fix would be to just statically apply the current fluid.strategyRecursionBailout limit (currently 50) to component instantiation depth also. It's barely conceivable that genuine trees of great depth might arise, especially when the new renderer is implemented. In that case it's possible that when FLUID-5304 is implemented we could use the "shape analysis" system to statically detect this kind of fault at the point of issue (or at least after only 2 components have been instantiated) and so bail out much earlier and without the need for a static limit.