8000 Support null child groups · Issue #122 · owl-project/owl · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
Support null child groups #122
Open
Open
@lpisha

Description

@lpisha

owlInstanceGroupCreate allows the list of child groups to be null. The documentation used to say (a PR has been submitted changing this) that this sets each of the children to a "null group", which together with the surrounding language implies that this is acceptable. However, if the child groups are not all set to valid groups before the parent group is used, it will crash. And, manually setting a child group to null hits an assertion if in debug mode and crashes if in release mode.

With the aforementioned PR, the documentation now clarifies that the children must be initialized before the parent group is used. So, there will no longer be an ambiguity. However, it seemed there may have been some interest in actually supporting null groups.

  1. The parent would not have to be re-created every time the number of children changed; the parent could be created to hold a larger number of children, and the unused children could be set to null.
  2. Supporting null groups would also remove the invalid intermediate state OWL can be put in where owlInstanceGroupCreate was called but the children were not yet set. For example, in a larger, interactive application, the loading or setup of a child object might get aborted for some reason, but the rendering might need to continue, and this invalid state might therefore lead to a crash.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0