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

Fix for chainIndex out of bounds in BillboardChain::addChainElement #947

Merged
merged 2 commits into from
Feb 26, 2016
Merged

Fix for chainIndex out of bounds in BillboardChain::addChainElement #947

merged 2 commits into from
Feb 26, 2016

Conversation

bponsler
Copy link
Contributor

@bponsler bponsler commented Dec 3, 2015

Fixing a bug in the BillboardLine class when setting up the chains. The case where the number of points is an exact multiple of 16384 (MAX_ELEMENTS) was not being handled and resulted in the number of chains being set to 0 which results in ogre throwing the following exception:

terminate called after throwing an instance of 'Ogre::ItemIdentityException'
  what():  OGRE EXCEPTION(5:ItemIdentityException): chainIndex out of bounds in BillboardChain::addChainElement at /build/buildd/ogre-1.8-1.8.1+dfsg/OgreMain/src/OgreBillboardChain.cpp (line 243)

This issue has been mentioned in: ORB_SLAM issue 60, ORB_SLAM issue 21, hratc2015_framework issue 4, and here

This issue is easy to reproduce using the following steps:

  1. Open rviz
  2. Set the fixed frame to "map"
  3. Add a "Marker" display to rviz
  4. Make sure the marker is subscribed to "visualization_marker" topic (this should be the default)
  5. Publish a Marker with an exact multiple of 16384 points in it
  6. rviz will crash due to chainIndex out of bounds (see the script in test-break-rviz.zip)

…he case where the number of points is an exact multiple of 16384 (MAX_ELEMENTS) was not being handled and resulted in the number of chains being set to 0 which resulted in ogre throwing an exception.
@gitunit
Copy link

gitunit commented Jan 16, 2016

@wjwwood looks like a fix, what do you think, can we expect that included someday?

@wjwwood
Copy link
Member

wjwwood commented Feb 26, 2016

lgtm. I was able to reproduce it and see that this change fixes the crash. I also had a look at some examples that used chains to make sure there weren't any obvious breaks to normal usage.

Thanks, and sorry for the delay in getting it merged.

wjwwood added a commit that referenced this pull request Feb 26, 2016
Fix for chainIndex out of bounds in BillboardChain::addChainElement
@wjwwood wjwwood merged commit bbfb0c5 into ros-visualization:indigo-devel Feb 26, 2016
@gitunit
Copy link

gitunit commented Feb 27, 2016

cool. thank you both

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

Successfully merging this pull request may close these issues.

3 participants