Confusion in OMERO image repo when you switch gels
Application gets confused and crashes with "qimageview got invalid QImage" if the following is done:
- wipe cache
- connect to OMERO via slow link
- open one gel
- before images get loaded, open another gel
- go back to the first gel
- observe the crash
If tracebacks are enabled, following is printed:
2022-07-21 09:16:19,892 [DEBUG] omero.gateway: omero.sysbio
2022-07-21 09:16:19,892 [DEBUG] omero.gateway: 4064
2022-07-21 09:16:19,892 [DEBUG] omero.gateway: []
2022-07-21 09:16:19,897 [DEBUG] omero.gateway: Connect attempt, sUuid=None, group=None, self.sUuid=None
2022-07-21 09:16:19,897 [DEBUG] omero.gateway: Creating Session...
2022-07-21 09:16:21,757 [DEBUG] omero.gateway: ## Creating proxies
2022-07-21 09:16:21,813 [DEBUG] omero.gateway.utils: Setting 'omero.client.uuid' to '9e029993-7625-4e87-a119-4dbdf0764a1a'
2022-07-21 09:16:21,814 [DEBUG] omero.gateway.utils: Setting 'omero.session.uuid' to 'da096743-83b3-4a56-8fd2-099a9ffe3c51'
2022-07-21 09:16:21,814 [DEBUG] omero.gateway.utils: Key 'omero.group' not found in <ServiceOptsDict: {'omero.client.uuid': '9e029993-7625-4e87-a119-4dbdf0764a1a', 'omero.session.uuid': 'da096743-83b3-4a56-8fd2-099a9ffe3c51'}>
2022-07-21 09:16:21,814 [DEBUG] omero.gateway.utils: Key 'omero.user' not found in <ServiceOptsDict: {'omero.client.uuid': '9e029993-7625-4e87-a119-4dbdf0764a1a', 'omero.session.uuid': 'da096743-83b3-4a56-8fd2-099a9ffe3c51'}>
2022-07-21 09:16:21,815 [DEBUG] omero.gateway: Session created
2022-07-21 09:16:21,815 [DEBUG] omero.gateway: ## Reusing proxies
2022-07-21 09:16:21,815 [INFO] omero.gateway: created connection (uuid=da096743-83b3-4a56-8fd2-099a9ffe3c51)
2022-07-21 09:16:21,815 [DEBUG] omero.gateway: .. connected!
2022-07-21 09:16:21,817 [INFO] omero.util.Resources: Starting
2022-07-21 09:16:21,817 [INFO] omero.util.Resources: Starting
2022-07-21 09:16:29,910 [DEBUG] iocbio.gel.application.thread.thread_pool: Starting job FetchImageFromOmero[31/3916]
TIFFFetchDirectory: foo: Can not read TIFF directory count.
TIFFReadDirectory: Failed to read directory at offset 12582920.
Traceback (most recent call last):
File "/home/markov/code/gel/iocbio/gel/gui/widgets/tables/gel_images_table.py", line 141, in on_select_gel
image.image = self.image_repository.get(image)
File "/home/markov/code/gel/iocbio/gel/repository/image_repository.py", line 74, in get
image = self._fetch(gel_image, image)
File "/home/markov/code/gel/iocbio/gel/repository/image_repository.py", line 108, in _fetch
image = self._attach_raw(image)
File "/home/markov/code/gel/iocbio/gel/repository/image_repository.py", line 179, in _attach_raw
image.original = self.get_original_data(image.file)
File "/home/markov/code/gel/iocbio/gel/repository/image_repository.py", line 36, in get_original_data
raw = raw_view(raw).copy()
File "/home/markov/code/gel/.venv/lib/python3.10/site-packages/qimage2ndarray/__init__.py", line 85, in raw_view
return _qimage_or_filename_view(qimage)
File "/home/markov/code/gel/.venv/lib/python3.10/site-packages/qimage2ndarray/__init__.py", line 72, in _qimage_or_filename_view
return _qimageview(qimage)
File "/home/markov/code/gel/.venv/lib/python3.10/site-packages/qimage2ndarray/qimageview_python.py", line 132, in qimageview
raise ValueError("qimageview got invalid QImage")
ValueError: qimageview got invalid QImage
2022-07-21 09:16:53,970 [INFO] omero.util.Resources: Halted
2022-07-21 09:16:53,970 [INFO] omero.util.Resources: Halted
2022-07-21 09:16:54,055 [INFO] omero.gateway: closed connection (uuid=da096743-83b3-4a56-8fd2-099a9ffe3c51)