Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DTED read NPE with null AVList argument #92

Open
zglueck opened this issue Jan 27, 2017 · 2 comments
Open

DTED read NPE with null AVList argument #92

zglueck opened this issue Jan 27, 2017 · 2 comments
Labels

Comments

@zglueck
Copy link
Contributor

zglueck commented Jan 27, 2017

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.

@zglueck zglueck added the bug label Jan 27, 2017
@dksteele
Copy link

dksteele commented May 2, 2017

Has there been any progress towards getting a fix for this into the code?

@zglueck
Copy link
Contributor Author

zglueck commented May 2, 2017

@dksteele sorry, no, not yet. The forum post linked above contained a work around.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

No branches or pull requests

2 participants