10

Getting a crash for using ODR(on demand resources) on iOS app with this description -

Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'NSBundleResourceRequest could not connect to its helper daemon

iOS Version common among crashes - 10.3.2

I'm seeing crashes in Crashlytics and am unable to reproduce this in debug mode without calling private methods. I have images and sound files included in my ODRs. Attaching the stack trace screen shot as well - ScreenShotofStackTrace

I am also calling -[NSBundleResourceRequest conditionallyBeginAccessingResourcesWithCompletionHandler:] from within a dispatch_after block. Could this be the culprit?

Any leads would be greatly appreciated!

Amal T S
  • 3,327
  • 2
  • 24
  • 57
Aamir Anwar
  • 101
  • 8
  • 2
    Are you consistently getting the crash, or is it inconsistent? Is it possible that endAccessingResources() is getting called before conditionallyBeginAccessingResourcesWithCompletionHandler has completed? – Mark A. Durham Oct 05 '17 at 16:16
  • This was probably the culprit. I removed it from the dispatch block and the crash was gone. – Aamir Anwar Nov 29 '17 at 09:52

1 Answers1

-2

In my case, closing Xcode, deleting files in the DerivedData folder, restarting Xcode, cleaning the project, and deleting the program from the simulator/device solved this problem.

C. Outwin
  • 47
  • 1
  • 3