Closed mktk1117 closed 4 years ago
When I have a world and added a height map as below,
std::unique_ptr<raisim::World> world; heightMap = world->addHeightMap(0.0, 0.0, terrainProperties); heightMap->setName("heightMap");
The getObject function with name and casting to the HeightMap class works fine without rendering.
getObject
HeightMap
const auto& heightMap = dynamic_cast<HeightMap*>(world->getObject("heightMap")); double height = heightMap->getHeight(0.0, 0.0);
But, when I enable the rendering, it crashes with the same program.
Valgrind gives
Address 0x4a8 is not stack'd, malloc'd or (recently) free'd 0x53C8FE0: raisim::HeightMap::getHeight(double, double) const (in /opt/raisim/lib/libraisim.so)
why const auto& heightMap not const auto heightMap?
const auto& heightMap
const auto heightMap
We found that this is an Ogre bug. We posted an issue here. Closing this issue for now
When I have a world and added a height map as below,
The
getObject
function with name and casting to theHeightMap
class works fine without rendering.But, when I enable the rendering, it crashes with the same program.
Valgrind gives