ByteProcessor class pixel[] fieldl become NULL when closing associated ImagePlus windows
Posted by Eddie Iannuccelli on
URL: http://imagej.273.s1.nabble.com/ByteProcessor-class-pixel-fieldl-become-NULL-when-closing-associated-ImagePlus-windows-tp3702343.html
Hi,
My plugin write some annotations into a ByteProcessor displayed in an
ImagePlus (I use putPixel,drawString methods, etc.).
My annotated ByteProcessor instance is stored as a field in a dedicated
class so I can display it again and again in a new ImagePlus window if user
unfortunatly close current image (I don't know how to prevent user closing
ImagePlus windows ;).
The null pointer exception occurs when user close the ImagePlus windows and
continue working anyway. My ByteProcessor instance is not null but sudently,
Null pointer error occurs in ij.process.ByteProcessor.putPixel method or any
other ByteProcessor method using Pixel[] array field. A quick debug showed
that this array is null since ImagePlus is closed although my ByteProcessor
is still not null.
Is-it a normal behaviour ? How can I troubleshoot my pb ?
Thanks
----------------------------------------
Eddie Iannuccelli
Laboratoire de génétique cellulaire
INRA - Castanet Tolosan
Tel: 05 61 28 54 44 / Fax: 05 61 28 53 08