Task #12750 (closed)
Bug: MinimalTiffReader.getOptimalTileWidth
Reported by: | wmoore | Owned by: | mlinkert |
---|---|---|---|
Priority: | critical | Milestone: | 5.1.0 |
Component: | Bio-Formats | Version: | n.a. |
Keywords: | n.a. | Cc: | jamoore |
Resources: | n.a. | Referenced By: | n.a. |
References: | n.a. | Remaining Time: | 0.0d |
Sprint: | n.a. |
Description
A user in Dundee complained that a microManager image (4017190) wasn't opening in webclient.
("error in call","Traceback (most recent call last): File "/homes/omero-x/OMERO-CURRENT/lib/python/omeroweb/webgateway/views.py", line 1045, in wrap rv = f(request, *args, **kwargs) File "/homes/omero-x/OMERO-CURRENT/lib/python/omeroweb/webgateway/views.py", line 1153, in imageData_json rv = imageMarshal(image, key) File "/homes/omero-x/OMERO-CURRENT/lib/python/omeroweb/webgateway/marshal.py", line 126, in imageMarshal width, height = image._re.getTileSize() File "/homes/omero-x/OMERO-CURRENT/lib/python/omero/gateway/__init__.py", line 3638, in __call__ return self.handle_exception(e, *args, **kwargs) File "/homes/omero-x/OMERO-CURRENT/lib/python/omeroweb/webclient/webclient_gateway.py", line 1980, in handle_exception e, *args, **kwargs) File "/homes/omero-x/OMERO-CURRENT/lib/python/omero/gateway/__init__.py", line 3635, in __call__ return self.f(*args, **kwargs) File "/homes/omero-x/OMERO-CURRENT/lib/python/omero_api_PyramidService_ice.py", line 162, in getTileSize return _M_omero.api.PyramidService._op_getTileSize.invoke(self, ((), _ctx)) InternalException: exception ::omero::InternalException { serverStackTrace = ome.conditions.InternalException: Wrapped Exception: (java.lang.IllegalStateException): MinimalTiffReader.getOptimalTileWidth: Current file should not be null; call setId(String) first at loci.formats.FormatTools.assertId(FormatTools.java:752) at loci.formats.in.MinimalTiffReader.getOptimalTileWidth(MinimalTiffReader.java:369) at loci.formats.in.MicromanagerReader.getOptimalTileWidth(MicromanagerReader.java:205) at loci.formats.ImageReader.getOptimalTileWidth(ImageReader.java:662) at loci.formats.ReaderWrapper.getOptimalTileWidth(ReaderWrapper.java:507) at loci.formats.ReaderWrapper.getOptimalTileWidth(ReaderWrapper.java:507) at loci.formats.ReaderWrapper.getOptimalTileWidth(ReaderWrapper.java:507) at ome.io.bioformats.BfPixelBuffer.getTileSize(BfPixelBuffer.java:543) at omeis.providers.re.Renderer.getTileSize(Renderer.java:981)
Change History (9)
comment:1 Changed 10 years ago by wmoore
comment:2 Changed 10 years ago by mlinkert
Usually this means that close() was prematurely called on the reader stack (via BfPixelBuffer? via the rendering engine?). If the import is successful and Insight can display the image, I'd guess that the file itself is not so much the problem as something in web either causing the pixel buffer to be closed, or preventing it from being reinitialized after close.
Is the stack trace coming from 5.0.8 or 5.1.0-m3/4?
comment:3 Changed 10 years ago by wmoore
I get the same error on 5.0.8 and develop.
It is reproducible with BlitzGateway? without calling renderingEngine.close() (see below).
I'll try without using BlitzGateway?....
>>> i = conn.getObject("Image", 7201) >>> i._prepareRenderingEngine() >>> i._re.getTileSize() WARNING:omero.gateway:InternalException on <class 'omero.gateway.OmeroGatewaySafeCallWrapper'> to <b7a10ce9-fb05-4cda-96fb-2eb3cc57e5f3omero.api.RenderingEngine> getTileSize((), {}) Traceback (most recent call last): File "/Users/wmoore/Desktop/OMERO/dist/lib/python/omero/gateway/__init__.py", line 4118, in __call__ return self.f(*args, **kwargs) File "/Users/wmoore/Desktop/OMERO/dist/lib/python/omero_api_PyramidService_ice.py", line 320, in getTileSize return _M_omero.api.PyramidService._op_getTileSize.invoke(self, ((), _ctx)) InternalException: exception ::omero::InternalException { serverStackTrace = ome.conditions.InternalException: Wrapped Exception: (java.lang.IllegalStateException): MinimalTiffReader.getOptimalTileWidth: Current file should not be null; call setId(String) first at loci.formats.FormatTools.assertId(FormatTools.java:903) at loci.formats.in.MinimalTiffReader.getOptimalTileWidth(MinimalTiffReader.java:384) at loci.formats.in.MicromanagerReader.getOptimalTileWidth(MicromanagerReader.java:215) at loci.formats.ImageReader.getOptimalTileWidth(ImageReader.java:729) at loci.formats.ReaderWrapper.getOptimalTileWidth(ReaderWrapper.java:574) at loci.formats.ReaderWrapper.getOptimalTileWidth(ReaderWrapper.java:574) at loci.formats.ReaderWrapper.getOptimalTileWidth(ReaderWrapper.java:574) at ome.io.bioformats.BfPixelBuffer.getTileSize(BfPixelBuffer.java:543) at omeis.providers.re.Renderer.getTileSize(Renderer.java:926) at ome.services.RenderingBean.getTileSize(RenderingBean.java:1425)
comment:4 Changed 10 years ago by wmoore
So, just using vanilla API calls I get the same with:
In [8]: re = client.sf.createRenderingEngine() In [9]: re.lookupPixels(6801) In [10]: re.lookupRenderingDef(6801) Out[10]: True In [11]: re.load() In [12]: re.getTileSize() --------------------------------------------------------------------------- InternalException Traceback (most recent call last) <ipython-input-12-60c3ffcabbda> in <module>() ----> 1 re.getTileSize() /Users/wmoore/Desktop/OMERO/dist/lib/python/omero_api_PyramidService_ice.pyc in getTileSize(self, _ctx) 318 the tile height.''' 319 def getTileSize(self, _ctx=None): --> 320 return _M_omero.api.PyramidService._op_getTileSize.invoke(self, ((), _ctx)) 321 322 '''Retrieves the tile size for the pixel store. InternalException: exception ::omero::InternalException { serverStackTrace = ome.conditions.InternalException: Wrapped Exception: (java.lang.IllegalStateException): MinimalTiffReader.getOptimalTileWidth: Current file should not be null; call setId(String) first at loci.formats.FormatTools.assertId(FormatTools.java:903) at loci.formats.in.MinimalTiffReader.getOptimalTileWidth(MinimalTiffReader.java:384) at loci.formats.in.MicromanagerReader.getOptimalTileWidth(MicromanagerReader.java:215) at loci.formats.ImageReader.getOptimalTileWidth(ImageReader.java:729) at loci.formats.ReaderWrapper.getOptimalTileWidth(ReaderWrapper.java:574) at loci.formats.ReaderWrapper.getOptimalTileWidth(ReaderWrapper.java:574) at loci.formats.ReaderWrapper.getOptimalTileWidth(ReaderWrapper.java:574) at ome.io.bioformats.BfPixelBuffer.getTileSize(BfPixelBuffer.java:543) at omeis.providers.re.Renderer.getTileSize(Renderer.java:926) at ome.services.RenderingBean.getTileSize(RenderingBean.java:1425)
comment:5 Changed 10 years ago by wmoore
I have proposed a workaround in web (see https://github.com/openmicroscopy/openmicroscopy/pull/3512) that allows this image to be viewed.
comment:6 Changed 10 years ago by mlinkert
OK, then the only way I can think of for that to happen is if an exception is thrown when the reader is initialized. Is there anything in the server logs to indicate either an exception in loci.formats.ReaderWrapper?.setId or a ResourceError? (with "FormatException?: ..." as the cause)? Is the file available anywhere?
comment:7 Changed 10 years ago by wmoore
I just uploaded the file to apache_repo/10526/
I don't see any server errors in the logs.
Blitz log for the last 2 calls above looks like this:
2015-02-24 09:49:00,875 INFO [ ome.services.util.ServiceHandler] (l.Server-3) Meth: interface omeis.providers.re.RenderingEngine.load 2015-02-24 09:49:00,875 INFO [ ome.services.util.ServiceHandler] (l.Server-3) Args: () 2015-02-24 09:49:00,875 INFO [ ome.services.util.ServiceHandler] (l.Server-3) Executor.doWork -- ome.services.RenderingBean.getAllEnumerations[] 2015-02-24 09:49:00,876 INFO [ ome.services.util.ServiceHandler] (l.Server-3) Args: [null, InternalSF@359548164] 2015-02-24 09:49:00,878 INFO [ ome.security.basic.EventHandler] (l.Server-3) Auth: user=3,group=5,event=null(User),sess=28de206a-c1d4-4a4d-86de-7c15bbab4590 2015-02-24 09:49:00,881 INFO [ org.perf4j.TimingLogger] (l.Server-3) start[1424771340876] time[5] tag[omero.call.success.ome.services.RenderingBean$7.doWork] 2015-02-24 09:49:00,881 INFO [ ome.services.util.ServiceHandler] (l.Server-3) Rslt: (ome.model.enums.Family:Id_1, ome.model.enums.Family:Id_2, ome.model.enums.Family:Id_3, ... 1 more) 2015-02-24 09:49:00,882 INFO [ ome.services.util.ServiceHandler] (l.Server-3) Executor.doWork -- ome.services.RenderingBean.getAllEnumerations[] 2015-02-24 09:49:00,882 INFO [ ome.services.util.ServiceHandler] (l.Server-3) Args: [null, InternalSF@359548164] 2015-02-24 09:49:00,923 INFO [ ome.security.basic.EventHandler] (l.Server-3) Auth: user=3,group=5,event=null(User),sess=28de206a-c1d4-4a4d-86de-7c15bbab4590 2015-02-24 09:49:00,925 INFO [ org.perf4j.TimingLogger] (l.Server-3) start[1424771340882] time[43] tag[omero.call.success.ome.services.RenderingBean$7.doWork] 2015-02-24 09:49:00,925 INFO [ ome.services.util.ServiceHandler] (l.Server-3) Rslt: (ome.model.enums.RenderingModel:Id_1, ome.model.enums.RenderingModel:Id_2) 2015-02-24 09:49:00,925 INFO [ ome.services.util.ServiceHandler] (l.Server-3) Executor.doWork -- ome.services.RenderingBean.getPixelBuffer[] 2015-02-24 09:49:00,926 INFO [ ome.services.util.ServiceHandler] (l.Server-3) Args: [null, InternalSF@359548164] 2015-02-24 09:49:01,209 INFO [ ome.security.basic.EventHandler] (l.Server-3) Auth: user=3,group=5,event=396096(User),sess=28de206a-c1d4-4a4d-86de-7c15bbab4590 2015-02-24 09:49:01,215 INFO [ ome.io.nio.FilePathResolver] (l.Server-3) Metadata only file, resulting path: /OMERO/ManagedRepository/will_3/2015-02/20/10-54-21.831/Acqusition.xml 2015-02-24 09:49:01,378 DEBUG [ loci.formats.Memoizer] (l.Server-3) loaded memo file: /OMERO/BioFormatsCache/OMERO/ManagedRepository/will_3/2015-02/20/10-54-21.831/.Acqusition.xml.bfmemo (240708 bytes) 2015-02-24 09:49:01,378 DEBUG [ loci.formats.Memoizer] (l.Server-3) start[1424771341242] time[136] tag[loci.formats.Memoizer.loadMemo] 2015-02-24 09:49:01,379 DEBUG [ loci.formats.Memoizer] (l.Server-3) start[1424771341242] time[136] tag[loci.formats.Memoizer.setId] 2015-02-24 09:49:01,379 INFO [ ome.io.nio.PixelsService] (l.Server-3) Creating BfPixelBuffer: /OMERO/ManagedRepository/will_3/2015-02/20/10-54-21.831/Acqusition.xml Series: 0 2015-02-24 09:49:01,479 INFO [ org.perf4j.TimingLogger] (l.Server-3) start[1424771340926] time[553] tag[omero.call.success.ome.services.RenderingBean$12.doWork] 2015-02-24 09:49:01,479 INFO [ ome.services.util.ServiceHandler] (l.Server-3) Rslt: ome.io.bioformats.BfPixelBuffer@229ce379 2015-02-24 09:49:01,483 INFO [ omeis.providers.re.Renderer] (l.Server-3) Enabling alphaless rendering. 2015-02-24 09:49:01,483 INFO [ omeis.providers.re.Renderer] (l.Server-3) Enabling primary color rendering. 2015-02-24 09:49:01,483 INFO [ org.perf4j.TimingLogger] (l.Server-3) start[1424771340875] time[608] tag[omero.call.success.ome.services.RenderingBean.load] 2015-02-24 09:49:01,484 INFO [ ome.services.util.ServiceHandler] (l.Server-3) Rslt: null 2015-02-24 09:49:20,173 INFO [ ome.services.util.ServiceHandler] (l.Server-1) Meth: interface omeis.providers.re.RenderingEngine.getTileSize 2015-02-24 09:49:20,173 INFO [ ome.services.util.ServiceHandler] (l.Server-1) Args: () 2015-02-24 09:49:20,174 INFO [ org.perf4j.TimingLogger] (l.Server-1) start[1424771360173] time[0] tag[omero.call.exception] 2015-02-24 09:49:20,175 WARN [ ome.services.util.ServiceHandler] (l.Server-1) Unknown exception thrown. java.lang.IllegalStateException: MinimalTiffReader.getOptimalTileWidth: Current file should not be null; call setId(String) first at loci.formats.FormatTools.assertId(FormatTools.java:903) ~[formats-api.jar:na] at loci.formats.in.MinimalTiffReader.getOptimalTileWidth(MinimalTiffReader.java:384) ~[formats-bsd.jar:na] at loci.formats.in.MicromanagerReader.getOptimalTileWidth(MicromanagerReader.java:215) ~[formats-bsd.jar:na] at loci.formats.ImageReader.getOptimalTileWidth(ImageReader.java:729) ~[formats-api.jar:na]
comment:8 Changed 10 years ago by mlinkert
- Resolution set to fixed
- Status changed from new to closed
Thanks - I can reproduce the problem now with the blitz gateway commands above. PR opened in Bio-Formats, which should resolve the problem without needing any changes in web: https://github.com/openmicroscopy/bioformats/pull/1623
comment:9 Changed 10 years ago by Melissa Linkert <melissa@…>
- Remaining Time set to 0
(In [5e09fddca83f1cb5479dab75f7cfa8683d05ba36/bioformats.git] on branch develop) Micromanager: fix helper reader usage when working with a memo file
This prevents an exception when initializing the helper reader, particularly during
calls to getOptimalTile* immediately after setId with a memo file.
Fixes #12750.
Update: since this image does open in Insight, there is likely also a workaround in web that would allow web to open it too, so I'll have a look at that.
I've asked if it's OK to upload a sample file.