#307 Uninitialized Mesh Indices cause crash with Mesa ATI drivers

trunk
closed
gazebo (59)
5
2010-04-28
2009-09-30
No

The Unit Cylinder created in OgreSimpleShape.cc has two extra indices that are never initialized. This also means that the number of indices is not a multiple of 3. Depending on the values in these indices, the Mesa drivers will attempt to read past the end of the buffer and segfault. The attached patch fixes the problem. Adjusts the number of indices and fixes the for loop range to adjust the normals. Nvidia drivers do not seem to be effected by the these indices.

Discussion

  • Scott Biddlestone

    Patch to fix the number of indices in the unit cylinder mesh

     
  • John Hsu

    John Hsu - 2010-04-27

    Hi, is this fixed in the latest svn trunk?

     
  • Scott Biddlestone

    I see everything got moved to MeshManager, so I am checking this again right now. (Sorry, I haven't been keeping up like I should)

    A quick check on an Nvidia box shows that the number of indices for the cylinder is now a multiple of 3, so that is fixed.

    However, the last three indices still do not have their normals normalized in the for loop at MeshManager.cc:512.
    Should probably be <= instead of just <. Not sure if this will cause a crash or not in Mesa.

    I will test this on an ATI box as soon as I can.

     
  • Scott Biddlestone

    Closing since it is fixed in SVN head ( rev. 8631). Tested on ATI box with Mesa 7.5.2 and xorg ati driver 6.12.4.

     
  • Scott Biddlestone

    • status: open --> closed
     

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks