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

[PLAT-8966] Add attemptDeliveryOnCrash #1488

Merged
merged 1 commit into from
Sep 30, 2022

Conversation

nickdowell
Copy link
Contributor

Goal

Add an optional mechanism for sending uncaught exceptions at crash time, prior to app termination.

Changeset

Adds attemptDeliveryOnCrash configuration option.

Adds attemptDelivery function pointer to BSG_KSCrash_SentryContext, which is set to BSGCrashSentryAttemptyDelivery if attemptDeliveryOnCrash is enabled.

The uncaught exception handler bsg_ksnsexc_i_handleException calls this function pointer, if available, after other threads have been resumed but before calling the original uncaught exception handler.

Testing

Adds an E2E scenario that verifies that

  • delivery occurs at crash time
  • mutations made by OnSendError are sent
  • no further deliveries are made after relaunching the app

E2E fixtures now #import BugsnagInternals.h in order to increase BSGCrashSentryDeliveryTimeout to improve reliability on device farms.

@github-actions
Copy link

github-actions bot commented Sep 29, 2022

Bugsnag.framework binary size increased by 1,320 bytes from 705,368 to 706,688

    FILE SIZE        VM SIZE    
 --------------  -------------- 
  +0.3%    +776  +0.3%    +776    __TEXT,__text
  +0.5%    +728  +0.5%    +728    String Table
  +0.4%    +544  +0.4%    +544    Symbol Table
  +0.6%    +104  +0.6%    +104    __TEXT,__objc_methname
  +0.3%     +96  +0.3%     +96    __DATA,__objc_const
  +0.4%     +77  +0.4%     +77    __TEXT,__cstring
  +0.3%     +64  +0.3%     +64    __DATA,__cfstring
  +3.5%     +40  +3.5%     +40    Export Info
  +0.3%     +16  +0.3%     +16    __DATA,__objc_selrefs
  +1.3%     +12  +1.3%     +12    __DATA,__data
  +0.4%     +12  +0.4%     +12    __TEXT,__unwind_info
  +0.5%      +8  +0.5%      +8    Function Start Addresses
  [ = ]       0  +0.1%      +8    __DATA,__bss
  +1.3%      +8  +1.3%      +8    __DATA,__objc_classrefs
  +0.4%      +4  +0.4%      +4    __DATA,__objc_ivar
  -2.4%    -200  -1.4%    -208    [__DATA]
  -3.8%    -969  -3.8%    -969    [__TEXT]
  [ = ]       0  -8.5% -1.29Ki    [__LINKEDIT]
  +0.2% +1.29Ki  [ = ]       0    TOTAL

Generated by 🚫 Danger

@nickdowell nickdowell changed the base branch from master to next September 29, 2022 09:16
@nickdowell nickdowell merged commit 55b60b4 into next Sep 30, 2022
@nickdowell nickdowell deleted the nickdowell/attempt-delivery-on-crash branch September 30, 2022 09:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants