Fixing corrupted glyphs files

Even though it doesn’t happen that often, sometimes glyphs files end up not being able to be opened in Glyphs. The alert of being able to fix it in a text file is a good one, but I’m not really sure where the problems are.

Where are the critical points of the code where the program crashes, how can we fix it ourselves whenever it comes up?

Thanks!

This would be a bug on my end that is very rarely triggered by unusual user input. If you can remember what changes you did to the font, it would help to find the bugg