Non initialized array

Michel Lerenard <[email protected]> Tue, 22 Nov 2016 15:28:52 +0100
Newsgroups gmane.comp.video.openexr.devel
Message-ID <[email protected]>
Hi,

while debugging  a weird issue (code crashing when embedded in my app 
and not crashing when standalone), I came across an issue in the 
DeepOutputScanlineFile class.

The lineSampleCount array is never reset. The code calls
_data->lineSampleCount.resizeErase(_data->maxY - _data->minY + 1);

in initialize(), then in the execute function of the buffer task, we 
increment the values of the cells, although they have never been set to 
zero !

_ofd->lineSampleCount[i - _ofd->minY] += _ofd->getSampleCount(j, i);


This buffer is then used when setting a FrameBuffer and some slices are 
missing, which leads to access violations.
I'm using OpenEXR 2.2.0.



Michel