NOTICE! This is a static HTML version of a legacy LOCI Software ticket.

LOCI projects are now located on GitHub. The Bio-Formats project can be found here.

Ticket #1 (closed defect: fixed)

Opened 2007-03-14T05:42:15-05:00

Last modified 2007-03-14T13:48:12-05:00

Leica Reader openBytes() Exception

Reported by: callan Owned by: somebody
Priority: minor Milestone:
Component: bio-formats Severity:
Keywords: Cc:
Blocked By: Blocking:


The Leica reader currently throws and exception when the openBytes(String id, int no, byte[] buf) method is called.

Change History

comment:1 Changed 2007-03-14T05:44:18-05:00 by callan

Basic test code:

package ome.formats.importer;


import loci.formats.FormatException;
import loci.formats.ImageReader;

public class LeicaTester
        public static final String FILENAME =
        public static void main(String[] args)
                throws FormatException, IOException
                ImageReader reader = new ImageReader();
                byte[] buffer = new byte[65536];
                reader.openBytes(FILENAME, 0, buffer);
                System.err.println("Length: " + buffer.length);


Exception in thread "main" java.lang.NullPointerException
	at loci.formats.ImageReader.openBytes(
	at ome.formats.importer.LeicaTester.main(

comment:2 Changed 2007-03-14T06:15:57-05:00 by callan

Changes made in r2351 (the commenting out of the openBytes(String id, int no, byte[] buf) method basically) cause any method calls to openBytes(String id, int no, byte[] buf) to be handled by the superclass BaseTiffReader. As no initFile() has been performed in the context of the LeicaReader instance, the NullPointerException is thrown.

comment:3 Changed 2007-03-14T07:51:17-05:00 by melissa

  • Status changed from new to closed
  • Resolution set to fixed

comment:4 Changed 2007-03-14T09:28:35-05:00 by callan

Tying this in with the changeset that fixes the issue: r2437.

comment:5 Changed 2007-03-14T13:48:12-05:00 by curtis

  • Component changed from component1 to bio-formats