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

Crash when Addressbook changes. #56

Open
pranavss11 opened this issue May 23, 2014 · 11 comments
Open

Crash when Addressbook changes. #56

pranavss11 opened this issue May 23, 2014 · 11 comments

Comments

@pranavss11
Copy link

My App is crashing when the addressbook is changed. How do I debug this?
AddressBook
ABAddressBookHasUnsavedChanges + 79
1
AddressBook
ABLogAPIUsage + 26
2
RHAddressBook.m line 1055
34-[RHAddressBook hasUnsavedChanges]_block_invoke
3
libdispatch.dylib
_dispatch_client_callout + 22
4
libdispatch.dylib
_dispatch_barrier_sync_f_slow + 230
5
RHAddressBook.m line 1054
-[RHAddressBook hasUnsavedChanges]
6
RHAddressBook.m line 1069
-[RHAddressBook addressBookExternallyChanged:]
7
CoreFoundation
__CFNOTIFICATIONCENTER_IS_CALLING_OUT_TO_AN_OBSERVER
+ 12
8
CoreFoundation
_CFXNotificationPost + 1720
9
Foundation
-[NSNotificationCenter postNotificationName:object:userInfo:] + 72
10
Foundation
-[NSNotificationCenter postNotificationName:object:] + 30
11 libdispatch.dylib
_dispatch_call_block_and_release + 10
19 UIKit
UIApplicationMain + 1136
20
main.m line 16
main

@antigp
Copy link

antigp commented Jun 3, 2014

Have the same crash.

@alexrecarey
Copy link

Same problem here

@idokleinman
Copy link

Happens to me after I do a
[person setImage:image];
and then
[addressBook save];

crash is on
-(BOOL)hasUnsavedChanges{
in RHAddressBook.m

any progress with that?

@heardrwt
Copy link
Owner

Are you using ARC? CocoaPods? What version/s of iOS? What library Version? Device or Simulator?
All of these things would be useful to enable further debugging.
Full crash log would also be useful (with all threads).

@pranavss11
Copy link
Author

ARC - Yes
CocoaPods - Yes
iOS - 7.1.1
Library Version - Using RHAddressBook (1.1.1)
Crash on Device.
Thanks!

Attached from Crashlytics:
screen shot 2014-06-13 at 3 46 36 pm
screen shot 2014-06-13 at 3 46 52 pm
screen shot 2014-06-13 at 3 47 04 pm

@alexrecarey
Copy link

I see that there is a new version (1.2.0) of RHAddressBook, and some changes have been made to the hasUnsavedChanges and revert methods.

Do these fix this issue? Would you mind pushing the version to 1.2.0 to CocoaPods?

@heardrwt
Copy link
Owner

Unfortunately i've had a report that the changes didn't actually fix the issue.
I've never actually been able to reproduce the crash myself, so debugging the issue is made harder than would normally be the case..

Any chance you could put together a sample project that causes the crash to occur?

Happy to push to cocoapods, however ill hold off until i know the crash is fixed..

@pranavss11
Copy link
Author

In my app, I couldn't get it to reproduce consistently. The way I fixed it
was to create a sharedInstance of RHAddressBook for the app.

On Fri, Jul 25, 2014 at 11:55 AM, Richard Heard notifications@github.com
wrote:

Unfortunately i've had a report that the changes didn't actually fix the
issue.
I've never actually been able to reproduce the crash myself, so debugging
the issue is made harder than would normally be the case..

Any chance you could put together a sample project that causes the crash
to occur?

Happy to push to cocoapods, however ill hold off until i know the crash is
fixed..


Reply to this email directly or view it on GitHub
#56 (comment)
.

-x

@heardrwt
Copy link
Owner

Hmmm... interesting.. I wonder if the last strong reference to the actual addressbook is being released.. Perhaps on receipt of a change notification..

@alexrecarey
Copy link

In my app I have also not been able to reproduce it consistently. Will try out the sharedInstance fix and report back. Will also try to find out what triggers it. Just the thought of going back to using straight C with ABAddressBook book sends shivers down my spine 😰

@johnryan
Copy link

@heardrwt I was able to find fairly reproducible steps for this that might help. Basically if I keep going to the settings app and toggle icloud contacts off->on (and delete from the phone) then come back to my app, it will frequently crash. This can be caught in the zombies tool using the simulator. Happy to give any more information. Thanks!

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

6 participants