Broken .glyphs file

It seems that glyphs has rendered a file unusable when saving it. When I try to open it again, I get the following error message:

The document “xxx.glyphs” could not be opened. Missing ‘;’ on line 4412370.

Opening with textwranger shows strange changes right at the beginning:

{
.appVersion = “3260”;
.formatVersion = 3;
DisplayStrings = (
" абвeгдзежиy/hh ийκклмнопрстуфхчцшъьюяєc
–∞–±/uni0432.curl –≥–¥o/z.001 –µ/uni0431.original –≤u–øu/hh —Ée/uni0436.sose.002/hh y/hh –∏–π/uni045C.x –º–Ω–Ω–æ–ø—Ä—Å—Ç—É—Ñ—Ö—á—Ü—à—â—å—ä/uni044A.003 —é—è

–∞–±/uni0432.12.04.24-letze_vor_schraegstellung –≥–¥/z.001 –µ/uni0436.002/hh y/hh –∏–π/uni043B.001 –º–Ω–æ–ø—Ä—Å—Ç—É—Ñ—Ö—á—Ü—à—â—å—ä—é—è",
" /uni0437.curl.b",
“a–±–≤–≥/uni0434.001/uni0435.001 –∂–∑/uni0438.sose/uni043A.x/uni043A.x.001 –º–Ω–æ/uni043F.001 —Ä—Å/uni0442.001/uni0443.001/uni0444.001 —Ö/tse-cy.sose/_cap.sose.lowercasetop/_cyuni0446/uni0446.001/uni0448.sose/uni0448.001/uni0449.001/uni044C.001 —ô/uni044F.001
–∞–±–≤–≥–¥–µ–∂–∑–∏–∫–ª–º–Ω–æ–ø—Ä—Å—Ç—É—Ñ—Ö—á—Ü—à—â—å—ä—é—è
–∞–±/uni0432.curl –≥–¥–µ–∑–∏–π–∫–ª–º–Ω–æ–ø—Ä—Å—Ç—É—Ñ—Ö—á—Ü—à—â—å—ä—é—è
–∞–±–≤–≥–¥–µ/uni0436.002 –∑–∏–π–ª–º–Ω–æ–ø—Ä—Å—Ç—É—Ñ—Ö—á—Ü—à—â—å—ä—é—è”,
“Œ±Œ≤Œ≥Œ¥ŒµŒ∂Œ∑Œ∏ŒπŒ∫ŒªŒºŒΩŒæŒøœÄœÅœÇœÉœÑ/v.001 œÖœÜœáœàœâ
Œ±/beta.001 Œ≥Œ¥ŒµŒ∂Œ∑/theta.001 ŒπŒ∫ŒªŒºŒΩŒæŒøœÄœÅœÇœÉ/tau.001 œÖœÜœáœàœâ”,

where the last backups shows:

{
.appVersion = “3260”;
.formatVersion = 3;
DisplayStrings = (
" абвeгдзежиy/hh ийκклмнопрстуфхчцшъьюяєc
аб/uni0432.curl гдo/z.001 е/uni0431.original вuпu/hh уe/uni0436.sose.002/hh y/hh ий/uni045C.x мннопрстуфхчцшщьъ/uni044A.003 юя

аб/uni0432.12.04.24-letze_vor_schraegstellung гд/z.001 е/uni0436.002/hh y/hh ий/uni043B.001 мнопрстуфхчцшщьъюя",
" /uni0437.curl.b",
“aбвг/uni0434.001/uni0435.001 жз/uni0438.sose/uni043A.x/uni043A.x.001 мно/uni043F.001 рс/uni0442.001/uni0443.001/uni0444.001 х/tse-cy.sose/_cap.sose.lowercasetop/_cyuni0446/uni0446.001/uni0448.sose/uni0448.001/uni0449.001/uni044C.001 љ/uni044F.001
абвгдежзиклмнопрстуфхчцшщьъюя
аб/uni0432.curl гдезийклмнопрстуфхчцшщьъюя
абвгде/uni0436.002 зийлмнопрстуфхчцшщьъюя”,
“αβγδεζηθικλμνξοπρςστ/v.001 υφχψω
α/beta.001 γδεζη/theta.001 ικλμνξοπρςσ/tau.001 υφχψω”,

And line 4412370 is “_three.denominator.ita = Noneuni05D0.latnfit = None;” instead of “_three.denominator.ita = None;” in the backup.

What has happend and what can I do to prevent this?

Not sure how that happened. The app was in an unusual state maybe caused by a plugin or an unrelated bug. Do you know what you did before you saved the file (not only the last step, could have been caused earlier, (a script or undoing))?

Please fix the file with the info from the backup. And if it happens again we need to investigate further.