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

SIGABRT in notifyError #399

Closed
benasher44 opened this issue Aug 8, 2019 · 5 comments · Fixed by #401
Closed

SIGABRT in notifyError #399

benasher44 opened this issue Aug 8, 2019 · 5 comments · Fixed by #401
Labels
bug Confirmed bug released This feature/bug fix has been released

Comments

@benasher44
Copy link

Description

Issue

We're seeing a SIGABRT inside of Bugsnag in the call to notifyError:….

Here's the trace:

SIGABRT: 

0  libsystem_kernel.dylib  ___pthread_kill
1  libsystem_pthread.dylib _pthread_kill
2  libsystem_c.dylib       _abort
3  libsystem_malloc.dylib  _malloc_vreport
4  libsystem_malloc.dylib  _malloc_report
5  libsystem_malloc.dylib  _free
6  PlanGrid                bsg_ksstring_replace (BSG_KSString.c:143:9)
7  PlanGrid                bsg_kscrash_reinstall (BSG_KSCrashC.c:194:5)
8  PlanGrid                -[BSG_KSCrash reportUserException:reason:originalException:handledState:appState:callbackOverrides:metadata:config:discardDepth:terminateProgram:] (BSG_KSCrash.m:324:5)
9  PlanGrid                -[BugsnagCrashSentry reportUserException:reason:originalException:handledState:appState:callbackOverrides:metadata:config:discardDepth:] (BugsnagCrashSentry.m:53:5)
10 PlanGrid                -[BugsnagNotifier notify:handledState:block:] (BugsnagNotifier.m:665:5)
11 PlanGrid                -[BugsnagNotifier notifyError:block:] (BugsnagNotifier.m:530:5)

Environment

Library versions:

  • Bugsnag version (from your Podfile, Podfile.lock, or elsewhere): 5.22.4
  • CocoaPods version (if any) (pod -v): 1.7.2
  • Carthage version (if any):
  • iOS/tvOS/macOS version(s) iOS 11+
  • debug mode or production?: Production
  • How are you initializing Bugsnag? Can you share a snippet of your
    AppDelegate where Bugsnag is configured?

Example code snippet

import Bugsnag
// title is a String
// message is a String
// severity is an enum, which we map to a Bugsnag severity
        let bugsnagError = NSError(domain: "com.loupe.PlanGrid", code: 0, userInfo: [
            NSLocalizedDescriptionKey: title,
            NSLocalizedFailureReasonErrorKey: message
        ])

        Bugsnag.notifyError(bugsnagError) { report in
            report.errorClass = title
            report.errorMessage = message
            report.severity = severity.bugsnagSeverity
            additionalData?.forEach { key, value in
                report.metaData[key] = value
            }
            report.context = "ErrorLogger.logError"
        }

Here's the ID of the error in the plangrid iOS Bugsnag project :) 5c86619cc74b1f0019fc8ecc. Feel free to go have a look!

@abigailbramble abigailbramble added the bug Confirmed bug label Aug 9, 2019
@kattrali
Copy link
Contributor

kattrali commented Aug 9, 2019

Thanks for the report, @benasher44. I took a look and have some theories. Will report back soon.

@abigailbramble abigailbramble added backlog We hope to fix this feature/bug in the future scheduled Work is starting on this feature/bug and removed backlog We hope to fix this feature/bug in the future labels Aug 9, 2019
@benasher44
Copy link
Author

Thank you!

@kattrali
Copy link
Contributor

kattrali commented Aug 9, 2019

Found a reproduction case involving calling notify concurrently from a few queues at once. Working on a fix in #401.

@abigailbramble abigailbramble added released This feature/bug fix has been released and removed scheduled Work is starting on this feature/bug labels Aug 14, 2019
@abigailbramble
Copy link

@benasher44
Copy link
Author

Great thank you! 🎉

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
3 participants