fault

FaultException.Detail coming back empty

瘦欲@ 提交于 2019-12-04 02:40:30
I am trying to catch a given FaultException on a WCF client. I basically need to extract a inner description from the fault class so that I can then package it in another exception for the upper layers to do whatever. I've done this successfully a number of time, what makes it different this time is that fault is declared as an array, as you can see from the service reference attribute declared on top of the method that throws the exception: [System.ServiceModel.FaultContractAttribute(typeof(FaultClass[]), Action = "http://whatever/", Name = "whateverBusinessFault")] This is my code: try { //

Core Data - break retain cycle of the parent context

痞子三分冷 提交于 2019-12-03 18:36:08
问题 Let's say we have two entities in a Core Data model: Departments and Employees. The Department has a one-to-many relationship to Employees. I have the following ManagedObjectContexts: - Root: connected to the Persistent Store Coordinator - Main: context with parent Root When I want to create an Employee I do the following: - I have a Department in the Main context - I create an Employee in the Main context - I assign the Department to the Employee's department property - I save the Main

How do we prevent “CoreData could not fulfill a fault”?

倖福魔咒の 提交于 2019-12-03 14:26:22
We get "CoreData could not fulfill a fault" every once in a while. We have read through the Apple documentation but are unclear on what is allowed to be retained. We have been very careful about creating one context per thread, etc. However, one thing our app is doing is we are retaining NSManagedObjects on our UIViewControllers (usually via a NSArray or NSDictionary). I'm guessing what's going on is the object relationships are changing and we are not handling the appropriate notification. Does anyone have any suggestions on the better design with regards to Core Data? When we get the error,

Coredata - “NSObjectInaccessibleException - CoreData could not fulfill a fault”

夙愿已清 提交于 2019-12-03 03:55:15
问题 I am new to Core data and still figuring out the nuts and bolts and this error has been bugging me for hours and I cant seem to find a solution. Any help is greatly appreciated. The problem is like this I have two views which fetch data from the server and Update the UI. I have set up the flow this way view1 -> Send HTTP Req from Server - Receive Callback -> Save Data To Coredata -> Read From Core Data and display on the UI (callback and saving/reading Coredata happen in ViewController) view2

Core Data -existingObjectWithID:error: causes error 133000

ⅰ亾dé卋堺 提交于 2019-12-03 02:36:50
问题 My app uses Core Data (with some help of Magical Record) and is rather heavily multithreaded using NSOperation . Of course I am very careful to only pass around NSManagedObjectID between threads/operations. Now, to get back to the corresponding managed object in an operation, I use -existingObjectWithID:error: thus: Collection *owner = (Collection *)[localContext existingObjectWithID:self.containerId error:&error]; But what I get back is nil and error says this is an error #13300:

Coredata - “NSObjectInaccessibleException - CoreData could not fulfill a fault”

↘锁芯ラ 提交于 2019-12-02 16:14:26
I am new to Core data and still figuring out the nuts and bolts and this error has been bugging me for hours and I cant seem to find a solution. Any help is greatly appreciated. The problem is like this I have two views which fetch data from the server and Update the UI. I have set up the flow this way view1 -> Send HTTP Req from Server - Receive Callback -> Save Data To Coredata -> Read From Core Data and display on the UI (callback and saving/reading Coredata happen in ViewController) view2 -> Send HTTP Req from Server - Receive Callback -> Save Data To Coredata -> Read From Core Data and

Core Data -existingObjectWithID:error: causes error 133000

纵然是瞬间 提交于 2019-12-02 16:11:19
My app uses Core Data (with some help of Magical Record) and is rather heavily multithreaded using NSOperation . Of course I am very careful to only pass around NSManagedObjectID between threads/operations. Now, to get back to the corresponding managed object in an operation, I use -existingObjectWithID:error: thus: Collection *owner = (Collection *)[localContext existingObjectWithID:self.containerId error:&error]; But what I get back is nil and error says this is an error #13300: NSManagedObjectReferentialIntegrityError . Here is what the documentation says about this error:

Core Data cannot resolve faults when object has “description” attribute?

泄露秘密 提交于 2019-12-02 01:53:50
问题 Code: NSFetchRequest *fetchRequest = [[NSFetchRequest alloc] init]; NSEntityDescription *entity = [NSEntityDescription entityForName:@"A" inManagedObjectContext:moc]; [fetchRequest setEntity:entity]; NSSortDescriptor *sortDescriptor = [[NSSortDescriptor alloc] initWithKey:@"id" ascending:NO]; NSArray *sortDescriptors = [[NSArray alloc] initWithObjects:sortDescriptor, nil]; [fetchRequest setSortDescriptors:sortDescriptors]; [sortDescriptors release]; [sortDescriptor release]; NSPredicate

Core Data cannot resolve faults when object has “description” attribute?

你。 提交于 2019-12-02 00:12:13
Code: NSFetchRequest *fetchRequest = [[NSFetchRequest alloc] init]; NSEntityDescription *entity = [NSEntityDescription entityForName:@"A" inManagedObjectContext:moc]; [fetchRequest setEntity:entity]; NSSortDescriptor *sortDescriptor = [[NSSortDescriptor alloc] initWithKey:@"id" ascending:NO]; NSArray *sortDescriptors = [[NSArray alloc] initWithObjects:sortDescriptor, nil]; [fetchRequest setSortDescriptors:sortDescriptors]; [sortDescriptors release]; [sortDescriptor release]; NSPredicate *predicate = [NSPredicate predicateWithFormat:@"somePredicate", someObject]; [fetchRequest setPredicate

Segmentation fault when pushing on stack (NASM)

非 Y 不嫁゛ 提交于 2019-12-01 14:07:24
I'm trying to get a nasm program running. The following code: segment .data contAir: dt 1.11330e-10 constOil: dt 2.33656e-10 segment .text global calc calc: mov edx, 0 push ebp ;mov ebp, esp ;mov eax, [ebp + 8] ret I get a segmentation fault (core dump) when pushing ebp on the stack. Why is that? I'm running this code on an Ubuntu virtual machine. Funny thing is, sometimes I get an "illegal instruction" error. I get a segmentation fault (core dump) when pushing ebp on the stack. Why is that? I'm running this code on an Ubuntu virtual machine. Funny thing is, sometimes I get an "illegal