-
Notifications
You must be signed in to change notification settings - Fork 26
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
QPT NullPointerException(s) #1497
Comments
Stack traces:
|
It's been a while but I think the model is null when no plan is open, and may be momentarily null when refreshing from the database. Are you seeing this when there's definitely a plan open? |
Yes, on refresh. |
Yep, ok. In any case you're right about using |
A number of us, very much including myself, have modified the QPT over the years without really knowing what we're doing. Likely as a consequence, it's pretty easy to see NPEs scroll by as you use the QPT. I can't detect any issue in the UI itself as a result, but it is disconcerting.
The issue appears to be assuming a model is available when it isn't for some reason. For example in the
CandidateObsController
:Getting the RA will sometimes throw a NPE because
viewer.getModel()
isnull
.Other examples in
Visualizer
:sometimes is surprised to find a
null
model. Similarly ingetElevationCurve
:Since the
model
may not be there when you need it, most of these methods could be edited to return anOption<Foo>
but perhaps the real issue is that the model should always be there.The text was updated successfully, but these errors were encountered: