RobotStudio event

Exception: A connection with systemId {...} has already been added.

DenisFR
DenisFR ✭✭✭
edited October 2020 in Developer Tools
Hello,

Using my SmartComponent RsDrawGraphics, I cannot connect to controller after it is loaded. (Real or Virtual)
With RS 2019 it's worked well, but with RS 2020.1.2 I can't without message.
With RS 2020.2 this message appears:
RobotStudio .NET exception: A connection with systemId {204105E0-E849-48AD-BFB9-7A2274807590} has already been added.
============================================
Base exception: InvalidOperationException
A connection with systemId {204105E0-E849-48AD-BFB9-7A2274807590} has already been added.
   at RobotStudio.Services.RobApi.RobHostServices.AddSharedConnection(RobControllerConnection conn)
   at RobotStudio.Services.RobApi.RobApi1.RobControllerConnectionRobApi1.<ConnectRobApi1>d__95.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at RobotStudio.Services.RobApi.RobControllerConnection.<Connect>d__117.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at ABB.Robotics.RobotStudio.Controllers.ControllerManager.<AddController>d__43.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at ABB.Robotics.RobotStudio.Controllers.ControllerManager.<AddController>d__43.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at RobotStudio.UI.Controller.Commands.ConnectController.<TryConnect>d__2.MoveNext()


The connection to controller in RsDrawGraphics occurs here.

In my dev machine, I have an older RS version due to new license system, so I can't debug it.

Can someone tell me what I've done wrong?

PS: If I connect the real robot then load station, all works well.