An exception escaping a Qt slot terminates the viewer. At the beamline it died with
"Input parameter invalid (Image out of bounds)": the grid-scan map in the dataset-info
panel asked GridScanSettings for the cell of an image outside the grid. Image and dataset
can disagree - live, the broker's image and dataset are fetched apart and can belong to
different collections, and the worker re-emits its current image against a newer dataset.
The map now marks no cell for such an image.
Opening a file with an image number it does not have (a D-Bus caller keeping its
position from the previous dataset) showed no image and kept the previous file's image,
which was then re-emitted against the new dataset. The file now opens at image 0 and the
previous image is dropped.
The rest of the viewer was audited for the same failure and guarded:
- worker slots that were not covered: dataset update, azimuthal/Bragg settings, analysis
(Analyze, re-analysis toggle, spot-finding settings), beam-centre fit (incl. the setters
rejecting a diverged fit), user mask update/save/upload, ROI definition, run removal;
azimuthal settings with more bins than the mapping supports are refused up front, so they
cannot be kept and fail every later file open;
- settings dock: azimuthal Q range, Bragg radii and experiment fields are built on a copy
and an invalid combination keeps the previous settings; R1 and cell-angle field ranges
now match the setters;
- azimuthal-image double-click on a bin with no pixel, azimuthal ROI handle dragged onto
the beam centre (infinite d), ROI editor given inf/nan, non-numeric
JUNGFRAUJOCH_HTTP_PORT.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>