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

Crash at FPRTraceBackgroundActivityTracker.m #14273

Open
ValentineVV opened this issue Dec 19, 2024 · 6 comments
Open

Crash at FPRTraceBackgroundActivityTracker.m #14273

ValentineVV opened this issue Dec 19, 2024 · 6 comments
Assignees

Comments

@ValentineVV
Copy link

ValentineVV commented Dec 19, 2024

Crash at FPRTraceBackgroundActivityTracker.m

Here is stacktrace

          Crashed: com.apple.main-thread
0  libobjc.A.dylib                0x9748 objc_moveWeak + 196
1  CoreFoundation                 0x50a94 _CFXNotificationRegistrarAddObserver + 392
2  CoreFoundation                 0x4f864 CFXNotificationRegistrarAdd + 580
3  CoreFoundation                 0x4f040 _CFXNotificationRegisterObserver + 248
4  FirebasePerformance            0x1c9f4 __41-[FPRTraceBackgroundActivityTracker init]_block_invoke + 44 (FPRTraceBackgroundActivityTracker.m:44)
5  libdispatch.dylib              0x213c _dispatch_call_block_and_release + 32
6  libdispatch.dylib              0x3dd4 _dispatch_client_callout + 20
7  libdispatch.dylib              0x125a4 _dispatch_main_queue_drain + 988
8  libdispatch.dylib              0x121b8 _dispatch_main_queue_callback_4CF + 44
9  CoreFoundation                 0x56710 __CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE__ + 16
10 CoreFoundation                 0x53914 __CFRunLoopRun + 1996
11 CoreFoundation                 0x52cd8 CFRunLoopRunSpecific + 608
12 GraphicsServices               0x11a8 GSEventRunModal + 164
13 UIKitCore                      0x40a90c -[UIApplication _run] + 888
14 UIKitCore                      0x4be9d0 UIApplicationMain + 340
15 App                          0x844f4 main + 36 (KAAppDelegate.swift:36)
16 ???                            0x1c3b51e4c (Missing)

Reproducing the issue

We don't know a 100% way to reproduce it, but looks like the crash happens when user moves app to background and then back to the foreground

Firebase SDK Version

11.6.0

Xcode Version

16.1

Installation Method

CocoaPods

Firebase Product(s)

Performance, Crashlytics, Remote Config, Analytics

Targeted Platforms

iOS

Relevant Log Output

If using Swift Package Manager, the project's Package.resolved

Expand Package.resolved snippet
Replace this line with the contents of your Package.resolved.

If using CocoaPods, the project's Podfile.lock

Expand Podfile.lock snippet
Replace this line with the contents of your Podfile.lock!
@google-oss-bot
Copy link

I couldn't figure out how to label this issue, so I've labeled it for a human to triage. Hang tight.

@MichaelVerdon
Copy link

I am unable to reproduce this issue, is there any more information you can give?

@ValentineVV
Copy link
Author

@MichaelVerdon I have investigated the analytics and most of the time the crash happens when user moves app to the background and then returns it to the foreground or during the first app launch. But sometimes it happens randomly, so I hope this information will help you

@MichaelVerdon
Copy link

Thanks for your response, when I failed to reproduce the issue I had ran a bunch of simulations but I was using the latest IOS version, is this issue happening on a particular IOS version like an older one?

@ValentineVV
Copy link
Author

@MichaelVerdon not really, it reproducible for any of these versions: 17.4.1, 18.1.1, 18.0.1, 17.4.0, 17.6.1, 16.6.0 and others. There is no specific version to reproduce it.

I also found a little bit more verbose stacktrace, I hope that it could help you somehow

          Crashed: org.alamofire.session.rootQueue
0  libobjc.A.dylib                0xfda8 objc_moveWeak + 196
1  CoreFoundation                 0x554c4 _CFXNotificationRegistrarAddObserver + 392
2  CoreFoundation                 0x54f0c CFXNotificationRegistrarAdd + 580
3  CoreFoundation                 0x54880 _CFXNotificationRegisterObserver + 248
4  FirebasePerformance            0x1c7b8 -[FPRTraceBackgroundActivityTracker init] + 44 (FPRTraceBackgroundActivityTracker.m:44)
5  FirebasePerformance            0x11bf4 -[FPRNetworkTrace start] + 198 (FPRNetworkTrace.m:198)
6  FirebasePerformance            0x17a68 __InstrumentDataTaskWithRequest_block_invoke + 276 (FPRNSURLSessionInstrument.m:276)
7  Alamofire                      0x2d82c DataStreamRequest.task(for:using:) + 122 (DataRequest.swift:122)
8  Alamofire                      0xbc690 Session.didCreateURLRequest(_:for:) + 1188 (Session.swift:1188)
9  Alamofire                      0xca120 partial apply for closure #3 in Session.performSetupOperations(for:convertible:shouldCreateTask:) + 72
10 Alamofire                      0x88dc4 thunk for @escaping @callee_guaranteed () -> () + 28 (<compiler-generated>:28)
11 libdispatch.dylib              0x213c _dispatch_call_block_and_release + 32
12 libdispatch.dylib              0x3dd4 _dispatch_client_callout + 20
13 libdispatch.dylib              0xb400 _dispatch_lane_serial_drain + 748
14 libdispatch.dylib              0xbf64 _dispatch_lane_invoke + 432
15 libdispatch.dylib              0xb284 _dispatch_lane_serial_drain + 368
16 libdispatch.dylib              0xbf30 _dispatch_lane_invoke + 380
17 libdispatch.dylib              0x16cb4 _dispatch_root_queue_drain_deferred_wlh + 288
18 libdispatch.dylib              0x16528 _dispatch_workloop_worker_thread + 404
19 libsystem_pthread.dylib        0x1f20 _pthread_wqthread + 288
20 libsystem_pthread.dylib        0x1fc0 start_wqthread + 8

@ValentineVV
Copy link
Author

ValentineVV commented Jan 8, 2025

Also, here is the link to the previous issue that has been fixed in 11.6.0. Probably, that fix may be connected to the new issues that I created.

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

No branches or pull requests

5 participants