What means "MATLAB connector is not running"?

27 次查看(过去 30 天)
I have a GUI app that runs fine under MATLAB, however when compiled as standalone with MCC, I get a strange warning message
"warning: MATLAB connector is not running." when doing zooming my graphics.
There are very little info I can find on this warning. Can anyone help to point me to the possible cause.
Here is a screen shot of the command window:

采纳的回答

Yukta Maurya
Yukta Maurya 2022-5-24
  3 个评论
Yukta Maurya
Yukta Maurya 2022-5-24
Title
Why do I receive the warning "Warning: MATLAB Connector is not running" for my standalone application in MATLAB R2021a?
Question
For a custom application, the following warning messages appear in the command window, both within MATLAB environment as well as in the compiled application using MATLAB Compiler,
> In message.publish
In matlab.graphics.internal/FigureToolstripManager/updateActions (line 23)
In matlab.uitools.internal.FigureToolManager>locUpdateUndoUI (line 78)
In matlab.uitools.internal.FigureToolManager>locCommandStackChanged (line 58)
In matlab.uitools.internal.FigureToolManager>@(o,~)locCommandStackChanged(o,hThis) (line 45)
In matlab.uitools.internal.uiundo/CommandManager/add
In uiundo (line 26)
In zoom>localCreate2DUndo (line 1823)
In zoom>localZoomFactor2D (line 988)
In zoom>localApplyZoomFactor (line 853)
In zoom>localButtonWheelFcn (line 895)
In zoom>@(obj,evd)localButtonWheelFcn(obj,evd,hMode) (line 552)
In uiwait (line 81)
In Bueno (line 50)
Warning: MATLAB Connector is not running.
Why do I receive the warning "Warning: MATLAB Connector is not running" for my standalone application in MATLAB R2021a?
Answer
The issue was not reproducible in our side. However, adding the following line of code,
connector.ensureServiceOn;
before the call to function 'uiwait' the warning disappeared for the customer.
Bruno Luong
Bruno Luong 2022-5-24
In my case it is not clear if there is an uiwait.
However it happens that I define my own ActionPostCallback of zoom and pan objects
zoomh = zoom(figh);
panh = pan(figh);
pan(figh,'off');
set(zoomh, 'ActionPostCallback', @CurvePreview_ZoomPostCallBack);
set(panh, 'ActionPostCallback', @CurvePreview_ZoomPostCallBack);
I figure out to turn off the warning by
warning('off','MATLAB:connector:connector:ConnectorNotRunning');
I'll try to replace it with
connector.ensureServiceOn;
to see how it goes

请先登录,再进行评论。

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 MATLAB Compiler 的更多信息

产品


版本

R2021b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by