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

Crashes off the main thread in line 25 in UserAgentService #988

Closed
jsligh opened this issue May 29, 2024 · 6 comments · Fixed by #989
Closed

Crashes off the main thread in line 25 in UserAgentService #988

jsligh opened this issue May 29, 2024 · 6 comments · Fixed by #989
Assignees
Labels

Comments

@jsligh
Copy link
Collaborator

jsligh commented May 29, 2024

From #976

There's something off with this. We're seeing a lot of crashes off the main thread in line 25 in UserAgentService private let webView = WKWebView(). WKWebView is supposed to run its init on main

      Crashed: PBMAdLoadFlowController_F13FBE0A-D142-4A42-949C-6D66A5725EC8
0  WebKit                         0x4fd8 <redacted> + 20
1  WebKit                         0x3139c8 <redacted> + 94
2  libc++.1.dylib                 0x13864 std::__1::__call_once(unsigned long volatile&, void*, void (*)(void*)) + 180
3  WebKit                         0x3119e4 <redacted> + 84
4  WebKit                         0x41e6d4 <redacted> + 64
5  WebKit                         0x3df658 <redacted> + 56
6  PrebidMobile                   0xe46c8 @objc UserAgentService.init() + 25 (UserAgentService.swift:25)
7  PrebidMobile                   0xe43f4 one-time initialization function for shared + 21 (UserAgentService.swift:21)
8  libdispatch.dylib              0x3dd4 _dispatch_client_callout + 20
9  libdispatch.dylib              0x5654 _dispatch_once_callout + 32
10 PrebidMobile                   0xcf64c @objc PrebidServerConnection.init() + 21 (UserAgentService.swift:21)
11 PrebidMobile                   0xcd348 one-time initialization function for shared + 31 (PrebidServerConnection.swift:31)
12 libdispatch.dylib              0x3dd4 _dispatch_client_callout + 20
13 libdispatch.dylib              0x5654 _dispatch_once_callout + 32
14 PrebidMobile                   0x74c5c closure #1 in BannerView.init(frame:configID:adSize:eventHandler:) + 31 (PrebidServerConnection.swift:31)
15 PrebidMobile                   0x78210 thunk for @escaping @callee_guaranteed (@guaranteed AdUnitConfig) -> (@owned PBMBidRequesterProtocol) + 48 (<compiler-generated>:48)
16 PrebidMobile                   0xbca4 -[PBMAdLoadFlowController sendBidRequest] + 214 (PBMAdLoadFlowController.m:214)
17 PrebidMobile                   0xbc00 -[PBMAdLoadFlowController tryLaunchingAdRequestFlow] + 208 (PBMAdLoadFlowController.m:208)
18 PrebidMobile                   0xb9b0 __34-[PBMAdLoadFlowController refresh]_block_invoke + 155 (PBMAdLoadFlowController.m:155)
19 PrebidMobile                   0xb890 __45-[PBMAdLoadFlowController enqueueGatedBlock:]_block_invoke + 144 (PBMAdLoadFlowController.m:144)
20 libdispatch.dylib              0x213c _dispatch_call_block_and_release + 32
21 libdispatch.dylib              0x3dd4 _dispatch_client_callout + 20
22 libdispatch.dylib              0xb400 _dispatch_lane_serial_drain + 748
23 libdispatch.dylib              0xbf30 _dispatch_lane_invoke + 380
24 libdispatch.dylib              0x16cb4 _dispatch_root_queue_drain_deferred_wlh + 288
25 libdispatch.dylib              0x16528 _dispatch_workloop_worker_thread + 404
26 libsystem_pthread.dylib        0x1f20 _pthread_wqthread + 288
27 libsystem_pthread.dylib        0x1fc0 start_wqthread + 8
    

Originally posted by @weibel in #976 (comment)

@YuriyVelichkoPI
Copy link
Contributor

Hi, @weibel!

While @jsligh and @OlenaPostindustria are working on the fix can you share where you initialize the SDK? In application:didFinishLaunchingWithOptions ?

@weibel
Copy link
Contributor

weibel commented May 29, 2024

@YuriyVelichkoPI Yes we call Prebid.initializeSDK in application:didFinishLaunchingWithOptions

@github-project-automation github-project-automation bot moved this from In Progress to Done in Prebid Mobile Prioritization May 30, 2024
@chwo
Copy link

chwo commented Jun 6, 2024

Hi @jsligh Can you please publish this fix ASAP as a new sdk release. What is you timeline for this release?

Because at the moment the sdk version 2.2.0 does not work as expected (missing UA parameter) but we cannot update to the sdk version 2.2.2 where the UA parameter is fixed because of this crash.

@jsligh
Copy link
Collaborator Author

jsligh commented Jun 6, 2024

@chwo we plan on releasing a patch version by end of day tomorrow.

@jsligh
Copy link
Collaborator Author

jsligh commented Jun 7, 2024

@chwo @weibel https://github.com/prebid/prebid-mobile-ios/releases/tag/2.2.3

@chwo
Copy link

chwo commented Jun 10, 2024

@jsligh Thank you for quickly providing the new release.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

4 participants