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

closure #1 in AptabaseClient.stopPolling() + 1 (AptabaseClient.swift:64) #23

Open
kunalzigma opened this issue Jul 11, 2024 · 4 comments

Comments

@kunalzigma
Copy link

Am seeing one crash after adding this sdk after 4-5 days in my app running on user's device, after ~3k sessions

Thread 3:
0   libsystem_pthread.dylib       	0x00000001f66040c4 start_wqthread + 0 (:-1)

Thread 4 Crashed:
0   libswiftCore.dylib            	0x00000001983ff354 _swift_release_dealloc + 32 (HeapObject.cpp:832)
1   libswiftCore.dylib            	0x0000000198400488 bool swift::RefCounts<swift::RefCountBitsT<(swift::RefCountInlinedness)1>>::doDecrementSlow<(swift::PerformDeinit)1>(swift::RefCountBitsT<(swift::RefCountInlinedness)1>, unsigned int) + 136 (RefCount.h:0)
2   MyApp                       	0x0000000100986c88 destroy for Event + 68 (<compiler-generated>:0)
3   libswiftCore.dylib            	0x00000001983e493c swift_arrayDestroy + 196 (Array.cpp:223)
4   libswiftCore.dylib            	0x00000001980f09f4 _ContiguousArrayStorage.__deallocating_deinit + 96 (ContiguousArrayBuffer.swift:81)
5   libswiftCore.dylib            	0x00000001983ff36c _swift_release_dealloc + 56 (HeapObject.cpp:832)
6   libswiftCore.dylib            	0x0000000198400488 bool swift::RefCounts<swift::RefCountBitsT<(swift::RefCountInlinedness)1>>::doDecrementSlow<(swift::PerformDeinit)1>(swift::RefCountBitsT<(swift::RefCountInlinedness)1>, unsigned int) + 136 (RefCount.h:0)
7   MyApp                                0x0000000100985530 EventDispatcher.flush() + 52 (<compiler-generated>:0)
8   MyApp                                0x0000000100981c71 closure #1 in AptabaseClient.stopPolling() + 1 (AptabaseClient.swift:64)
9   MyApp                                0x0000000100982395 partial apply for closure #1 in AptabaseClient.stopPolling() + 1 (<compiler-generated>:0)
10  MyApp                                0x0000000100982241 specialized thunk for @escaping @callee_guaranteed @Sendable @async () -> (@out A) + 1 (<compiler-generated>:0)
11  MyApp                                0x000000010098245d thunk for @escaping @callee_guaranteed @Sendable @async () -> (@out A)specialized partial apply + 1 (<compiler-generated>:0)
12  libswift_Concurrency.dylib    	0x00000001a4afa775 completeTaskWithClosure(swift::AsyncContext*, swift::SwiftError*) + 1 (Task.cpp:463)
@kunalzigma
Copy link
Author

Attaching the crash report. Very strange as the crash report is not telling if this crash is foreground or background. and am calling events in applicationDidEnterBackground and applicationWillEnterForeground. This happens after like 11k such events.
2024-07-10_01-01-33.4355_+0300-60b4e27f86a27790a8803c64c308168f1fafc81d.crash.zip

@cristipufu
Copy link
Member

@Claeysson @dalenjohnson any hints into why would this be happening?

@cristipufu
Copy link
Member

@kunalzigma

  • which library version are you using?
  • are you manually calling flush()?

@kunalzigma
Copy link
Author

kunalzigma commented Jul 11, 2024

  • 0.3.9
  • no. only Aptabase.shared.trackEvent("eventnames") and Aptabase.shared.initialize(appKey: "appkey"). nothing else.

Aptabase.shared.initialize(appKey: "appkey") in didFinishLaunchingWithOptions in AppDelegate

Aptabase.shared.trackEvent("eventnames") in applicationDidEnterBackground and applicationWillEnterForeground to track if users have minimized the app and come back or not.

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

No branches or pull requests

2 participants