Found out it seems to be my MAME PC. I tried my files on a laptop with mgalaxy and it works, so I have no idea why this is. So I am manually transferring each section of my games to a thumb drive and editing them on a laptop and then transferring them back to the PC. It's a hassle, but at least I can now edit the files without crashing mgalaxy.