Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-52747

sphere.cpp findExtremePoints crash if points vector is emtpy

    XMLWordPrintable

Details

    • Bug
    • Resolution: Incomplete
    • P2: Important
    • None
    • 5.7.0 Beta
    • Qt3D

    Description

      Crash at sphere.cpp, line 113 if points vector is empty.

      This happens if I pass the parent entity to the entity constructor when creating a new object in an already visible scene. Then the entity is added to the scene immediately and the bounding volume calculation is done before the vertices are set.

      auto *entity = new SomeEntity(parentEntity);
      entity->setDataForEntity();

      The problem can be avoided by setting the parent explicitly after the data is set, like this

      auto *entity = new SomeEntity;
      entity->setDataForEntity();
      entity->setParent(parentEntity);

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            seanharmer Sean Harmer
            harald Harald Vistnes
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes