Skip to content

DTED read NPE with null AVList argument #92

Open
@zglueck

Description

@zglueck

From:
https://forum.worldwindcentral.com/forum/world-wind-java-forums/development-help/156783-bug-npe-in-dted-java

To reproduce this, simply launch gov.nasa.worldwindx.examples.SurfaceImag eViewer and try to add a DTED file. Here is the exception:

Exception in thread "Thread-23" java.lang.NullPointerException
at gov.nasa.worldwind.formats.dted.DTED.rea dUHL(DTED.java:322)
at gov.nasa.worldwind.formats.dted.DTED.rea d(DTED.java:123)
at gov.nasa.worldwind.data.DTEDRasterReader .doRead(DTEDRasterReader.java:95)
at gov.nasa.worldwind.data.AbstractDataRast erReader.read(AbstractDataRasterReader.j ava:117)
at gov.nasa.worldwind.terrain.LocalElevatio nModel.addElevations(LocalElevationModel .java:339)
at gov.nasa.worldwind.terrain.LocalElevatio nModel.addElevations(LocalElevationModel .java:293)
at gov.nasa.worldwindx.examples.SurfaceImag eViewer$AppFrame$1$1.run(SurfaceImageVie wer.java:90)
at java.lang.Thread.run(Thread.java:745)

A new AVList argument was added to gov.nasa.worldwind.formats.dted.DTED.rea d()
This gets called by gov.nasa.worldwind.data.DTEDRasterReader .doRead(), which has always accepted an AVList argument, but now it passes it to the read() method.
The problem happens in the line in bold. We still send a null value for the AVList argument, but this null eventually gets operated on, leading to the NPE.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions