mantidproject / mantidimaging

Graphical toolkit for neutron imaging.
https://mantidproject.github.io/mantidimaging
GNU General Public License v3.0
13 stars 6 forks source link

LiveViewer: Closing The Window Can Cause an Uncaught Exception #2201

Open JackEAllen opened 6 months ago

JackEAllen commented 6 months ago

Summary

"closing the current window produces the error below"

Steps To Reproduce

I have not managed to replicate this yet.

Expected Behaviour

Current Behaviour

Mantid Imaging may produce an uncaught exception inconsistently when closing.

Context

Bug reported by IMAT during collection of large dataset

Failure Logs

Screenshot(s)

image

MikeSullivan7 commented 6 months ago

I cannot seem to reproduce the error using the same Windows build when closing the Live Viewer window. However, when copying images into the target Live Viewer path, I get this:

2024-05-10 12:18:31,266 [mantidimaging.gui.windows.live_viewer.presenter:L93] ERROR: PermissionError reading image: C:\Users\ddb29996\Documents\MantidImaging Data\live-viewer-tests\iulg\IMAT_Flower_Tomo_000000.tif: [Errno 13] Permission denied: 'C:\\Users\\ddb29996\\Documents\\MantidImaging Data\\live-viewer-tests\\iulg\\IMAT_Flower_Tomo_000000.tif'
2024-05-10 12:18:40,685 [mantidimaging.gui.windows.live_viewer.presenter:L93] ERROR: PermissionError reading image: C:\Users\ddb29996\Documents\MantidImaging Data\live-viewer-tests\iulg\IMAT_Flower_Tomo_000001.tif: [Errno 13] Permission denied: 'C:\\Users\\ddb29996\\Documents\\MantidImaging Data\\live-viewer-tests\\iulg\\IMAT_Flower_Tomo_000001.tif'
2024-05-10 12:18:51,841 [mantidimaging.gui.windows.live_viewer.presenter:L93] ERROR: PermissionError reading image: C:\Users\ddb29996\Documents\MantidImaging Data\live-viewer-tests\iulg\IMAT_Flower_Tomo_000009.tif: [Errno 13] Permission denied: 'C:\\Users\\ddb29996\\Documents\\MantidImaging Data\\live-viewer-tests\\iulg\\IMAT_Flower_Tomo_000009.tif'
2024-05-10 12:18:51,865 [mantidimaging.gui.windows.live_viewer.presenter:L93] ERROR: PermissionError reading image: C:\Users\ddb29996\Documents\MantidImaging Data\live-viewer-tests\iulg\IMAT_Flower_Tomo_000005.tif: [Errno 13] Permission denied: 'C:\\Users\\ddb29996\\Documents\\MantidImaging Data\\live-viewer-tests\\iulg\\IMAT_Flower_Tomo_000005.tif'
2024-05-10 12:19:16,337 [mantidimaging.gui.windows.live_viewer.presenter:L93] ERROR: PermissionError reading image: C:\Users\ddb29996\Documents\MantidImaging Data\live-viewer-tests\iulg\IMAT_Flower_Tomo_000010.tif: [Errno 13] Permission denied: 'C:\\Users\\ddb29996\\Documents\\MantidImaging Data\\live-viewer-tests\\iulg\\IMAT_Flower_Tomo_000010.tif'

But the Live Viewer still loads up with images as normal with no error popups

samtygier-stfc commented 6 months ago

Some read errors are expected because we get a directoryChanged when writing a new file starts instead of when it finishes. So the first time we read it it might not be ready. We use the recent_file_watcher to keep watching the most recent file, so that we can try reading it again as it gets written to.

samtygier-stfc commented 4 months ago

We have note managed to reproduce this