Wrapper being used has been invalidated error

I’m using Kuka.Sim 4.3.2 build 299.

Recently after a Windows 11 update I seem to be having issues with Kuka sim. It gives the error “Wrapper being used has been invalidated” in the output window. The error stops the robot. The run pointer seems to get stick on PTP, LIN, and IF statements. It’s also semi random, where sometimes it will go past where it went before.

when i navigate to C:\Users\User\AppData\Local\KUKA\KUKA.Sim 4.3\Logs the log-file-VisualComponents.Engine shoes this:

2024-05-15 14:37:19,220 ERROR - Error running interpreter ‘Robot’.
System.AggregateException: One or more errors occurred. —> VisualComponents.Create3D.InvalidWrapperException: Wrapper being used has been invalidated.
at KukaRoboter.KrlInterpreter.KrlInterpreter.Process(Action1 action, CancellationToken cancellationToken) at KukaRoboter.KrlInterpreter.KrlInterpreter.ProcessUntilEnd(CancellationToken cancellationToken, Func2 stopCondition)
at KukaRoboter.KrlInterpreter.KrlInterpreter.<>c__DisplayClass87_0.b__0()
at System.Threading.Tasks.Task.Execute()
— End of inner exception stack trace —
—> (Inner Exception #0) VisualComponents.Create3D.InvalidWrapperException: Wrapper being used has been invalidated.
at KukaRoboter.KrlInterpreter.KrlInterpreter.Process(Action1 action, CancellationToken cancellationToken) at KukaRoboter.KrlInterpreter.KrlInterpreter.ProcessUntilEnd(CancellationToken cancellationToken, Func2 stopCondition)
at KukaRoboter.KrlInterpreter.KrlInterpreter.<>c__DisplayClass87_0.b__0()
at System.Threading.Tasks.Task.Execute()<—

Has anyone delt with this before?

Hey, Looks like a RCS Problem.
Have you tried uninstalling KUKA.Sim and re-installing it again?
BTW: Officially KUKA.Sim is only supported for Win10

Thanks for the response.

I have tried re-installing it, sadly this did not work.

What I’ve recently noticed is that it seems to be very specific to tool drop off and mounting program call i made. When I start the robot with no tool on it, I don’t get those errors. It’s weird that it stops on movement and IF statements though. Probably a coincidence / red herring.

I talked to Kuka and they suggested to not use the TCP when using the end effector wizard. This does not fix the problem however.

It is honestly baffling to me. I had a program working the previous week that would cycle through tool pick ups and drop offs. This week it does not work at all.

My guess is that there is a race condition in KUKA’s code with garbage collection or something like that. Some .NET update may have just exposed it.

For those reading in the future, the way I got around this error was refactoring my sim so that my robots started with no tools attached.

If I start the sim with nothing on the robot mount frame, start it, and the code picks the tool up… works fine.

2 Likes