EXC_BAD_ACCESS when setting Integer to anything else than zero
问题 I have this object: @interface Song : NSManagedObject @property (nonatomic, strong) NSString *songName; @property (nonatomic) int32_t achievedPoints; When I set the properties like this Song *song1 = [[SongStore sharedStore] createSong]; song1.songName = @"Song 1"; song1.achievedPoints = 0; everything works, however once I try to set the achievedPoints variable to something else than 0 I get an EXC_BAD_ACCESS. This is what the createSong method does: - (Song *)createSong { double order; if (