Updating PluginMenu.Icon to a texture with rbxassetid:// causes Roblox Studio to freeze

Whenever the Icon property for a PluginMenu is updated to any texture that doesn’t come with Roblox Studio, it will cause Roblox Studio to freeze for a tiny bit. The more PluginMenus that need to have their Icon updated, the longer the freeze becomes. This is very problematic when there is a PluginMenu that contains multiples menus that need their Icon to change based on context right before the PluginMenu is shown with ShowAsync.

Reproduction File: FreezeStudioWithIconRepro.rbxl (42.6 KB)

  1. Download and open the reproduction file in Roblox Studio
  2. Copy the code from the script called ReproductionPlugin in Workspace
  3. Paste the copied code into the command bar and press enter
  4. Select the newly created plugin called FreezeStudioWithIconRepro in Workspace
  5. Set the ShowPluginMenu attribute on the plugin to true and observe that nothing out of the ordinary happens
  6. Close the PluginMenu by clicking somewhere else in studio
  7. Set the ShowPluginMenu attribute on the plugin to true again and observe how studio freezes for a long time

The first time you show the PluginMenu, it’ll set the Icon property of the PluginMenus to a random texture that comes with Roblox Studio (rbxasset://). With that first click, even though there’s multiple different textures being used, there’s no problem. However, the problem lies with the second click. That second click sets the Icon property of the PluginMenus to one texture that does not come with Roblox Studio (rbxassetid://). Even though it’s just one texture, Roblox Studio will freeze for a long time.

Yes, in most circumstance you will not have a whopping 60 PluginMenus that need to update their icon. However, this freezing behavior causes my plugin to have bad UX because the PluginMenu cannot be immediately shown because Roblox Studio freezes. I need to change the icon for multiple PluginMenus because I have an icon for when an action is enabled and one for when an action is disabled.

Expected behavior

I expect Roblox Studio to not freeze when changing the Icon property of a PluginMenu.

6 Likes

Had this exact issue in my plugin as well. I knew the icons were causing it, but I couldnt really make a repro, because I wasnt aware that studio textures dont cause it to freeze.

My plugin creates plugin actions every time a plugin menu is opened, so studio freezes for like 3 seconds literally every time you try to use the plugin. Its extremely annoying

Thanks for the report! Just to confirm, we have a ticket for this in our internal database