Bad memory management on enhanced plugin loader

Recently, crashes in Roblox Studio have become a lot more frequent. There have been reports about crashes surrounding playtesting, loading places, summoning tooltips, plugin UIs rendering over other plugins when switching them in the dock tabs, etc. There have also been reports of low FPS issues in the studio, using Vulkan, Direct3D11, or other rendering modes. Most of them still hasn’t been fixed yet to this day, and today it has gotten worse, I think.

The events leading before the crash might be unrelated, but they all suspiciously involve plugins loading. When opening a place, you also load plugins (studio tools, toolbox, explorer, etc.). When starting/stopping playtest, you reload those plugins. When the tooltip appears, it’s a plugin. When constantly starting and stopping playtest, the FPS gets worse, and plugins conveniently reloads with every playtest too. When switching to a different plugin tab on the dock, you also load and unload a plugin.

When loading plugins, it well, loads plugins. However, something weird happens when unloading them. The unloaded plugins are still somewhat in the memory. These problems are not very visible in Direct3D11, but is VERY obvious in Vulkan, more visible in the Next Gen Studio Preview. You can see plugins overwriting other plugins’ UIs on the dock, some “unloaded” plugin’s buttons overlaying other plugins, etc. I think that’s how it managed to slip through some checks. This has been occurring sometime after the beta option of the Next Gen Studio Preview being available.

Here’s the tooltip plugin rendering over another plugin’s UI:

Looking at crash dumps, most of the recent crashes have the error code 0xc0000005, which means that “The thread tried to read from or write to a virtual address for which it does not have the appropriate access.”, and that conveniently relates to memory management, for which the plugin loader has to do when loading and unloading plugins.

This is just a theory though, it can be wrong. I’m just trying to be able to develop my doohickeys and thingamabobs in the studio without these problems.

In case you need it, here’s what I’ve tried to do to try to fix it before theorizing what was actually happening:

  1. Do a fresh reinstall of Roblox Studio
  2. Updating graphics driver
  3. Disabling beta features

Here’s my system information:
OS: Microsoft Windows 11 Home Single Language
Processor: 13th Gen Intel(R) Core™ i7-13650HX, 2600 Mhz, 14 Core(s), 20 Logical Processor(s)
GPU0: Intel UHD Graphics
GPU1: NVIDIA GeForce RTX 4050 Laptop GPU
Memory: 16 GB LPDDR5

Expected behavior

I expect that the plugin loader to have better memory management and these problems to eventually disappear.

A private message is associated with this bug report