SWC-Advanced-Microscopy / BakingTray

Serial-section automated anatomy extension for ScanImage
https://bakingtray.mouse.vision/
GNU Lesser General Public License v3.0
10 stars 5 forks source link

Preview scan randomly does not start. Seems related to ROI drawing #448

Open raacampbell opened 1 year ago

raacampbell commented 1 year ago

Not easy to reproduce. Use can take a preview. Draw a box. Stop preview. Etc. Then suddenly a preview will fail to start. The image remains white and the CLI complains of a missing object. It seems that ctrl-c will bring it back. There seems to be a uiwait hanging on in the background.

But with Peter he opened the acquisition view for the first time. Drew box. Hit preview. White screen and no preview...

raacampbell commented 1 year ago

Happened again today. On pressing ctrl-c we get these red errors at the CLI:

Operation terminated by user during uiwait (line 81)

In BakingTray.gui.acquisition_view/areaSelector (line 43)
    uiwait;

In BakingTray.gui.acquisition_view/buildFigure>@(varargin)obj.areaSelector(varargin{:}) (line 232)
        'Callback', @obj.areaSelector);

Error using scanimage.mroi.RoiDisplay/resetview (line 447)
Interrupt while evaluating DestroyedObject Callback.

BT.takeRapidPreview failed with error message:
Operation terminated by user
Invalid or deleted object.

Error in BakingTray.gui.acquisition_view/startPreviewScan (line 50)
        obj.updatePreviewEveryNTiles = origupdatePreviewEveryNTiles;

Error in BakingTray.gui.acquisition_view/buildFigure>@(varargin)obj.startPreviewScan(varargin{:}) (line 182)
        'Callback', @obj.startPreviewScan);

Error while evaluating DestroyedObject Callback.

>> 
>> 
>> 
Operation terminated by user during mltimerpackage (line 27)

In timercb (line 16)
    obj = mltimerpackage('GetList');

Operation terminated by user during serial/fgets (line 58)

In maitai/sendAndReceiveSerial (line 431)
            reply=fgets(obj.hC);

In maitai/isShutterOpen (line 222)
            [success,reply]=obj.sendAndReceiveSerial('SHUTTER?');

In maitai/isControllerConnected (line 107)
                [~,success] = obj.isShutterOpen;

In BakingTray.gui.laser_view/updateCurrentWavelength (line 285)
            if ~obj.model.laser.isControllerConnected

In BakingTray.gui.laser_view/regularGUIupdater (line 408)
                obj.updateCurrentWavelength

In BakingTray.gui.laser_view>@(~,~)obj.regularGUIupdater (line 82)
            obj.laserViewUpdateTimer.TimerFcn = @(~,~) obj.regularGUIupdater;

In timer/timercb (line 34)
            feval(val{1}, obj, eventStruct, val{2:end});

In timercb (line 24)
    timercb(obj(idxIntoTimerObject), varargin{2:end});