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

strictly compare for NSNull values #1138 #1141

Closed
wants to merge 1 commit into from
Closed

strictly compare for NSNull values #1138 #1141

wants to merge 1 commit into from

Conversation

tshedor
Copy link

@tshedor tshedor commented Jun 30, 2021

Goal

When attaching a custom stack trace, the stack trace types is sometimes an NSNull object. This causes an unhandled error detailed in #1138

Design

This strictly checks for nil and NSNull values instead of exclusively nil values. It's a bit of a hack.

The unhandled errors are universally reported immediately after app start, which would indicate that custom stack trace errors that are stored before the next app launch (like in the event of a simultaneous OOM) are not stored within BSGKeyStacktrace. I'm a little lost in this code base so please forgive me not going deeper than ensuring NSNull values aren't iterated.

Changeset

The comparison for trace in BugsnagError.m changed from != nil to !(trace == nil || trace == NSNull).

Testing

This bug has been difficult to reproduce, but the change is additive and so I believe it's a low risk solution with substantial gain (the gain being the Bugsnag error collector does not produce errors itself).

@abigailbramble abigailbramble added backlog We hope to fix this feature/bug in the future bug Confirmed bug labels Jun 30, 2021
@nickdowell
Copy link
Contributor

Hi @tshedor I'm closing this as we've addressed the issue with #1143

Thanks for looking into it 👍

@nickdowell nickdowell closed this Jun 30, 2021
@tshedor tshedor deleted the 1138-invalid-argument-exception branch June 30, 2021 16:49
@tshedor
Copy link
Author

tshedor commented Jun 30, 2021

Thanks @nickdowell fo the quick response, I appreciate it

@mattdyoung mattdyoung removed backlog We hope to fix this feature/bug in the future bug Confirmed bug labels Jul 2, 2021
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.

4 participants