Skip to content
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

iOS4 addPerson stack overflow #1

Open
watkyn opened this issue Jul 2, 2010 · 2 comments
Open

iOS4 addPerson stack overflow #1

watkyn opened this issue Jul 2, 2010 · 2 comments

Comments

@watkyn
Copy link

watkyn commented Jul 2, 2010

I am having an issue trying to run the sample application with the latest iphone 4 SKD. When I try to add a new person I get a “EXC_BAD_ACCESS” and the backtrace looks to be a recursive issue in the NSObject+XMLSerializationSupport (toXMLElementAs:)

I first noticed this in one of my apps, but since I was able to reproduce it in the demo app, I figured I would point it out.

Works fine in the 3.2 simulator but crashes in the 4.0 simulator and device.

  • Tony

Developer Information:

Version: 3.2 (10M2262)
Location: /Developer
Applications:
Xcode: 3.2.3 (1688)
Interface Builder: 3.2.3 (788)
Instruments: 2.7 (2529)
Dashcode: 3.0.1 (330)
SDKs:
Mac OS X:
10.5: (9L31a)
10.6: (10M2262)
iPhone OS:
3.2: (7B367)
4.0: (8A293)
iPhone Simulator:
3.2: (7W367a)
4.0: (8A293)

@dominiclovell
Copy link

I had the same issue, but worked out what was happening.

The properties of the object has a range of extra elements in 4.0. Some of which are of types that can't be serialised.

A work around I found was to explicitly exclude these properties from serialisation.

Inside NSObject+ObjectiveResource.m change the defaultExclusions inside convertToRemoteExpectedType:

NSArray *defaultExclusions = [NSArray arrayWithObjects:[self getRemoteClassIdName],@"createdAt",@"updatedAt",@"accessibilityFrame", @"accessibilityHint", @"accessibilityLabel", @"accessibilityLanguage", @"accessibilityTraits", @"accessibilityValue", @"isAccessibilityElement",nil];

If someone else can comment on a better solution, that would be great.

@dominiclovell
Copy link

If someone else has this issue, they should check out the following fix: http://github.com/yfactorial/objectivesupport/commit/a3c7a6b5765cb2695712c832c9bca9d8fd6a6898

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants