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

Crashed when SentrySDK.start in iOS #3462

Closed
jimmy-sqe opened this issue Nov 30, 2023 · 5 comments · Fixed by #3468
Closed

Crashed when SentrySDK.start in iOS #3462

jimmy-sqe opened this issue Nov 30, 2023 · 5 comments · Fixed by #3468

Comments

@jimmy-sqe
Copy link

Platform

iOS

Environment

Production

Installed

CocoaPods

Version

8.13.0

Did it work on previous versions?

No response

Steps to Reproduce

  1. Call SentrySDK.start

And crash happens

This is the logs

Fatal Exception: NSRangeException
0  CoreFoundation                 0x9cb4 __exceptionPreprocess
1  libobjc.A.dylib                0x183d0 objc_exception_throw
2  CoreFoundation                 0x1aff84 -[__NSCFString characterAtIndex:].cold.1
3  CoreFoundation                 0x25534 -[__NSArrayM objectAtIndexedSubscript:]
4  GarasiDealer                   0x4cacf0 -[SentryBinaryImageCache binaryImageAdded:] + 48 (SentryBinaryImageCache.m:48)
5  GarasiDealer                   0x4cab88 binaryImageWasAdded + 107 (SentryBinaryImageCache.m:107)
6  GarasiDealer                   0x4d5690 binaryImageAdded + 111 (SentryCrashBinaryImageCache.c:111)
7  ???                            0x1e0668aec (Missing)
8  ???                            0x1e0662e84 (Missing)
9  ???                            0x1e069fefc (Missing)
10 GarasiDealer                   0x4d559c sentrycrashbic_startCache + 166 (SentryCrashBinaryImageCache.c:166)
11 GarasiDealer                   0x524384 +[SentrySDK startWithOptions:] + 154 (SentrySDK.m:154)
12 GarasiDealer                   0x524484 +[SentrySDK startWithConfigureOptions:] + 166 (SentrySDK.m:166)
13 GarasiDealer                   0x599488 SqeIdSDK.init(clientId:mobileClientId:env:analytic:) + 64 (SqeIdSDK.swift:64)

Expected Result

Not crashed

Actual Result

Crashed when start SentrySDK

Are you willing to submit a PR?

No response

@getsantry getsantry bot moved this to Waiting for: Product Owner in GitHub Issues with 👀 Nov 30, 2023
@jimmy-sqe jimmy-sqe changed the title Crashes when start SentrySDK Crash when start SentrySDK Nov 30, 2023
@jimmy-sqe
Copy link
Author

jimmy-sqe commented Nov 30, 2023

Screenshot 2023-11-30 at 5 05 15 PM
I think the crashed happened in this line

@jimmy-sqe jimmy-sqe changed the title Crash when start SentrySDK Crashed when SentrySDK.start in iOS Nov 30, 2023
philipphofmann added a commit that referenced this issue Nov 30, 2023
Add synchronize to start and stop of SentryBinaryImage crash to avoid
threading issues that can lead to crashes.

Fixes GH-3462
philipphofmann added a commit that referenced this issue Nov 30, 2023
Add synchronize to start and stop of SentryBinaryImage crash to avoid
threading issues that can lead to crashes.

Fixes GH-3462
@philipphofmann
Copy link
Member

I also see this happening in our internal SDK crashes from time to time. I can reproduce this. PR is here #3468

@getsantry getsantry bot removed the status in GitHub Issues with 👀 Nov 30, 2023
@philipphofmann philipphofmann self-assigned this Nov 30, 2023
@philipphofmann philipphofmann moved this from Needs Discussion to Needs Review in Mobile & Cross Platform SDK Nov 30, 2023
@jimmy-sqe
Copy link
Author

Thank you @philipphofmann for notifying and responding this, can it be released soon? in which version of Sentry? since we have tight deadline for making it work, Thank you.

@getsantry getsantry bot moved this to Waiting for: Product Owner in GitHub Issues with 👀 Dec 1, 2023
philipphofmann added a commit that referenced this issue Dec 1, 2023
Add synchronize to start and stop of SentryBinaryImage crash to avoid
threading issues that can lead to crashes.

Fixes GH-3462
@github-project-automation github-project-automation bot moved this from Needs Review to Done in Mobile & Cross Platform SDK Dec 1, 2023
@philipphofmann
Copy link
Member

@jimmy-sqe, I plan on doing a hotfix today. This will be in 8.17.1.

@philipphofmann
Copy link
Member

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Archived in project
Archived in project
Development

Successfully merging a pull request may close this issue.

2 participants