Instabug / Instabug-iOS

In-app feedback and bug reporting tool for apps.
https://instabug.com/
Other
288 stars 67 forks source link

EXC_BREAKPOINT: NetworkTasksListener.createTask #475

Closed nburyak closed 6 months ago

nburyak commented 8 months ago

Steps to Reproduce the Problem

The crash was noticed in Sentry crash-monitor

Actual Behavior

The app crashes

Instabug integration code

        Instabug.start(withToken: BuildConfiguration.shared.instabugApplicationIdentifier, invocationEvents: [.screenshot])
        Instabug.welcomeMessageMode = .disabled
        Instabug.reproStepsMode = .disable
        Instabug.setColorTheme(.dark)
        Instabug.tintColor = .lightGray

SDK Version

11.14.0

iOS Version

17.0.3

Device Model

iPhone 11 Pro Max

Crash Log

Crash Log 1

Thread 0 Crashed:
0   CoreFoundation                  0x322d6d5f4         CF_IS_OBJC
1   CoreFoundation                  0x322d73470         [inlined] CFRelease
2   CoreFoundation                  0x322d73470         CFRelease
3   CFNetwork                       0x3250f8148         _CFHTTPServerResponseEnqueue
4   CoreFoundation                  0x322d72abc         _CFRelease
5   CFNetwork                       0x324fce52c         _CFStreamErrorFromCFError
6   CoreFoundation                  0x322d72abc         _CFRelease
7   CFNetwork                       0x324fb04b4         CFURLConnectionInvalidateConnectionCache
8   libobjc.A.dylib                 0x313561350         object_cxxDestructFromClass
9   libobjc.A.dylib                 0x31356108c         objc_destructInstance
10  libobjc.A.dylib                 0x313561038         _objc_rootDealloc
11  CFNetwork                       0x3250dcad4         CFHTTPCookieStorageUnscheduleFromRunLoop
12  CFNetwork                       0x3250dda58         CFHTTPCookieStorageUnscheduleFromRunLoop
13  Foundation                      0x320d8bf98         _MutableHandle.__deallocating_deinit
14  libswiftCore.dylib              0x315a50d84         _swift_release_dealloc
15  libswiftCore.dylib              0x315a52420         swift::RefCounts<T>::doDecrementSlow<T>
16  libswiftCore.dylib              0x3157dd970         String.init<T>
17  Instabug                        0x109bffe94         NetworkTasksListener.createTask
18  Instabug                        0x109c0013c         NetworkTasksListener.taskDidStart
19  Instabug                        0x109cbc9b4         __71-[IBGSwizzler newImplementatioDataTaskDidResume:selector:swizzlerInfo:]_block_invoke_3
20  libdispatch.dylib               0x332bbc6a4         _dispatch_call_block_and_release
21  libdispatch.dylib               0x332bbe2fc         _dispatch_client_callout
22  libdispatch.dylib               0x332bcc994         _dispatch_main_queue_drain
23  libdispatch.dylib               0x332bcc5ac         _dispatch_main_queue_callback_4CF
24  CoreFoundation                  0x322d9d9b8         __CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE__
25  CoreFoundation                  0x322d9a6c4         __CFRunLoopRun
26  CoreFoundation                  0x322d99e14         CFRunLoopRunSpecific
27  GraphicsServices                0x3a83535e8         GSEventRunModal
28  UIKitCore                       0x3273bb2f8         -[UIApplication _run]
29  UIKitCore                       0x3273ba934         UIApplicationMain
30  <redacted>                            0x2048b9488         main (AppDelegate.swift:10)
31  <unknown>                       0x1bd89fd44         <redacted>

Crash Log 2

Thread 0 Crashed:
0   CoreFoundation                  0x329e195f4         CF_IS_OBJC
1   CoreFoundation                  0x329e37e84         [inlined] CFDictionaryGetCount
2   CoreFoundation                  0x329e37e84         CFDictionaryGetCount
3   CFNetwork                       0x32c1a4208         _CFHTTPServerResponseEnqueue
4   CFNetwork                       0x32c18be30         CFHTTPCookieStorageUnscheduleFromRunLoop
5   Instabug                        0x10822658c         -[NSURLRequest(Additions) ibg_isWebViewRequest]
6   Instabug                        0x1081f8444         -[IBGNetworkLoggerController canServeRequest:]
7   Instabug                        0x10828bd64         NetworkTasksListener.createTask
8   Instabug                        0x10828c13c         NetworkTasksListener.taskDidStart
9   Instabug                        0x1083489b4         __71-[IBGSwizzler newImplementatioDataTaskDidResume:selector:swizzlerInfo:]_block_invoke_3
10  libdispatch.dylib               0x339c686a4         _dispatch_call_block_and_release
11  libdispatch.dylib               0x339c6a2fc         _dispatch_client_callout
12  libdispatch.dylib               0x339c78994         _dispatch_main_queue_drain
13  libdispatch.dylib               0x339c785ac         _dispatch_main_queue_callback_4CF
14  CoreFoundation                  0x329e499b8         __CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE__
15  CoreFoundation                  0x329e466c4         __CFRunLoopRun
16  CoreFoundation                  0x329e45e14         CFRunLoopRunSpecific
17  GraphicsServices                0x3af3ff5e8         GSEventRunModal
18  UIKitCore                       0x32e4672f8         -[UIApplication _run]
19  UIKitCore                       0x32e466934         UIApplicationMain
20  <redacted>                            0x202e65488         main (AppDelegate.swift:10)
21  <unknown>                       0x1c4947d44         <redacted>
stale[bot] commented 8 months ago

This issue has been automatically marked as stale due to inactivity. It will be closed if no further activity occurs. Thank you for your contributions.

stale[bot] commented 8 months ago

This issue has been automatically closed due to inactivity.

agustindeleon7 commented 8 months ago

@nburyak Were you able to fix this crash?

nburyak commented 8 months ago

@agustindeleon7 No, unfortunately, the issue is still present. We have around 1.3k crashes based on Sentry data. There are no steps to reproduce the issue and the crash log doesn't point to any place in our code, which could potentially lead to a crash.

image
EyadHeikal commented 8 months ago

@nburyak @agustindeleon7 We're looking into it now and we will get back to you as soon as possible.

stale[bot] commented 8 months ago

This issue has been automatically closed due to inactivity.

stale[bot] commented 7 months ago

This issue has been automatically marked as stale due to inactivity. It will be closed if no further activity occurs. Thank you for your contributions.

nburyak commented 7 months ago

Unfortunately, the issue is still present with thousands of occurrences. Let me know, if I can help in the investigation

stale[bot] commented 7 months ago

This issue has been automatically marked as stale due to inactivity. It will be closed if no further activity occurs. Thank you for your contributions.

fzy-github commented 7 months ago

We are seeing the same crash as well - also found via sentry reporting:

Thread 0 Crashed:
0   libobjc.A.dylib                 0x34483a820         objc_msgSend
1   CFNetwork                       0x3547adb04         _CFNetworkHTTPConnectionCacheSetLimit
2   CFNetwork                       0x35476f4f8         CFHTTPCookieCopyRequestHeaderFields
3   Instabug                        0x10aa54a9c         -[NSURLRequest(Additions) ibg_isWebViewRequest]
4   Instabug                        0x10aa266d0         -[IBGNetworkLoggerController canServeRequest:]
5   Instabug                        0x10aabea3c         NetworkTasksListener.createTask
6   Instabug                        0x10aabeed0         NetworkTasksListener.taskDidStart
7   Instabug                        0x10ab81c28         __71-[IBGSwizzler newImplementatioDataTaskDidResume:selector:swizzlerInfo:]_block_invoke_3
8   libdispatch.dylib               0x3610ca31c         _dispatch_call_block_and_release
9   libdispatch.dylib               0x3610cbea8         _dispatch_client_callout
10  libdispatch.dylib               0x3610da6a0         _dispatch_main_queue_drain
11  libdispatch.dylib               0x3610da2f0         _dispatch_main_queue_callback_4CF
12  CoreFoundation                  0x3527c6c24         __CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE__
13  CoreFoundation                  0x3527a855c         __CFRunLoopRun
14  CoreFoundation                  0x3527ad3e8         CFRunLoopRunSpecific
15  GraphicsServices                0x3c9257358         GSEventRunModal
16  UIKitCore                       0x356ba8f54         -[UIApplication _run]
17  UIKitCore                       0x356ba8bb8         UIApplicationMain
18  SwiftUI                         0x359a12c4c         OUTLINED_FUNCTION_895
19  SwiftUI                         0x3599791e8         block_copy_helper.1
20  SwiftUI                         0x359963290         OUTLINED_FUNCTION_901
21  My iOSapp                       0x204eb4bc0         [inlined] AppLauncher.main
22  My iOSapp                       0x204eb4bc0         [inlined] AppLauncher.$main (<compiler-generated>:6)
23  My iOSapp                       0x204eb4bc0         main
24  <unknown>                       0x1eacacdec         <redacted>

// other threads

Thread 5
0   libsystem_kernel.dylib          0x3d06acca4         mach_msg2_trap
1   libsystem_kernel.dylib          0x3d06bfb70         mach_msg2_internal
2   libsystem_kernel.dylib          0x3d06bfe48         mach_msg_overwrite
3   libsystem_kernel.dylib          0x3d06ad1e4         mach_msg
4   Instabug                        0x10ad2bd38         exception_server_thread
5   libsystem_pthread.dylib         0x4123a36b4         _pthread_start
fzy-github commented 6 months ago

any update on the investigation/potential fix? - we are seeing this quite often as well as @nburyak reported

Here's a simmilar stacktracke we have in our crash logs:

OS Version: iOS 17.1.2 (21B101)
Report Version: 104

Exception Type: EXC_BREAKPOINT (SIGTRAP)
Crashed Thread: 0

Application Specific Information:
calling C++ destructors for class %s

Thread 0 Crashed:
0   CoreFoundation                  0x334fb6e44         CF_IS_OBJC
1   CoreFoundation                  0x334fc24ec         [inlined] CFRetain
2   CoreFoundation                  0x334fc24ec         CFRetain
3   CFNetwork                       0x33722bbb8         _CFStreamErrorFromCFError
4   CFNetwork                       0x33722c080         _CFStreamErrorFromCFError
5   CFNetwork                       0x33735e7b4         _CFHTTPServerResponseEnqueue
6   CFNetwork                       0x33720e3ac         CFURLConnectionInvalidateConnectionCache
7   CFNetwork                       0x33733b20c         CFHTTPCookieStorageUnscheduleFromRunLoop
8   Foundation                      0x33303332c         URLRequest._unconditionallyBridgeFromObjectiveC
9   Instabug                        0x10666a990         NetworkTasksListener.createTask
10  Instabug                        0x10666aed0         NetworkTasksListener.taskDidStart
11  Instabug                        0x10672dc28         __71-[IBGSwizzler newImplementatioDataTaskDidResume:selector:swizzlerInfo:]_block_invoke_3
12  libdispatch.dylib               0x344f246a4         _dispatch_call_block_and_release
13  libdispatch.dylib               0x344f262fc         _dispatch_client_callout
14  libdispatch.dylib               0x344f34994         _dispatch_main_queue_drain
15  libdispatch.dylib               0x344f345ac         _dispatch_main_queue_callback_4CF
16  CoreFoundation                  0x334fe7208         __CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE__
17  CoreFoundation                  0x334fe3f14         __CFRunLoopRun
18  CoreFoundation                  0x334fe3664         CFRunLoopRunSpecific
19  GraphicsServices                0x3bb7a95e8         GSEventRunModal
20  UIKitCore                       0x3396242b0         -[UIApplication _run]
21  UIKitCore                       0x3396238ec         UIApplicationMain
22  SwiftUI                         0x33daf20f8         OUTLINED_FUNCTION_31
23  SwiftUI                         0x33daf1f3c         OUTLINED_FUNCTION_31
24  SwiftUI                         0x33d763864         OUTLINED_FUNCTION_26
25  SampleApp                       0x200913114         [inlined] AppLauncher.main
26  SampleApp                       0x200913114         [inlined] AppLauncher.$main (<compiler-generated>:6)
27  SampleApp                       0x200913114         main
28  <unknown>                       0x1cfd32dcc         <redacted>
ahmedsalah196 commented 6 months ago

This should be fixed in 12.5.0. Feel free to reopen if the issue persists.