NASAWorldWind / WorldWindAndroid

The NASA WorldWind Java SDK for Android (WWA) includes the library, examples and tutorials for building 3D virtual globe applications for phones and tablets.
Other
272 stars 125 forks source link

WMS GLUtils.getType throws IllegalArgumentException: Unknown type #67

Open emxsys opened 8 years ago

emxsys commented 8 years ago

A client reported an exception when accessing a World Wind WMS. The following log was provided. It appears the client is accessing a WMS and loading the result into a surface image.

Note: In the log, the BBOX in the GetMap request has been obfuscated; the original request was valid.

09-29 22:54:04.556  1485  1588 E gov.nasa.worldwind: Image retrieval failed with exception 'http://worldwind25.arc.nasa.gov/wms?SERVICE=WMS&VERSION=1.1&REQUEST=GetMap&LAYERS=BlueMarble-200412&STYLES=&SRS=EPSG:4326&BBOX=<hidden>&WIDTH=256&HEIGHT=256&FORMAT=image/png&TRANSPARENT=TRUE'
09-29 22:54:04.571  1485  1485 E gov.nasa.worldwind: RenderableLayer.doRender: Exception while rendering shape 'Surface Image'
09-29 22:54:04.571  1485  1485 E gov.nasa.worldwind: java.lang.IllegalArgumentException: Unknown type
09-29 22:54:04.571  1485  1485 E gov.nasa.worldwind:
at android.opengl.GLUtils.getType(GLUtils.java:71)
09-29 22:54:04.571  1485  1485 E gov.nasa.worldwind:
at gov.nasa.worldwind.render.Texture.<init>(Texture.java:48)
09-29 22:54:04.571  1485  1485 E gov.nasa.worldwind:
at gov.nasa.worldwind.render.RenderResourceCache.retrieveTexture(RenderResourceCache.java:146)
09-29 22:54:04.571  1485  1485 E gov.nasa.worldwind:
at gov.nasa.worldwind.render.RenderContext.retrieveTexture(RenderContext.java:399)
09-29 22:54:04.571  1485  1485 E gov.nasa.worldwind:
at gov.nasa.worldwind.shape.SurfaceImage.doRender(SurfaceImage.java:85)
09-29 22:54:04.571  1485  1485 E gov.nasa.worldwind:
at gov.nasa.worldwind.render.AbstractRenderable.render(AbstractRenderable.java:88)
09-29 22:54:04.571  1485  1485 E gov.nasa.worldwind:
at gov.nasa.worldwind.layer.RenderableLayer.doRender(RenderableLayer.java:214)
09-29 22:54:04.571  1485  1485 E gov.nasa.worldwind:
at gov.nasa.worldwind.layer.AbstractLayer.render(AbstractLayer.java:134)
09-29 22:54:04.571  1485  1485 E gov.nasa.worldwind:
at gov.nasa.worldwind.BasicFrameController.renderLayers(BasicFrameController.java:83)
09-29 22:54:04.571  1485  1485 E gov.nasa.worldwind:
at gov.nasa.worldwind.BasicFrameController.renderFrame(BasicFrameController.java:44)
09-29 22:54:04.571  1485  1485 E gov.nasa.worldwind:
at gov.nasa.worldwind.WorldWindow.renderFrame(WorldWindow.java:912)
09-29 22:54:04.571  1485  1485 E gov.nasa.worldwind:
at gov.nasa.worldwind.WorldWindow.doFrame(WorldWindow.java:656)
09-29 22:54:04.571  1485  1485 E gov.nasa.worldwind:
at android.view.Choreographer$CallbackRecord.run(Choreographer.java:856)
09-29 22:54:04.571  1485  1485 E gov.nasa.worldwind:
at android.view.Choreographer.doCallbacks(Choreographer.java:670)
09-29 22:54:04.571  1485  1485 E gov.nasa.worldwind:
at android.view.Choreographer.doFrame(Choreographer.java:603)
09-29 22:54:04.571  1485  1485 E gov.nasa.worldwind:
at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:844)
09-29 22:54:04.571  1485  1485 E gov.nasa.worldwind:
at android.os.Handler.handleCallback(Handler.java:739)
09-29 22:54:04.571  1485  1485 E gov.nasa.worldwind:
at android.os.Handler.dispatchMessage(Handler.java:95)
09-29 22:54:04.571  1485  1485 E gov.nasa.worldwind:
at android.os.Looper.loop(Looper.java:148)
09-29 22:54:04.571  1485  1485 E gov.nasa.worldwind:
at android.app.ActivityThread.main(ActivityThread.java:5422)
09-29 22:54:04.571  1485  1485 E gov.nasa.worldwind:
at java.lang.reflect.Method.invoke(Native Method)
09-29 22:54:04.571  1485  1485 E gov.nasa.worldwind:
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726)
09-29 22:54:04.571  1485  1485 E gov.nasa.worldwind:
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)
09-29 22:54:04.571  1485  1588 E gov.nasa.worldwind: Image retrieval failed with exception 'http://worldwind25.arc.nasa.gov/wms?SERVICE=WMS&VERSION=1.1&REQUEST=GetMap&LAYERS=BlueMarble-200412&STYLES=&SRS=EPSG:4326&BBOX=<hidden>&WIDTH=256&HEIGHT=256&FORMAT=image/png&TRANSPARENT=TRUE'
emxsys commented 8 years ago

I've been unable to replicate this error with either a malformed URL or a disconnected network. I tested the original GetMap request and determined the return type from GLUtils.getType on my device: GL_UNSIGNED_BYTE 0x1401

I suspect an issue with the hardware configuration.