mbedward / jaitools

Raster image processing for Java developers
17 stars 15 forks source link

RangeLookUp computeRect is not threadsafe #206

Closed mbedward closed 11 years ago

mbedward commented 11 years ago

Original author: simboss1@gmail.com (January 07, 2013 16:38:18)

RangeLookUp is a PointOpImage, as such the resulting image is computed in multithreading hence the computeTile method must be either threadsafe of syncronized.

Right now none of the two applies, hence under heavey parallelism RangeLookUp may throw ArrayIndexOutOfBound exception since its internal doLookup method uses member variable to store the location at which the computations is being performed.

Original issue: http://code.google.com/p/jaitools/issues/detail?id=208

mbedward commented 11 years ago

From simboss1@gmail.com on January 07, 2013 16:39:07 I provided a tentative patch that duplicates some of the codes as JAI Core usually does when computing data in multithreaded ops.