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

Segfault when calling DynamicAABBTreeCollisionManager::registerObjects with empty vector #41

Closed
fischerq opened this issue Nov 25, 2014 · 2 comments
Milestone

Comments

@fischerq
Copy link

I am trying to integrate FCL into an existing scenegraph-system, that internally manages multiple levels of object-grouping. In order to use the broadphase algorithms of FCL I fill instances of fcl::DynamicAABBTreeCollisionManager for each grouping.

During the creation of a higher-level grouping I then attempt to add the list of collision objects in the subgroup that is currently empty.

The manager starts a tree traversal for insertion, and the final insertion method HierarchyTree::topdown_0(in file include/fcl/broadphase/hierarchy_tree.hxx, line 353) then tries to touch the first element of the empty list(line 386), causing a segfault.

The method topdown_0 even checks the number of elements before doing the main processing, so I assume it could be a reasonable place to catch the special case of an empty list. However, I can't really assess the affects of setting the root pointer of the tree to NULL (as would be my natural answer to no insertion).

I suspect that similar cases are also currently unhandled by the library, making the usage quite unrelieable.

If you could set a guideline on when special cases should be caught (As early as possible? Or process them until they have to be handled?), I'd be up to fixing issues I find myself and submitting pull requests.

@jslee02
Copy link
Member

jslee02 commented Apr 16, 2015

A pull request #64 was created to solve this issue.

@jslee02
Copy link
Member

jslee02 commented Apr 24, 2015

I believe this issue is fixed by #64.

@jslee02 jslee02 closed this as completed Apr 24, 2015
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

2 participants