ogre-pagedgeometry icon indicating copy to clipboard operation
ogre-pagedgeometry copied to clipboard

`Ogre::Image` debug assert from `ColorMap::_getColorMap_Billinear()`

Open ohlidalp opened this issue 1 month ago • 1 comments

Apparently the x < mWidth check fails because both values are 256. Image

Windows10, Visual Studio 2022, Debug build with OGRE 14.4.1

Stack and locals from ColorMap::_getColorMap_Billinear():

Image
  Name Value Type
  mapHeight 256 unsigned int
  mapWidth 256 unsigned int
  x 2994.44165 float
  xIndex 255 unsigned int
  xIndexFloat 255.025681 float
  xRatio 0.0256805420 float
  xRatioInv 0.974319458 float
  z 1624.06433 float
  zIndex 138 unsigned int
  zIndexFloat 138.086823 float
  zRatio 0.0868225098 float
  zRatioInv 0.913177490 float

ohlidalp avatar Oct 05 '25 17:10 ohlidalp

the assert is right. This is a out of bounds access at the border. It should probably be clamped (std::min)

paroj avatar Oct 05 '25 18:10 paroj