-
Notifications
You must be signed in to change notification settings - Fork 650
Closed
Labels
bugCrash or wrong behavior of an existing feature.Crash or wrong behavior of an existing feature.core APIsAffecting public APIs of core functionality classes, such as ImageInput, ImageOutput, ImageBuf.Affecting public APIs of core functionality classes, such as ImageInput, ImageOutput, ImageBuf.
Description
Describe the bug
When creating an ImageBuf from an EXR and then using a non-const iterator on it I get division by zero. This issue appeared when we upgraded from v2.3.12.0 to v2.4.8.0
To Reproduce
- Create an ImageBuf from an exr file
- Create an ImageBuf::Iterator from the imagebuf
- I get exception integer division by zero
Expected behavior
Not divide by zero
Evidence
Code to reproduce:
OIIO::ImageBuf buf("testsuite\\oiiotool\\ref\\abs.exr");
OIIO::ImageBuf::Iterator<float> it(buf);
Error:
Unhandled exception at 0x00007FF8FF8FC22C (OpenImageIO_d.dll) in mtlx_baker-test.exe: 0xC0000094: Integer division by zero.
imagebuf.cpp:2856 int xtile = (x - m_spec.x) / tw;
Platform information:
- OIIO 2.4.8.0
- OS: Windows 11
- C++ compiler: Visual Studio 2019
- Any non-default build flags when you build OIIO:
"OIIO_BUILD_TESTS": "0",
"OIIO_DOWNLOAD_MISSING_TESTDATA": "0",
"BUILD_DOCS": "0",
"USE_PYTHON": "0"
Metadata
Metadata
Assignees
Labels
bugCrash or wrong behavior of an existing feature.Crash or wrong behavior of an existing feature.core APIsAffecting public APIs of core functionality classes, such as ImageInput, ImageOutput, ImageBuf.Affecting public APIs of core functionality classes, such as ImageInput, ImageOutput, ImageBuf.