MATLAB: Do I receive a warning when calling the CLOSEPREVIEW function from the Image Acquisition Toolbox 1.8 (R14SP2)

cameraImage Acquisition Toolboxpreviewrecursionwindowwinvideo

I have written a graphical user interface (GUI) using GUIDE that uses the Image Acquisition Toolbox's preview window. In the CloseRequestFcn of my GUI, I call the CLOSEPREVIEW function to close the open preview window. This call generates the following warning:
Warning: A callback recursively calls CLOSE. Use DELETE to prevent this message.
> In close>request_close at 139
In close at 118
In imaqdevice.closepreview at 46
In repro>figure1_CloseRequestFcn at 110
In gui_mainfcn at 75
In repro at 42
In close>request_close at 147
In close at 118
In repro>pushbutton2_Callback at 98
In gui_mainfcn at 75
In repro at 42

Best Answer

This bug has been fixed in Release 2006a (R2006a). For previous product releases, read below for any possible workarounds:
There is a bug in the Image Acquisition Toolbox 1.8 (R14SP2) in the way that the CLOSEPREVIEW function behaves when called in the CloseRequestFcn of a GUI created with GUIDE.
To work around this issue, avoid calling CLOSEPREVIEW from a GUI's CloseRequestFcn.