ImageJ icon indicating copy to clipboard operation
ImageJ copied to clipboard

Seeing a Null Pointer Exception when using Pixel Inspection Tool

Open scuniff opened this issue 1 year ago • 0 comments

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();

scuniff avatar Sep 08 '23 04:09 scuniff