Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug: nullptr returned by loadLinkGeometry not handled properly for unsupported shapes #113

Open
marip8 opened this issue Jul 17, 2024 · 1 comment

Comments

@marip8
Copy link
Contributor

marip8 commented Jul 17, 2024

The function loadLinkGeometry returns a nullptr for shape types it does not know how to render. This causes a segfault when parsing currently unsupported shapes, like planes. Instead of returning a nullptr, we should instead return an empty Ogre::Entity object (if possible) or check if the return of this function is a nullptr before adding it to the scene here and here.

@marip8
Copy link
Contributor Author

marip8 commented Jul 17, 2024

For the case of the plane, it seems like we might be able to support it with the following:

auto entity = entity_container.addUntrackedEntity(tesseract_gui::EntityContainer::RESOURCE_NS);
ogre_entity = scene.createEntity(entity.unique_name, Ogre::SceneManager::PrefabType::PT_PLANE);

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant