The changes for RT-4095 and RT-4181 enforced and documented the restrictions on how nodes can be arranged in the scene graph.
Unfortunately, through use of the 'bind' keyword, it is possible to violate the restrictions on scene graph structure, and in the current state of the system it is not possible for library code to enforce these restrictions.
For example, one rule is that a node cannot appear in more than one group. However, the following code does just that:
var n:Node = null;
var g1 = Group { content: bind [ n ] };
var g2 = Group { content: bind [ n ] };
n = Group { }; // or any kind of node
When the bind-expressions fire, Node n will appear in the content sequences of both Groups, and the trigger code will be unable to prevent this from happening. An AssignToBoundExpression exception or some such will be thrown, and the invalid structure will remain. It is also possible to introduce cycles into the scene graph this way.
We need to figure out how to deal with this issue. Some kind of language support for nullifying bind expressions, or something, is necessary.
Unfortunately, through use of the 'bind' keyword, it is possible to violate the restrictions on scene graph structure, and in the current state of the system it is not possible for library code to enforce these restrictions.
For example, one rule is that a node cannot appear in more than one group. However, the following code does just that:
var n:Node = null;
var g1 = Group { content: bind [ n ] };
var g2 = Group { content: bind [ n ] };
n = Group { }; // or any kind of node
When the bind-expressions fire, Node n will appear in the content sequences of both Groups, and the trigger code will be unable to prevent this from happening. An AssignToBoundExpression exception or some such will be thrown, and the invalid structure will remain. It is also possible to introduce cycles into the scene graph this way.
We need to figure out how to deal with this issue. Some kind of language support for nullifying bind expressions, or something, is necessary.
- is blocked by
-
JDK-8104727 "AssignToBoundException: Cannot mutate bound sequence" while affecting a Group.content bound to a sequence
-
- Resolved
-