Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[udig-devel] InMemoryCoverageLoader issues loading jpeg

Hello,

Last week I was having problems loading some larger jpg images (7216 by 5412
pixels). The
net.refractions.udig.catalog.internal.worldimage.InMemoryCoverageLoader
would pop up a dialog asking if I wanted to re-start uDig with more (1024MB)
memory, but more memory did not help. The stack trace is below.

The jpeg image should only be about 140MB uncompressed. On further
examination, it looks like my problems are caused by the imageIO library
(javax.imageio.IIOException: Decoder cannot decode input). For some reason
everything seems to work fine this morning...

So the root of my problem is not with uDig, but I have two suggestions for
improving the InMemoryCoverageLoader.

1) don't call updateMemoryLevel() (telling the user to restart uDig with
more memory) from the load() method when an exception (other than an
OutOfMemoryError) is thrown. In my case, no amount of memory will help.

I only make this as a suggestion, since there may be many other cases I
don't know about where increasing the memory actually helps. But in my case
I initially wasted time trying to figure out how my images were taking up so
much memory, when this was not the problem.

2) the size() method is calculating image size as KB, but reporting them as
MB.

Rueben


org.geotools.data.DataSourceException: IOException
	at
org.geotools.gce.image.WorldImageReader.getHRInfo(WorldImageReader.java:356)
	at
org.geotools.gce.image.WorldImageReader.<init>(WorldImageReader.java:248)
	at
org.geotools.gce.image.WorldImageFormat.getReader(WorldImageFormat.java:346)
	at
org.geotools.gce.image.WorldImageFormat.getReader(WorldImageFormat.java:162)
	at
org.geotools.gce.image.WorldImageFormat.getReader(WorldImageFormat.java:58)
	at
net.refractions.udig.catalog.rasterings.AbstractRasterService.getReader(Abst
ractRasterService.java:126)
	at
net.refractions.udig.catalog.rasterings.AbstractRasterGeoResourceInfo.getBou
nds(AbstractRasterGeoResourceInfo.java:50)
	at
net.refractions.udig.catalog.internal.worldimage.WorldImageInfo.getBounds(Wo
rldImageInfo.java:30)
	at
net.refractions.udig.project.internal.impl.GeoResourceInfoInterceptor$Wrappe
r.getBounds(GeoResourceInfoInterceptor.java:68)
	at
net.refractions.udig.project.internal.impl.LayerImpl.obtainBoundsFromResourc
es(LayerImpl.java:2014)
	at
net.refractions.udig.project.internal.impl.LayerImpl.getBounds(LayerImpl.jav
a:1985)
	at
ca.forestecosystem.udig.flyeye.ObliqueMapView.addPhotoToMap(ObliqueMapView.j
ava:728)
	at
ca.forestecosystem.udig.flyeye.ObliqueMapView.setObliquePhotoAOI(ObliqueMapV
iew.java:579)
	at
ca.forestecosystem.udig.flyeye.GetPhotosTool$1.run(GetPhotosTool.java:133)
	at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:35)
	at
org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:134)
	at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java:4041)
	at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3660)
	at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2629)
	at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2593)
	at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2427)
	at org.eclipse.ui.internal.Workbench$7.run(Workbench.java:670)
	at
org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
	at
org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:663)
	at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
	at
net.refractions.udig.internal.ui.UDIGApplication.start(UDIGApplication.java:
136)
	at
org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:
196)
	at
org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(
EclipseAppLauncher.java:110)
	at
org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAp
pLauncher.java:79)
	at
org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:369)
	at
org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:179)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
	at java.lang.reflect.Method.invoke(Unknown Source)
	at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:619)
	at org.eclipse.equinox.launcher.Main.basicRun(Main.java:574)
	at org.eclipse.equinox.launcher.Main.run(Main.java:1407)
	at org.eclipse.equinox.launcher.Main.main(Main.java:1383)
Caused by: javax.imageio.IIOException: IOException
	at
com.sun.media.imageioimpl.plugins.clib.CLibImageReader.locateImage(CLibImage
Reader.java:412)
	at
com.sun.media.imageioimpl.plugins.clib.CLibImageReader.getNumImages(CLibImag
eReader.java:533)
	at
org.geotools.gce.image.WorldImageReader.getHRInfo(WorldImageReader.java:295)
	... 38 more
Caused by: javax.imageio.IIOException: Decoder cannot decode input.
	at
com.sun.media.imageioimpl.plugins.jpeg.CLibJPEGImageReader.decode(CLibJPEGIm
ageReader.java:134)
	at
com.sun.media.imageioimpl.plugins.clib.CLibImageReader.skipImage(CLibImageRe
ader.java:461)
	at
com.sun.media.imageioimpl.plugins.clib.CLibImageReader.locateImage(CLibImage
Reader.java:409)
	... 40 more




Back to the top