Skip to content

Conversation

@olbris
Copy link
Contributor

@olbris olbris commented Mar 17, 2025

Added a check for no sample to prevent NPE when interacting with (scroll wheel) a blank 3d window.

Fixes JW-52721. Also reported by AIND in Slack.

@porterbot, you can merge when you approve.

@stuarteberg

@olbris olbris requested a review from porterbot March 17, 2025 13:24
@olbris
Copy link
Contributor Author

olbris commented Mar 17, 2025

Relevant part of traceback from JW-52721:

Stack Trace:
java.lang.NullPointerException
at org.janelia.scenewindow.SceneInteractor.notifyObservers(SceneInteractor.java:49)
at org.janelia.scenewindow.OrbitPanZoomInteractor.mouseDragged(OrbitPanZoomInteractor.java:178)
at org.janelia.horta.HortaMouseEventDispatcher.mouseDragged(HortaMouseEventDispatcher.java:79)
at org.janelia.workstation.controller.listener.TolerantMouseClickListener.mouseDragged(TolerantMouseClickListener.java:100)
at java.awt.Component.processMouseMotionEvent(Component.java:6587)
at java.awt.Component.processEvent(Component.java:6308)

@porterbot
Copy link
Collaborator

Do think we also need a notification to the user when they try to open the Horta 3D view without a sample (clicking on the Horta 3D checkbox)?

@porterbot porterbot merged commit 4e7b5ac into master Mar 18, 2025
1 check passed
@olbris
Copy link
Contributor Author

olbris commented Mar 18, 2025

I think it's fine without a notification. The window opens up black. No fields in the control center will be populated.

@olbris olbris deleted the fix-npe-blank-3d-view branch May 23, 2025 19:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants