Crash happens due to IBGSurveyCache
haozhutw opened this issue · 10 comments
Steps to Reproduce the Problem
No steps, this issue is reported by Firebase
Expected Behavior
should not crash
Actual Behavior
app crashes
SDK Version
https://github.com/Instabug/Instabug-React-Native#snapshot-ios/10.9.2-INSD-5983
React Native, iOS and Android Versions
React Native: 0.61.5
iOS: 11 and above
Android: 5.0 and above
Device Model
This crash happens on iPhone and iPad, with iOS 15 and iOS 14
Crash log
IBGSurveyCache.m line 308
-[IBGSurveyCache removeUnAnsweredSurveys:inContext:]
Fatal Exception: NSInvalidArgumentException
*** -[__NSArrayM insertObject:atIndex:]: object cannot be nil
Fatal Exception: NSInvalidArgumentException
0 CoreFoundation 0x9904c __exceptionPreprocess
1 libobjc.A.dylib 0x15f54 objc_exception_throw
2 CoreFoundation 0x1a2530 -[__NSCFString characterAtIndex:].cold.1
3 CoreFoundation 0x19f7ac -[__NSArrayM insertObject:atIndex:].cold.2
4 CoreFoundation 0xd9ac -[__NSArrayM insertObject:atIndex:]
5 Instabug 0x299c8c -[IBGSurveyCache removeUnAnsweredSurveys:inContext:] + 308 (IBGSurveyCache.m:308)
6 Instabug 0x298524 __71-[IBGSurveyCache syncSurveysResponse:pausedSurveysIDs:isAnnouncements:]_block_invoke_2 + 105 (IBGSurveyCache.m:105)
7 Instabug 0x26a81c __59-[IBGSurveysCoreDataController writeASync:completionBlock:]_block_invoke_3 + 204 (IBGSurveysCoreDataController.m:204)
8 CoreData 0x1f754 developerSubmittedBlockToNSManagedObjectContextPerform
9 libdispatch.dylib 0x4660 _dispatch_client_callout
10 libdispatch.dylib 0xbde4 _dispatch_lane_serial_drain
11 libdispatch.dylib 0xc958 _dispatch_lane_invoke
12 libdispatch.dylib 0x171a8 _dispatch_workloop_worker_thread
13 libsystem_pthread.dylib 0x10f4 _pthread_wqthread
14 libsystem_pthread.dylib 0xe94 start_wqthread
Crash statistics in last 90 days
@AliAbdelfattah Could you please help with this? I expect the crash of IBGSurveyCache was fixed with that snapshot version, but crash still happens. Can you confirm that all the crash fixes are merged to the formal version? Every time I upgrade Instabug, crash never ends. Instabug provides great features, and it will be even better if it could be more stable.
@haozhutw let me double check which version it got fixed on.
@haozhutw we haven't encountered this crash before and I'm not sure if we can debug it further without the reproduction steps. However, looking into our crash logs, we can see it occurring on the version you have but haven't received the same crash on the latest version. We think it may have been coupled with another issue that got fixed.
Here's a snapshot with the updated iOS SDK till we push our official RN release. Would you like to give it a try and let us know if fixes this crash?
npm install --save https://github.com/Instabug/Instabug-React-Native#snapshot-ios/10.10.1
Thank you @AliAbdelfattah, I am wondering if this snapshot version contains the fix for crash issues(especially Instabug/Instabug-React-Native#633) I have reported before, I don't want to see any regression issues. Can you confirm that? Appreciate your help!
@haozhutw it should have all previous fixes including the one targeted for Instabug/Instabug-React-Native#633
Thank you @AliAbdelfattah your support is appreciated! Your support team is awesome!
You know all the crash issues I reported are iOS native crash, since Instabug-React-Native
depends on the Instabug iOS SDK, honestly I think the quality of iOS SDK should be improved. At this moment when I'm replying to you, I find two new crashes #442 and Instabug/Instabug-React-Native#650 . You are using CoreData.framework to cache data on iOS, it causes a lot of crashes, some of them shouldn't happen since they are easy to handle. I just hope no more crashes, I'm really exhausted to report new crashes.
This crash is still not resolved, tried this version in my latest release.
npm install --save https://github.com/Instabug/Instabug-React-Native#snapshot-ios/10.10.1
@AliAbdelfattah Can you forward this ticket to the iOS team? This should be an iOS native crash, it's not fixed in the snapshot version you provided, it's been the top 1 crash issue in our app. I hope this crash can be fixed, thank you.
Hi @haozhutw, Please reach out to us at support@instabug.com as we need more confidential info that can't be shared here.
This should be fixed on the latest release, please ping us if you still experience this crash.