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

NSInvalidArgumentException: attempt to insert nil object from objects[2] #788

Closed
jpsim opened this issue Aug 31, 2020 · 5 comments
Closed
Labels
bug Confirmed bug released This feature/bug fix has been released

Comments

@jpsim
Copy link

jpsim commented Aug 31, 2020

Describe the bug

We're seeing an increase in uncaught runtime exceptions coming from Foundation in our latest integration of the Bugsnag SDK on iOS.

NSInvalidArgumentException: *** -[__NSPlaceholderDictionary initWithObjects:forKeys:count:]: attempt to insert nil object from objects[2]

0  CoreFoundation          ___exceptionPreprocess
1  libobjc.A.dylib         _objc_exception_throw
2  CoreFoundation          __CFThrowFormattedException
3  CoreFoundation          -[__NSPlaceholderDictionary initWithObjects:forKeys:count:]
4  CoreFoundation          +[NSDictionary dictionaryWithObjects:forKeys:count:]
5  [REDACTED]              __58-[BugsnagSessionTrackingApiClient deliverSessionsInStore:]_block_invoke ([REDACTED])
6  Foundation              ___NSBLOCKOPERATION_IS_CALLING_OUT_TO_A_BLOCK__
7  Foundation              -[NSBlockOperation main]
8  Foundation              -[__NSOperationInternal _start:]
9  Foundation              ___NSOQSchedule_f
10 libdispatch.dylib       __dispatch_block_async_invoke2
11 libdispatch.dylib       __dispatch_client_callout
12 libdispatch.dylib       __dispatch_continuation_pop$VARIANT$mp
13 libdispatch.dylib       __dispatch_async_redirect_invoke
14 libdispatch.dylib       __dispatch_root_queue_drain
15 libdispatch.dylib       __dispatch_worker_thread2
16 libsystem_pthread.dylib __pthread_wqthread
17 libsystem_pthread.dylib _start_wqthread

Steps to reproduce

We haven't pinned down steps to reproduce yet. We'll update this ticket when we find out more.

Environment

  • Bugsnag version: 6.1.2
  • CocoaPods version: N/A
  • Carthage version (if any): N/A
  • iOS/tvOS/macOS version(s): 11.4.1 to 12.4.8. None on iOS 13 or 14 so far.
  • Simulator or physical device: Physical Device
  • Xcode version: Xcode 11.5 (11E608c)
  • Swift version (if applicable): Apple Swift version 5.2.4 (swiftlang-1103.0.32.9 clang-1103.0.32.53)
@steve-nester-uk
Copy link
Contributor

@jpsim thanks for raising the issue, we have seen similar (but not exactly the same) issues before that was fixed in 6.1.0 by adding validation of configuration input. I'm wondering if there was a case that was missed (of course it's also possible that is unrelated) - could you also provide snippets of your bugsnag configuration?

@mattdyoung mattdyoung added the awaiting feedback Awaiting a response from a customer. Will be automatically closed after approximately 2 weeks. label Sep 3, 2020
@jpsim
Copy link
Author

jpsim commented Sep 10, 2020

Is there a private channel where I could share that information with you?

@steve-nester-uk
Copy link
Contributor

@jpsim of course, please email [email protected] and we'll take a look.

@steve-nester-uk steve-nester-uk removed the awaiting feedback Awaiting a response from a customer. Will be automatically closed after approximately 2 weeks. label Sep 11, 2020
@jpsim
Copy link
Author

jpsim commented Sep 11, 2020

Sent an email. Thanks!

@xljones
Copy link
Contributor

xljones commented Sep 23, 2020

Hey @jpsim, a fix for this was released in https://github.com/bugsnag/bugsnag-cocoa/releases/tag/v6.1.5, under PR #807

@xljones xljones added bug Confirmed bug released This feature/bug fix has been released labels Sep 23, 2020
@xljones xljones closed this as completed Sep 23, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Confirmed bug released This feature/bug fix has been released
Projects
None yet
Development

No branches or pull requests

4 participants