Seeing a Null Pointer Exception when using Pixel Inspection Tool
- Dominant language
- Java
- Stars
- 786
- Forks
- 267
- PR merge metrics
- No merged PRs in 30d
Description
ImageJ 1.54f
Exception in thread "Pixel Inspector" java.lang.NullPointerException
at ij.plugin.tool.PixelInspector.addImageListeners(PixelInspectionTool.java:238)
at ij.plugin.tool.PixelInspector.writeNumbers(PixelInspectionTool.java:351)
at ij.plugin.tool.PixelInspector.run(PixelInspectionTool.java:330)
at java.lang.Thread.run(Thread.java:748)
Steps:
1. Open up Fiji
2. Select Pixel Inspection Tool on Toolbar
3. Open up File->Open Samples->Fluorecsnt Cells
4. Left click anywhere on Image
a. Pixle Inspection Window pops up
5. Close Fluorecsnt Cells window
6. Open up again File->Open Samples->Fluorecsnt Cells
a. Console window with Null Pointer Exception pops up
See screen recording:
https://github.com/imagej/ImageJ/assets/40019379/3c8455ff-ea7c-4a3b-802f-61b3ee8e1afd
PixelInspectionTool.java from GitHub:
https://github.com/imagej/ImageJ/blob/master/ij/plugin/tool/PixelInspectionTool.java
This might be the offending code if variable **win** is null at line 238.
if (win == null) close();
canvas = win.getCanvas();
Contributor guide
No contributing guide indexed for this repository
Research direction
Start with ij/plugin/tool/PixelInspectionTool.java, especially addImageListeners around line 238, and reproduce the listed Fiji steps: open the Fluorescent Cells sample, use Pixel Inspection, close the image, then reopen it. Done means reopening the sample no longer produces the reported NullPointerException.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- desktop
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 38/100