-
-
Notifications
You must be signed in to change notification settings - Fork 263
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Application crash on NSManagedObject model.export() take 2 #590
Comments
Hi Richard, unless we find a way to reproduce it's gonna be hard to find the root cause. Pretty sure the error is inside hyp_snakeCase but hard to pinpoint exactly what's causing it. Maybe you can isolate the crash to the model that's causing it? |
from what I can see the issue comes up when the inverse relationship is set to many. if a relationship is one to one or the relationship is one to many sync seems to handle it. however, if a relationship is set many and the inverse is set many, sync gets lost in a recursive infinite loop when trying to export it. I can work around this issue by marking the inverse relationships in my core data model as nonExportable. however, I'm not sure I get all my data exported when I do that. |
Ahhhhh, I believe I understand the problem. Yes, when exporting Sync will iterate forever without finding the end of the loop. One way to fix this is in the code to make it stop after a certain amount of iterations but not sure if that's a good solution. |
If you have any suggestions I'm happy to hear them. |
I'm running into the same issue as was reported in August of last year.
When I export the model, the application crashes.
error is ;
Thread 1: EXC_BAD_ACCESS (code=2, address= 0x16bc8bf90)
(NSString *)remotePrefixUsingInflectionType:(SyncPropertyMapperInflectionType)inflectionType {
switch (inflectionType) {
case SyncPropertyMapperInflectionTypeSnakeCase:
return [NSString stringWithFormat:@"%@", [self.entity.name hyp_snakeCase]];
break;
case SyncPropertyMapperInflectionTypeCamelCase:
return [self.entity.name hyp_camelCase];
break;
}
}
it dies in the line return [NSString stringWithFormat:@"%@", [self.entity.name hyp_snakeCase]];
from what I can see the code is caught in an infinite loop. see attached thread crawl.
bus error thread trace.txt
I've tried changing around my data model in various ways, to no avail. any clue as to what I can try next?
Richard Hood
[email protected]
The text was updated successfully, but these errors were encountered: