Skip to content

Change property attributes on OTMPreferences#325

Merged
jwalgran merged 1 commit intoOpenTreeMap:masterfrom
jwalgran:feature/jcw/fix-preference-prop
Oct 20, 2016
Merged

Change property attributes on OTMPreferences#325
jwalgran merged 1 commit intoOpenTreeMap:masterfrom
jwalgran:feature/jcw/fix-preference-prop

Conversation

@jwalgran
Copy link
Copy Markdown
Contributor

The app was crashing with an EXC_BAD_ACCESS exception when the app delegate's applicationDidEnterBackground: method attempted to call save on OTMPreferences. Setting a breakpoint on unhandled exceptions revealed that the value of the instance property was invalid. It looks like this is the result of using the assign attribute, which should only be used on primitive types (int, BOOL, etc.).

I am not able to reproduce the exception after replacing assign with our app-wide convention for string properties, nonatomic and strong.


Testing

Follow the reproduction steps in #323.


Connects to #323

The app was crashing with an `EXC_BAD_ACCESS` exception when the app
delegate's `applicationDidEnterBackground:` method attempted to call
`save` on `OTMPreferences`. Setting a breakpoint on unhandled exceptions
revealed that the value of the `instance` property was invalid. It looks
like this is the result of using the `assign` attribute, which should
only be used on primitive types (int, BOOL, etc.).

I am not able to reproduce the exception after replacing `assign` with
our app-wide convention for string properties, `nonatomic` and
`strong`.
@RickMohr
Copy link
Copy Markdown
Contributor

+1

@RickMohr RickMohr removed their assignment Oct 20, 2016
@jwalgran jwalgran merged commit 9631bde into OpenTreeMap:master Oct 20, 2016
@jwalgran jwalgran deleted the feature/jcw/fix-preference-prop branch October 20, 2016 17:40
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

Successfully merging this pull request may close these issues.

2 participants