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

[BUG] NSInvalidArgumentException for UIFont.withPreferredSize(forTextStyle:weight:) in Verification controller #3025

Open
nickdnk opened this issue Oct 27, 2023 · 0 comments

Comments

@nickdnk
Copy link

nickdnk commented Oct 27, 2023

Summary

I'm seeing multiple crashes with the following error:

UIFont+Stripe.swift - Line 79
[NSNull _getValue:forType:]: unrecognized selector sent to instance <address>

Trace:
Fatal Exception: NSInvalidArgumentException
0  CoreFoundation                 0xed5e0 __exceptionPreprocess
1  libobjc.A.dylib                0x2bc00 objc_exception_throw
2  CoreFoundation                 0x17deec +[NSObject(NSObject) _copyDescription]
3  CoreFoundation                 0x327a8 ___forwarding___
4  CoreFoundation                 0x173860 _CF_forwarding_prep_0
5  CoreText                       0x2d314 TDescriptorSource::CopySpliceFontForName(__CFString const*, __CFString const*, __CFNumber const*, __CFNumber const*, CTFontLegibilityWeight, __CFBoolean const*, __CFNumber const*, __CFString const*, __CFNumber const*, __CFNumber const*, __CFNumber const*, __CFNumber const*, unsigned int)
6  CoreText                       0x2cfac TDescriptorSource::CopySplicedDescriptorForName(__CFString const*, __CFString const*, __CFString const*, __CFNumber const*, __CFNumber const*, CTFontLegibilityWeight, __CFBoolean const*, __CFNumber const*, __CFString const*, __CFNumber const*, __CFNumber const*, __CFNumber const*, __CFNumber const*, unsigned int) const
7  CoreText                       0x5a4e4 TDescriptorSource::CopySplicedDescriptorsForRequest(__CFDictionary const*, unsigned long, __CFString const*, __CFNumber const*, __CFNumber const*, CTFontLegibilityWeight, __CFBoolean const*) const
8  CoreText                       0x59360 TDescriptorSource::CopyDescriptorsForRequest(__CFDictionary const*, __CFSet const*, CFComparisonResult (*)(void const*, void const*, void*), unsigned long, TCFRef<__CFArray const*>*) const
9  CoreText                       0xbaaa4 TDescriptorSource::CopyDescriptorForRequest(__CFDictionary const*, __CFSet const*, __CFDictionary const*, unsigned long) const
10 CoreText                       0x18734 TDescriptor::CreateMatchingDescriptorInternal(__CFSet const*, unsigned long) const
11 CoreText                       0x179c0 TDescriptor::InitBaseFont(unsigned long, double)
12 CoreText                       0x178e8 TDescriptor::Hash() const
13 UIFoundation                   0x2b14 -[_UIFontDescriptorCacheKey _hash]
14 UIFoundation                   0x294c -[_UIFontCacheKey _precalculateHash]
15 UIFoundation                   0x3a8c +[_UIFontCacheKey newFontCacheKeyWithFontDescriptor:pointSize:textStyleForScaling:pointSizeForScaling:maximumPointSizeAfterScaling:textLegibility:]
16 UIFoundation                   0x3800 +[UIFont _fontWithDescriptor:size:textStyleForScaling:pointSizeForScaling:maximumPointSizeAfterScaling:forIB:legibilityWeight:]
17 myApp                          0x1c063c UIFont.withPreferredSize(forTextStyle:weight:) + 79 (UIFont+Stripe.swift:79)
18 myApp                          0x7773d0 specialized static HTMLViewWithIconLabels.Styling.htmlStyle(for:shouldCenterText:) + 39 (IdentityUI.swift:39)
19 myApp                          0x774f74 HTMLViewWithIconLabels.configure(with:) + 72 (HTMLTextView.swift:72)
20 myApp                          0x74139c BiometricConsentViewController.init(brandLogo:consentContent:sheetController:) + 130 (BiometricConsentViewController.swift:130)
21 myApp                          0x726d98 specialized VerificationSheetFlowController.nextViewController(skipTestMode:staticContentResult:updateDataResult:sheetController:completion:) + 526 (VerificationSheetFlowController.swift:526)
22 myApp                          0x7086d4 closure #1 in VerificationSheetController.loadAndUpdateUI(skipTestMode:) + 108 (VerificationSheetFlowController.swift:108)
23 myApp                          0x1af5b8 partial apply for closure #1 in closure #1 in Future.observe(on:using:) + 53 (Async.swift:53)
24 myApp                          0x178e94 thunk for @escaping @callee_guaranteed () -> () (<compiler-generated>)
25 libdispatch.dylib              0x26a8 _dispatch_call_block_and_release
26 libdispatch.dylib              0x4300 _dispatch_client_callout
27 libdispatch.dylib              0x12998 _dispatch_main_queue_drain
28 libdispatch.dylib              0x125b0 _dispatch_main_queue_callback_4CF
29 CoreFoundation                 0x379bc __CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE__
30 CoreFoundation                 0x346c8 __CFRunLoopRun
31 CoreFoundation                 0x33e18 CFRunLoopRunSpecific
32 GraphicsServices               0x35ec GSEventRunModal
33 UIKitCore                      0x22f350 -[UIApplication _run]
34 UIKitCore                      0x22e98c UIApplicationMain
35 myApp                          0x7a74 main + 16 (AppDelegate.swift:16)
36 ???                            0x1c698bd44 (Missing)

Code to reproduce

iOS version

17.0.2
iPhone 12 Pro Max (real device)

Installation method

SPM

SDK version

23.15.0

Other information

n/a

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

2 participants