seanyhc/Groubit — Issue #3: entity exception
Author: seanyhc
Created: 2012-01-29 03:04:03+00:00
State: open

downloaded newest code
reset iphone content
close simulator
run app
dashboard loaded
click init data
exception, msg below:

2012-01-28 19:01:03.453 Groubit_iOS[1332:b603] Set local username : (null)
2012-01-28 19:01:03.458 Groubit_iOS[1332:b603] view did load. Local user : Jeffrey
2012-01-28 19:01:09.818 Groubit_iOS[1332:b603] Enter DashboardViewControll::createHabit
2012-01-28 19:01:09.819 Groubit_iOS[1332:b603] Enter HabitDataModel::createHabitForUser. userName:Jeffrey, password:1234
2012-01-28 19:01:09.821 Groubit_iOS[1332:b603] *** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: '+entityForName: could not locate an entity named 'GBUser' in this model.'
*** Call stack at first throw:
(
0 CoreFoundation 0x015345a9 __exceptionPreprocess + 185
1 libobjc.A.dylib 0x018c3313 objc_exception_throw + 44
2 CoreData 0x01296aaf +[NSEntityDescription insertNewObjectForEntityForName:inManagedObjectContext:] + 255
3 Groubit_iOS 0x0000509d -[GBDataModelManager createUser:withPassword:] + 157
4 Groubit_iOS 0x0000726e -[DashBoardViewController initTestData:] + 302
5 UIKit 0x008494fd -[UIApplication sendAction:to:from:forEvent:] + 119
6 UIKit 0x008d9799 -[UIControl sendAction:to:forEvent:] + 67
7 UIKit 0x008dbc2b -[UIControl(Internal) _sendActionsForEvents:withEvent:] + 527
8 UIKit 0x008da7d8 -[UIControl touchesEnded:withEvent:] + 458
9 UIKit 0x0086dded -[UIWindow _sendTouchesForEvent:] + 567
10 UIKit 0x0084ec37 -[UIApplication sendEvent:] + 447
11 UIKit 0x00853f2e _UIApplicationHandleEvent + 7576
12 GraphicsServices 0x0266f992 PurpleEventCallback + 1550
13 CoreFoundation 0x01515944 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE1_PERFORM_FUNCTION__ + 52
14 CoreFoundation 0x01475cf7 __CFRunLoopDoSource1 + 215
15 CoreFoundation 0x01472f83 __CFRunLoopRun + 979
16 CoreFoundation 0x01472840 CFRunLoopRunSpecific + 208
17 CoreFoundation 0x01472761 CFRunLoopRunInMode + 97
18 GraphicsServices 0x0266e1c4 GSEventRunModal + 217
19 GraphicsServices 0x0266e289 GSEventRun + 115
20 UIKit 0x00857c93 UIApplicationMain + 1160
21 Groubit_iOS 0x0000259e main + 174
22 Groubit_iOS 0x000024e5 start + 53
)
terminate called throwing an exceptionsharedlibrary apply-load-rules all
(gdb)

coded stopped at line 561
newUser = [NSEntityDescription insertNewObjectForEntityForName:@"GBUser" inManagedObjectContext:objectContext];