Studio Closes When Reloading Local Plugins

Since yesterday’s update, when I right click a plugin inside of PluginDebugService and select “Save and Reload” or any option that reloads local plugins, Studio fully closes without any crash logs or warnings.

It seems to happen only when a plugin is unloaded(?). If using the save options, it will successfully save the plugin before crashing, however.

This happens every time. I have tried resetting Studio settings to defaults and it hasn’t made a difference.

I do not have any beta features enabled and I’m using a Surface Pro 9 (fully up-to-date).

Edit: This seems to be related to DockWidgetPluginGuis. Adding the following cleanup to my plugin stops Studio from crashing when I reload plugins that manually cleanup their widgets:

plugin.Unloading:Connect(function()
	widget:Destroy()
end)

Edit 2: No longer the case.

2 Likes

This also happens if you go into play/run mode then click stop.

Thanks for the report! We’ve rolled back the change, so if you restart Studio you shouldn’t run into this anymore.

3 Likes

I can now reload the plugin without it closing studio but when the DockWidgetPluginGui has been set to Enabled at least once, studio closes upon saving and reloading the same plugin.

Studio Version: 0.665.0.6650685 (64bit)

Here’s the code snippet I used to replicate the issue.

local widgetInfo = DockWidgetPluginGuiInfo.new(Enum.InitialDockState.Float, false, true, 300, 500)
local dragSourceWidget = plugin:CreateDockWidgetPluginGui("PluginTest", widgetInfo)
dragSourceWidget.Title = "Pluing test"

local toolbar = plugin:CreateToolbar("Pluing test")
local button = toolbar:CreateButton("Button", "Open", "rbxasset://textures/ui/GuiImagePlaceholder.png")

button.Click:Connect(function()
	dragSourceWidget.Enabled = not dragSourceWidget.Enabled
end)
1 Like

I can confirm this is still not fixed. In fact, reloading a plugin that manually cleans up its widgets on plugin unload now also crashes studio. I’m running Studio version 0.665.0.6650685 on Windows 11 (Surface 9 Pro).

There is nothing abnormal in the log files (no crash reports or errors), and this only occurs with plugins that have not cleaned up their DockWidgetPluginGuis before the plugin unloads. If you create a DockWidgetPluginGui and destroy it before the plugin unloads, the issue does not occur.

Edit: Seems to occur more often when I’m working on battery vs. charger plugged in.

2 Likes

Still happen with Save to plugin file
Version: 0.665.0.6650685 (64bit)

This should now be fixed for real!

There were 2 factors causing this crash: we found the other one and reverted it today. Sorry!

3 Likes