Forum Migration Notice
Update (2026-01-21): The user forums are now in read-only mode pending the data migration.
Update (2026-01-12): The user forums will be put into read-only mode on the 21st of January, 00:00 CET, to prepare for the data migration.
We're transitioning to a more modern community platform by beginning of next year. Learn about the upcoming changes and what to expect.
Update (2026-01-12): The user forums will be put into read-only mode on the 21st of January, 00:00 CET, to prepare for the data migration.
We're transitioning to a more modern community platform by beginning of next year. Learn about the upcoming changes and what to expect.
RS SDK - Memory Leakage via CommandBarPopup
Shaun
✭
Hi there,
I just thought I'd pass on an observation that I've made about a possible memory leakage associated with a CommandBarButtonGroup event handler.
I have found that after synchronising a group of paths to the VC using...
result = task.SyncPathProcedure(path.ModuleName + "/" + path.Name, SyncDirection.ToController, messages);
... I then find that the memory usage for RobotStudio.exe started running away, increasing until it tops out at over 2GB.
After trying to locate the cause of this leak, I eventually tracked it down to the DisplayCommandGroupEventHandlers that I am using for showing a dynamically updated CommandBarButtonGroup underneath a series of CommandBarPopup menus. In the DisplayCommandGroupEventHandler, if I call...
e.AddItem(string caption, object tag, Image image, bool isChecked, bool isEnabled);
...to update the items that should appear in the button group, then this memory leakage problem occurs, although only after using the SyncPathProcedure() call. As far as I can tell there is no link between the parameters I am passing to e.AddItem() and the synchronisation procedure.
To solve this leakage problem, I have had to set the CommandBarPopup "Enabled" state to...
popup.Enabled = CommandBarPopupEnableMode.Enabled;
... which only updates the state of the popup when the button is pressed, rather than the default enabled state of "CommandBarPopupEnableMode.Dynamic", which appears to update the CommandBarButtonGroup whenever it can. However, it's interesting that this memory leakage only appears to happen after I synchronise paths, so if someone could explain why this is the case I would be very interested.
0
Categories
- All Categories
- 5.7K RobotStudio
- 402 UpFeed
- 21 Tutorials
- 16 RobotApps
- 307 PowerPacs
- 407 RobotStudio S4
- 1.8K Developer Tools
- 251 ScreenMaker
- 2.9K Robot Controller
- 368 IRC5
- 92 OmniCore
- 8 RCS (Realistic Controller Simulation)
- 859 RAPID Programming
- 43 AppStudio
- 4 RobotStudio AR Viewer
- 19 Wizard Easy Programming
- 111 Collaborative Robots
- 5 Job listings