Warning: Can't synchronize with repository "(default)" (/home/git/ome.git does not appear to be a Git repository.). Look in the Trac log for more information.
Notice: In order to edit this ticket you need to be either: a Product Owner, The owner or the reporter of the ticket, or, in case of a Task not yet assigned, a team_member"

Task #6419 (closed)

Opened 13 years ago

Closed 13 years ago

Bug: getIFD can throw NPE

Reported by: jamoore Owned by: cxallan
Priority: minor Milestone: OMERO-Beta4.3.2
Component: General Version: n.a.
Keywords: n.a. Cc:
Resources: n.a. Referenced By: n.a.
References: n.a. Remaining Time: 0.0d
Sprint: 2011-09-15 (5)

Description

Even if a BfPyramidPixelBuffer is initialized with write==true, if readerFile.exists(), then the write will not be initialized:

        if (!write || readerFile.exists())
        {
            if (write) {
                log.debug("Initialized in a write-context; setting read-only for " + filePath);
            }

in which case the first call to setTile fails on the call to getIFD:

    private synchronized IFD getIFD(int z, int c, int t, int w, int h)
    {
        if (lastT == -1 && lastC == -1 && lastZ == -1)
        {
            try
            {
                initializeWriter(writerFile.getAbsolutePath(),
                        TiffCompression.JPEG_2000.getCodecName(), false, w, h);
            }
            catch (Exception e)
            {
                throw new RuntimeException(e);
            }
        }

Change History (3)

comment:1 Changed 13 years ago by jmoore

Found due to testing issue #6417

comment:2 Changed 13 years ago by cxallan

  • Sprint set to 2011-09-15 (5)

comment:3 Changed 13 years ago by Chris Allan <callan@…>

  • Remaining Time set to 0
  • Resolution set to fixed
  • Status changed from new to closed

(In [977557819c91975576e8480c37a045dfa3196e2f/ome.git] on branch develop) Ensure read-only status is verified. (Fixes #6419)

Note: See TracTickets for help on using tickets. You may also have a look at Agilo extensions to the ticket.

1.3.13-PRO © 2008-2011 Agilo Software all rights reserved (this page was served in: 0.63907 sec.)

We're Hiring!