Preview crashing using core data

I upgraded to the latest swift a while ago and have had no issues. Now I have started learning core-data and have problems with the preview crashing. The simulator works fine, it's just the preview. Does anyone know if it is a bug or is having similar problems?? I have had the issue with about 4 programs some of which I have copied from sites I am learning from. Frustrating. Any assistance would be appreciated. Thanks.