In my case, I was trying to extend a CoreData class with a helper method that could work on all of its subclasses:
extension ExampleCoreDataClass {
static func insert() -> Self {
...
I got no warnings about this, but when I tried to compile it the segmentation fault appeared.
After struggling for a while I used a protocol extension instead and this resolved the error:
extension NSFetchRequestResult where Self: ExampleCoreDataClass {
static func insert() -> Self {
...