sentry-cocoa icon indicating copy to clipboard operation
sentry-cocoa copied to clipboard

iOS SDK Crash at SEGV_ACCERR Sentry __50-[SentryDispatchQueueWrapper dispatchAfter:block:]_block_invoke

Open kidGuo opened this issue 2 years ago • 10 comments

Environment

SaaS (https://sentry.io/)

Steps to Reproduce

In my App, I use iOS SDK of 8.7.1 version.

in Podfile pod 'Sentry', :git => 'https://github.com/getsentry/sentry-cocoa.git', :tag => '8.7.1'

the backtrace belows:

0 ??? 000000000000000000 000000000000000000 + 0 1 Sentry __50-[SentryDispatchQueueWrapper dispatchAfter:block:]_block_invoke + 40 2 libdispatch.dylib __dispatch_client_callout + 20 3 libdispatch.dylib __dispatch_continuation_pop + 504 4 libdispatch.dylib __dispatch_source_invoke + 1588 5 libdispatch.dylib __dispatch_lane_serial_drain + 376 6 libdispatch.dylib __dispatch_lane_invoke + 384 7 libdispatch.dylib __dispatch_workloop_worker_thread + 652 8 libsystem_pthread.dylib __pthread_wqthread + 288

Expected Result

I try to fix ,but no work:

  • (void)dispatchAfter:(NSTimeInterval)interval block:(dispatch_block_t)block { dispatch_block_t _block = [block copy];

      dispatch_time_t delta = (int64_t)(interval * NSEC_PER_SEC);
      dispatch_time_t when = dispatch_time(DISPATCH_TIME_NOW, delta);
      dispatch_after(when, _queue, ^{
          @autoreleasepool {
              if (_block) {
                  _block();
              }
          }
      });
    

}

Actual Result

Screenshot 2023-06-26 at 15 54 10

Product Area

Issues

Link

No response

DSN

No response

Version

No response

kidGuo avatar Jun 26 '23 07:06 kidGuo

Assigning to @getsentry/support for routing ⏲️

getsantry[bot] avatar Jun 26 '23 07:06 getsantry[bot]

Routing to @getsentry/product-owners-issues for triage ⏲️

getsantry[bot] avatar Jun 26 '23 16:06 getsantry[bot]

Hello @kidGuo, thanks for reaching out. Can you reproduce this in a clean project? I cant reproduce this, if you could share a repro would helps us a lot.

brustolin avatar Jun 28 '23 06:06 brustolin

Hello @kidGuo, thanks for reaching out. Can you reproduce this in a clean project? I cant reproduce this, if you could share a repro would helps us a lot.

I'm sorry, I'm unable to reproduce it in a clean project. Even in our app, I haven't been able to reproduce it. All I can see is the crash logs reported by users.

kidGuo avatar Jun 28 '23 17:06 kidGuo

Thanks, we will keep investigating.

brustolin avatar Jun 29 '23 13:06 brustolin

We did not manage to reproduce this. We need more reports to be able to investigate this further.

brustolin avatar Aug 02 '23 12:08 brustolin

This could be related to https://github.com/getsentry/sentry-cocoa/issues/3320. We see this crash happen frequently here.

philipphofmann avatar Oct 02 '23 13:10 philipphofmann

Hi, i faced same issue sentry pod , v 8.2.0

crash: __50-[SentryDispatchQueueWrapper dispatchAfter:block:]_block_invoke + 56

mr-grey avatar Feb 09 '24 13:02 mr-grey

@mr-grey Would you be able to share a reproducible example?

We are unable to reproduce it at the moment.

krystofwoldrich avatar Feb 14 '24 08:02 krystofwoldrich

pod 'Sentry', '~> 8.2.0'

It happens some time, i think it can be caused included some libs used by our App. for example last crash log: Screenshot 2024-02-23 at 11 51 32

mr-grey avatar Feb 23 '24 09:02 mr-grey