Plugg in scan locks up

I tried scanning for plugins under safe mode and midi guitar freezes up

Hello, welcome here!
Having experienced it myself, some plugins cause problems in MG2.
When scanning, try to see which plugin seems to freeze MG2, then use “scan one file” to verify if it still freeze. Move the plugin to another location and restart “scan safe”, and so on.