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 #4865 (closed)

Opened 8 years ago

Closed 8 years ago

Bug: insight import fails with NPE in ome.util.PixelData

Reported by: jamoore Owned by: jburel
Priority: minor Milestone: OMERO-Beta4.3
Component: Insight Version: n.a.
Keywords: n.a. Cc: cxallan, jburel
Resources: n.a. Referenced By: n.a.
References: n.a. Remaining Time: n.a.
Sprint: 2011-04-21 (10)

Description

     [echo] Launching OMERO.insight ...
     [java] java.lang.NullPointerException
     [java] 	at ome.util.PixelData.bytesPerPixel(PixelData.java:162)
     [java] 	at ome.util.PixelData.<init>(PixelData.java:78)
     [java] 	at ome.formats.importer.OMEROWrapper.openPlane2D(OMEROWrapper.java:186)
     [java] 	at ome.formats.importer.ImportLibrary.writeDataBlockBased(ImportLibrary.java:806)
     [java] 	at ome.formats.importer.ImportLibrary.importData(ImportLibrary.java:736)
     [java] 	at ome.formats.importer.ImportLibrary.importImage(ImportLibrary.java:558)
     [java] 	at org.openmicroscopy.shoola.env.data.OMEROGateway.importImage(OMEROGateway.java:6043)
     [java] 	at org.openmicroscopy.shoola.env.data.OmeroImageServiceImpl.importFile(OmeroImageServiceImpl.java:1031)

See #4835, only on branch team/feature/4835-repo-refactoring

Change History (4)

comment:1 Changed 8 years ago by jburel

Seems to be a problem in importer. I will add a control so that the application does not crash

comment:2 Changed 8 years ago by jmoore

I've fixed the NPE on the branch (pushing now).

comment:3 Changed 8 years ago by jburel

we can probably close the ticket?

comment:4 Changed 8 years ago by jmoore

  • Resolution set to fixed
  • Sprint set to 2011-04-21 (10)
  • Status changed from new to closed

Fixed in [2f8bfe834430b395c81725de9b6071b660704b42/ome.git]:

Author: jmoore <josh@glencoesoftware.com>
Date:   Mon Apr 4 22:41:22 2011 +0200

    `PixelData` fix by setting field before method call in ctor

diff --git a/components/model/src/ome/util/PixelData.java b/components/model/src/ome/util/PixelData.java
index 953642d..2390962 100644
--- a/components/model/src/ome/util/PixelData.java
+++ b/components/model/src/ome/util/PixelData.java
@@ -75,6 +75,7 @@ public class PixelData
    public PixelData(String pixelsType, ByteBuffer data)
    {
        this.data = data;
+       this.pixelsType = pixelsType;
        bytesPerPixel = bytesPerPixel();
        if (pixelsType.equals("int8")) {
            isSigned = true;

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.106389 sec.)

We're Hiring!