On Workspace Switcher removal, panel crashes with the following message: libxfce4panel:ERROR:xfce-panel-plugin.c:919:xfce_panel_plugin_finalize: assertion failed: (plugin->priv->menu_items == ((void *)0)) [1] 13393 abort (core dumped) xfce4-panel Whisker Menu and Weather also output this same error message, but the panel doesn't crash.
All of those aforementioned plugins add a custom menu item to their right-click/context menu via xfce_panel_plugin_menu_insert_item. https://git.xfce.org/xfce/xfce4-panel/tree/libxfce4panel/xfce-panel-plugin.c#n2190 There seems to be some problem with the order of destroying the menuitem and the menu.
Also, my guess is that whisker and weather being external plugins just crash and get restarted (or you get the option to restart them) whereas the internal pager/workspaces plugin takes the panel down along with it.
Created attachment 7755 Try to fix removing plugins I attached a patch that hopefully fixes the crash. Not at all sure though why this behavior seems to have changed between Gtk+2 and 3.
*** Bug 14418 has been marked as a duplicate of this bug. ***
Works well for me, no more crashes and no more error messages. Thanks!
Simon Steinbeiss referenced this bugreport in commit d614f388b0202ae55377b1058d90381b226f4deb panel-plugin: Try to fix crashes when removing plugins (Bug #14144) https://git.xfce.org/xfce/xfce4-panel/commit?id=d614f388b0202ae55377b1058d90381b226f4deb