Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NDPI: Prevent Null Pointer Exception #3248

Open
wants to merge 1 commit into
base: develop
from

Conversation

Projects
None yet
2 participants
@dgault
Copy link
Member

commented Oct 17, 2018

This issue was raised on the mailing list and a sample file has been provided: http://lists.openmicroscopy.org.uk/pipermail/ome-users/2018-October/007233.html

The images failed to open due to a NullPointerException on line 176, with the markers variable being null.

To test:

  • Ensure builds and tests remain green
  • Using the sample file provided on the mailing list test that the file is able to be open and read correctly
@sbesson

This comment has been minimized.

Copy link
Member

commented Oct 24, 2018

Closing/reopening to include #3251

@sbesson sbesson closed this Oct 24, 2018

@sbesson sbesson reopened this Oct 24, 2018

@sbesson

This comment has been minimized.

Copy link
Member

commented Oct 25, 2018

@dgault is the sample file available somewhere? Should we configure it alongside our QA repository (and potentially make it public with the agreement of the author)?

@dgault

This comment has been minimized.

Copy link
Member Author

commented Oct 31, 2018

I have a copy of the sample file as it no longer appears to be available on the previous link. I will get it configured for the repo tests at least.

@sbesson sbesson added this to the 6.0.0 milestone Nov 1, 2018

@sbesson

This comment has been minimized.

Copy link
Member

commented Feb 11, 2019

Retested using the sample file uploaded as part of http://lists.openmicroscopy.org.uk/pipermail/ome-users/2019-February/007381.html.

The reader initialization via the initial setId call is no longer failing with a NPE. In an OMERO server with this PR included, smaller resolutions are correctly read but there is an issue while accessing the large resolutions and the thumbnail:

screen shot 2019-02-11 at 11 29 36
screen shot 2019-02-11 at 11 29 55

Looking at the server logs, it looks like the change is in the JPEGTurboService in the absence of markers.

java.lang.RuntimeException: java.io.IOException: Restart interval and markers invalid
	at omeis.providers.re.data.PlaneFactory.createPlane(PlaneFactory.java:223) ~[rendering.jar:na]
...
Caused by: java.io.IOException: Restart interval and markers invalid
	at loci.formats.services.JPEGTurboServiceImpl.initialize(JPEGTurboServiceImpl.java:222) ~[formats-bsd.jar:6.0.0-SNAPSHOT]
	at loci.formats.in.NDPIReader.openBytes(NDPIReader.java:167) ~[formats-gpl.jar:6.0.0-SNAPSHOT]
	at loci.formats.ImageReader.openBytes(ImageReader.java:460) ~[formats-api.jar:6.0.0-SNAPSHOT]
	at loci.formats.ChannelFiller.openBytes(ChannelFiller.java:156) ~[formats-bsd.jar:6.0.0-SNAPSHOT]
	at loci.formats.ChannelFiller.openBytes(ChannelFiller.java:148) ~[formats-bsd.jar:6.0.0-SNAPSHOT]
	at loci.formats.ChannelSeparator.openBytes(ChannelSeparator.java:200) ~[formats-bsd.jar:6.0.0-SNAPSHOT]
	at loci.formats.ReaderWrapper.openBytes(ReaderWrapper.java:348) ~[formats-api.jar:6.0.0-SNAPSHOT]
	at ome.io.bioformats.BfPixelsWrapper.getTile(BfPixelsWrapper.java:350) ~[romio.jar:na]
	at ome.io.bioformats.BfPixelBuffer.getTile(BfPixelBuffer.java:499) ~[romio.jar:na]
	at omeis.providers.re.data.PlaneFactory.createPlane(PlaneFactory.java:193) ~[rendering.jar:na]
	... 58 common frames omitted

@sbesson sbesson removed this from the 6.0.0 milestone Feb 12, 2019

@dgault dgault added this to the 6.0.1 milestone Feb 27, 2019

@dgault

This comment has been minimized.

Copy link
Member Author

commented Feb 27, 2019

A similar report has been received in https://forum.image.sc/t/a-couple-of-problems-with-ndpi-files/23194/6 and a sample file has been provided.

I will modify this PR to fix both issues and include for 6.0.1

@dgault dgault modified the milestones: 6.0.1, 6.1.0 Mar 13, 2019

@sbesson sbesson removed this from the 6.1.0 milestone May 10, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.