NennaFooday
New Member
First here is my crash log\[code\]Thread 1 name: Dispatch queue: com.apple.root.default-priorityThread 1 Crashed:0 CoreFoundation 0x3b8afc30 __CFBasicHashRehash + 7961 CoreFoundation 0x3b8b0e48 __CFBasicHashAddValue + 882 CoreFoundation 0x3b7db194 CFBasicHashAddValue + 30483 CoreFoundation 0x3b7deebc CFSetAddValue + 1124 CoreData 0x36ea45b0 - [NSManagedObjectContext(_NSInternalAdditions) _insertObjectWithGlobalID:globalID:] + 1725 CoreData 0x36e9c9bc -[NSManagedObjectContext insertObject:] + 1366 CoreData 0x36e8c6d2 -[NSManagedObject initWithEntity:insertIntoManagedObjectContext:] + 6467 CoreData 0x36e78d74 +[NSEntityDescription insertNewObjectForEntityForName:inManagedObjectContext:] + 1768 XYZ Orders 0x000f8182 -[ITMLoginVC traverseElement:] (ITMLoginVC.m:1551)9 XYZ Orders 0x000f7eba -[ITMLoginVC traverseElement:] (ITMLoginVC.m:1506)10 XYZ Orders 0x000f5970 -[ITMLoginVC getAllCustomerValues] (ITMLoginVC.m:903)11 libdispatch.dylib 0x39b8911c _dispatch_call_block_and_release + 812 libdispatch.dylib 0x39b8d95c _dispatch_root_queue_drain + 24813 libdispatch.dylib 0x39b8dabc _dispatch_worker_thread2 + 8014 libsystem_c.dylib 0x368f2a0e _pthread_wqthread + 35815 libsystem_c.dylib 0x368f28a0 start_wqthread + 4\[/code\]The line 903:\[code\]if(ttbXML.rootXMLElement){ [self traverseElement:ttbXML.rootXMLElement]; //line 903}\[/code\]The line 1551 :\[code\]ITMAllCustomerAddresses *allCustAddress =(ITMAllCustomerAddresses *)[NSEntityDescription insertNewObjectForEntityForName"ITMAllCustomerAddresses" inManagedObjectContext:self.managedObjectContext];\[/code\]The line 1506 :\[code\] [self traverseElement:element->firstChild];\[/code\]I am using TBXML to parse. Here on StackOverflow, people suggested to user TBXML incase of large XML. I used NSXMLParser, but it was slow and crashed. This crashes too, but its fast and crashes like once or twice in a day. This is again a rare case. This is second time i got this today. So i thought i might post this. I thought my managedobjectcontext is not initialised properly so i am doing it right now like this:\[code\] if (!self.managedObjectContext){ self.managedObjectContext = self.appDelegate.managedObjectContext;}\[/code\]If anyone has any ideas as to why its behaving like this please tell me. If you need more information, let me know. Thanks. Its in iOS6 and i am testing for iPhone device. Its an in-house app. Works fine on Simulator.