EddyVerbruggen / Calendar-PhoneGap-Plugin

:date: Cordova plugin to Create, Change, Delete and Find Events in the native Calendar
773 stars 402 forks source link

iOS production App crashed frequently when using findEventWithOptions & createEventWithOptions #466

Open KKannan06 opened 6 years ago

KKannan06 commented 6 years ago

We are using calendar plugin in our Cordova based hybrid app. We observed more # of crashes occurred due to calendar plugin. We are finding crashes through Xcode Organizer crashes and Crashlytics. Please find below the crash observations for your references. Xcode Organizer Crash Descriptions: _EventKit: -[EKEventStore addObjectToPendingCommits:] + 120 EventKit: -[EKObject relationForKey:] + 216 EventKit: -[EKObject addWeakRelation:] + 120

Crashlytics Crash Descriptions: _#0 Crashed: com.apple.root.default-qosEXC_BREAKPOINT 0x0000000184d1c628

0 | CoreFoundation | getAtomTarget + 124 5 | EventKit | -[EKEventStore saveEvent:span:commit:error:] + 464 6 | Calendar.m line 630__35-[Calendar createEventWithOptions:]_block_invoke 7 | libdispatch.dylib | _dispatch_call_block_and_release + 24 13 | libsystem_pthread.dylib | start_wqthread + 4

0Crashed: com.apple.root.default-qosEXC_BAD_ACCESS KERN_INVALID_ADDRESS 0x0000000000000010 

-- 0 | CoreFoundation | -[NSSetM addObject:] + 440 4 | EventKit | -[EKEventStore calendarsForEntityType:] + 508 5 | Calendar.m line 83133-[Calendar findEventWithOptions:]_block_invoke 6 | libdispatch.dylib | _dispatch_call_block_and_release + 24 12 | libsystem_pthread.dylib | startwqthread + 4

I have attached crash stack taken from Xcode Organizer Crashes.

crash1 crash2 crash3

EddyVerbruggen commented 6 years ago

Without the project it's hard to make sense of this. Do you for instance create events in a loop?

KKannan06 commented 6 years ago

@EddyVerbruggen Thank you for your quick response. The create events and find events will get called multiple times by different functions. It is not inside any loop.

EddyVerbruggen commented 6 years ago

@juanjoseadan Then I wonder why you don't advise to also send a PR once the forked repo is fixed? 🤔