IllegalArgumentException not catched in BasicWMSRenderer2 if wms sends a
illegal png
------------------------------------------------------------------------------------
Key: UDIG-1217
URL: http://jira.codehaus.org/browse/UDIG-1217
Project: uDIG
Issue Type: Improvement
Components: wms
Affects Versions: UDIG 1.1.RC9
Environment: The project I'm involved in is an eclipse RCP based
application which is using components of UDIG in one of its perspectives. We
are currently using UDIG 1.1 RC8. In UDIG this exception never reaches the
surface (i don't no which component catches this) but in our project we get it
quite often. This is not tested with 1.1RC9 since we didn't make an upgrade yet.
Reporter: Tony Roth
Assigned To: Richard Gould
Priority: Minor
Attachments: lut.png
The WMS server we are using is the Geomedia product of Intergraph. If the
bounding box of a wms request has a scale denominator which is too small or
too large (that no layer of the wms delivers data) then the wms generates a png
which seems to be corrupt .
We get this exception:
Exception in thread "Thread-170" java.lang.IllegalArgumentException: LUT has
improper length!
at
javax.imageio.ImageTypeSpecifier$Indexed.<init>(ImageTypeSpecifier.java:866)
at
javax.imageio.ImageTypeSpecifier.createIndexed(ImageTypeSpecifier.java:955)
at
com.sun.imageio.plugins.png.PNGImageReader.getImageTypes(PNGImageReader.java:1463)
at
com.sun.imageio.plugins.png.PNGImageReader.readImage(PNGImageReader.java:1348)
at
com.sun.imageio.plugins.png.PNGImageReader.read(PNGImageReader.java:1530)
at javax.imageio.ImageIO.read(ImageIO.java:1400)
at javax.imageio.ImageIO.read(ImageIO.java:1322)
at
net.refractions.udig.render.internal.wms.basic.BasicWMSRenderer2$3.run(BasicWMSRenderer2.java:442)
The problem is, that in javax.imageio.ImageTypeSpecifier row 862 each of the
LUT byte arrays is null. I know, it's not the problem of udig if a wms sends a
corrupt png but it would be nice if in
net.refractions.udig.render.internal.wms.basic.BasicWMSRenderer in the
try/catch block of "private BufferedImage readImage" also the
java.lang.IllegalArgumentException is catched.
Like my other two bugs the udig application catches this exception and stops
rendering. In my project this exception is dumped to the stdout / stderr and
the renderer won't stop. It's irritating for the user since the progressbar
indicates that the software ist still working.
Attached is the png which is the mother of this problem. The WMS server which
sends this png is not under my control so I hope to fix it on the client side.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
_______________________________________________
User-friendly Desktop Internet GIS (uDig)
http://udig.refractions.net
http://lists.refractions.net/mailman/listinfo/udig-devel