This is an old bug, I remeber it was fixed, but it came back. You have a plenty of my crash reports about it. Working with a few fonts at once and closing one of them (Cmd W) crashes the Glyphs for sure.
This happens to me sometimes when I generate instances and a lot of Glyphs files are opened and I start closing them.
Are you sure it is the command key plus W? Because it crashes for me sometimes when I click the red button in the top left corner. Cmd-W works for me.
I’m sure, I always close my files via shortcut.
I’m running into this bug 99% of the time I close a file in v827.
Which plugins do you have installed?
RMX and Trace Image.