From: Carlos Machado (JIRA) <jira@co...> - 2012-02-15 11:13:12
Carlos Machado created GEOT-4045:
Summary: OOME when using ImageMosaicJDBCReader
Issue Type: Bug
Components: imagemosaic-jdbc plugin
Affects Versions: 8.0-M4
Environment: Windows 7 Professional SP1 64 bits, Oracle Java 1.6.0 u27 32 bits, Quad-Core, 4 GB RAM
Reporter: Carlos Machado
This is a weird problem related to image rescaling. The exception is thrown in ImageComposerThread (from org.geotools.gce.imagemosaic.jdbc package) when the image is zoomed out to very small sizes. Private method getStartDimension() will calculate the image dimension based on rescaleX and rescaleY fields, but because these have very small values (smaller than 1) the calculated dimension will represent an image that occupies more than 1 GB of memory (throwing an OOME when it tries to create a new BufferedImage). So far, so "good".
The weird part is that the exception is being "swallowed" by the JVM, i think. I attached a simple maven project that reproduces the problem i've described above. I had to register a custom Thread.UncaughtExceptionHandler in order to print the exception stack trace.
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://jira.codehaus.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira