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
[SR-10463] Crash in swift_getAssociatedTypeWitnessSlowImpl #52863
Comments
It turns out that this is because https://github.com/apple/swift/blob/master/stdlib/public/runtime/SwiftObject.mm#L1273 That code should probably not use the return value of the method. I'm still thinking about the proper solution but it'll be something like that. |
Comment by Johannes Plunien (JIRA) That's great news, thank you for fixing that issue so quickly Mike! |
joplunien (JIRA User), Could you verify if the problem is fixed and if so move the JIRA to "Closed"? Thanks! |
Comment by Prashant Rane (JIRA) I was getting similar crash on Xcode10.2.1 so I updated to `XCode 10.3 (10G8)` and `Apple Swift version 5.0.1 (swiftlang-1001.0.82.4 clang-1001.0.46.5)`. But still getting the same crash, here is top trace # OS Version: 12.3.1 (16F203)
# Device: iPhone 7
# RAM Free: 4.4%
# Disk Free: 23.7%
#​0. Crashed: com.apple.main-thread
0 libswiftCore.dylib 0x1e3fa7c64 swift_getAssociatedTypeWitnessSlowImpl(swift::MetadataRequest, swift::TargetWitnessTable<swift::InProcess>*, swift::TargetMetadata<swift::InProcess> const*, swift::TargetProtocolRequirement<swift::InProcess> const*, swift::TargetProtocolRequirement<swift::InProcess> const*) + 212
1 libswiftCore.dylib 0x1e3fa7c64 swift_getAssociatedTypeWitnessSlowImpl(swift::MetadataRequest, swift::TargetWitnessTable<swift::InProcess>*, swift::TargetMetadata<swift::InProcess> const*, swift::TargetProtocolRequirement<swift::InProcess> const*, swift::TargetProtocolRequirement<swift::InProcess> const*) + 212
2 libswiftCore.dylib 0x1e3fa6340 swift_getAssociatedTypeWitness + 176
3 libswiftCore.dylib 0x1e3e38dbc static _SwiftNewtypeWrapper<>._conditionallyBridgeFromObjectiveC(_:result:) + 76
4 Gojek 0x103461734 protocol witness for static _ObjectiveCBridgeable._conditionallyBridgeFromObjectiveC(_:result:) in conformance UIActivityType (<compiler-generated>)
5 libswiftCore.dylib 0x1e3f924a4 _bridgeNonVerbatimFromObjectiveCConditional<A>(_:_:_:) + 236
6 libswiftCore.dylib 0x1e3d3e968 _conditionallyBridgeFromObjectiveC<A>(_:_:) + 268
7 libswiftCore.dylib 0x1e3d92b68 _SwiftDeferredNSDictionary.object(forKey:) + 196
8 libswiftCore.dylib 0x1e3e64c30 @objc _SwiftDeferredNSDictionary.object(forKey:) + 44
9 UIFoundation 0x1c02f88b4 _NSReadAttributedStringFromURLOrData + 100
10 UIFoundation 0x1c02adb38 -[NSAttributedString(NSAttributedStringUIFoundationAdditions) initWithData:options:documentAttributes:error:] + 136 |
Comment by Prashant Rane (JIRA) 11 XYZApp 0x101cb4704 specialized @nonobjc NSMutableAttributedString.init(data:options:documentAttributes:) + 260
12 XYZApp 0x101cb3124 String.convertHTML() + 772 |
Comment by Prashant Rane (JIRA) my bad 🙁 I had to update to Swift 5.1, I would revert back on this |
Environment
Xcode 10.2 (Build version 10E125)
macOS 10.14.4 (18E226)
Simulator: iPhone 5s, 12.1
Apple Swift version 5.0 (swiftlang-1001.0.69.5 clang-1001.0.46.3)
Target: x86_64-apple-darwin18.5.0
Additional Detail from JIRA
md5: 8c1fdadfcc710ecee2c77cc83a4c0016
Issue Description:
Description
When updating to Xcode 10.2 we have noticed a new crash at runtime. I was able to reduce it to a minimal example. The same example project works just fine in Xcode 10.1.
The full example project can be found here: https://github.com/plu/SR-10463
Code
Crash
The text was updated successfully, but these errors were encountered: