How to access glyph.layers in objective-c class GSGlyph

Hello, I am running into an odd issue: I am using the method processFont_withArguments_() in a Python filter.

When I run it on a variable font setting and try print(font.glyphs[0].layers), Glyphs immediately crashes.

I read the type of the glyph object, and I get “objective-c class GSGlyph”, instead of “objective-c class NSKVONotifying_GSGlyph”, which is what GSGlyph objects usually are in the Python environment.

How can I access a glyph’s layers in this case?

That print statement should be fine. There is something else that causes the crash.

And the type string should be OK either way.

Printing just the glyph works fine:

print(font.glyphs[0])

But printing its layers causes Glyphs to crash.

There is something wrong with the python runtime at that point. Could you send me a plugin that triggers the crash?