[SR-12384] Swift._bridgeCocoaString crashes with -[NSNull _fastCStringContents:]: unrecognised selector
#54821
Labels
bug
A deviation from expected or documented behavior. Also: expected but undesirable behavior.
standard library
Area: Standard library umbrella
Attachment: Download
Additional Detail from JIRA
md5: 63095b9422c8a95e0fd00bc7f1f0dc44
Issue Description:
We have received these crash logs from a single user. They happened 8 times in a row, so it looks fairly consistent. My assumption is that the underlying cocoa string is (somehow)
NSNull
, and_bridgeCocoaString
fails to handle this. I've attached one of the crash logs (the stack traces are identical on all of them).Things of notice:
Device was running 13.3.
The last function in the stack trace that we control (
makePurchaseInfo
) has only two calls to something that returns a String before dispatching code using a closure that is not listed in the stack trace:A call to another class we own that reads the receipt using
Bundle.main.appStoreReceiptURL
and that eventually returns the data asreceiptData.base64EncodedString()
. However this class name is not in the stack trace, so I find it unlikely to be this.SKPaymentTransaction.payment.productIdentifier
My belief is that one of these things pointed to a
NSNull
instance instead of something_bridgeCocoaString
understands. That's as much as I could gather from my code and from quickly glancing atStringBridge.swift
in the stdlib folder of the Swift repo.I'm ready to provide more info in case it is needed.
The text was updated successfully, but these errors were encountered: