Xcode 8 beta 4 - Crash when code generating CoreData objects

Just wanted to check if anyone else is hitting a crash that appears to be related to code generation for core data model objects. This crash happen everytime I open my project using Xcode 8b4. It has been working just fine in prior Xcode 8 betas.


MainQueue: __103-[IDEDataModelCodeGenerator generateCodeForInputFile:outputFilePath:completionQueue:completionHandler:]_block_invoke.60
ProductBuildVersion: 8S188o
ASSERTION FAILURE in /Library/Caches/com.apple.xbs/Sources/IDEPlugins/IDEPlugins-11209.5/IDECoreDataModeler/ModelFoundation/CDMModelClasses/CDMRelationshipCodeGeneration.m:90
Details:  code which should be unreachable has been reached
Object:   <CDMRelationship: 0x7fcfc8658380>
Method:   -code_accessorsSwift


I have cleared caches and prior build output to see if some stale data existed, it is still happening.


I will attempt to work around it but wonder if anyone else has already figured out a work around. (will attempt to file a defect shortly)

If manually edit the xcdatamodel to disable "category" code generation the project can be opened and worked with. If I enable "category" code generation on any random model entity and save the xcdatamodel Xcode crashes immediately.


This of course defeats the purpose of code generation at the moment.

This just fills me with confidence, seeing how useless codegen has been so far.

Thanks! I had the same problem and eliminated the crashes by switching to Manual (no code generation), after copying the previously generated extensions to my bundle.

In my case crashes seem to be caused by to-one relationships.

Anybody hear of a good work-around?

Yeah I just got a chance to confirm that. to-one relationships seems to be the trigger for the assert... kinda prevent prevents it from being useful since my model is riddled with to-one relationships.


Now if I can find a way to restore/download Xcode 8 beta 3 I could make progress on my prototype.

I'm getting the error as well but it seems to be a to-many relationship for me. For a while I thought it was caused by two entities having to-many relations to the same third entity. I can build if the relation is to-one, but when I try to change it so it's a to-many relation it crashes on the build. I *thought* that's what it was, but then I started over with a small sample with just three entities and the converging to-many relations and it didn't crash 😟


I'll try generating the code and changing it after switching the generator off.


Mike

Mine has gone away after installing Beta 5

Xcode 8 beta 4 - Crash when code generating CoreData objects
 
 
Q