You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It would appear that in Swift 2.1, in the App Store build compiled with Xcode 7.2, the `sortInPlace( isOrderedBefore: (Int, Int) -> Bool )` has an error in the compiled code that causes a crash. Curiously, the problem manifests itself only in App Store builds, making it difficult to detect for development teams. We believe that something may be happening in the archiving process previous to uploading a build to iTunesConnect, as the problem does not occur when building locally in release mode.
We found the problem to occur with 17-20 or more elements in the array to be sorted (that is, the problem starts to occur around 17-20 elements and always occurs with more than 20 elements). This arbitrary number was confirmed independently when we came across this StackOverflow question outlining the same issue that we were having (see the end of the question): http://stackoverflow.com/questions/33444460/swift-2-1-error-sorting-in-place-only-on-release-builds . We suspect the number to be related to the following lines in the Swift source code:
Additional Detail from JIRA
md5: f53239eaaab6859b6e8c0abedfa2b145
Issue Description:
It would appear that in Swift 2.1, in the App Store build compiled with Xcode 7.2, the `sortInPlace( isOrderedBefore: (Int, Int) -> Bool )` has an error in the compiled code that causes a crash. Curiously, the problem manifests itself only in App Store builds, making it difficult to detect for development teams. We believe that something may be happening in the archiving process previous to uploading a build to iTunesConnect, as the problem does not occur when building locally in release mode.
We found the problem to occur with 17-20 or more elements in the array to be sorted (that is, the problem starts to occur around 17-20 elements and always occurs with more than 20 elements). This arbitrary number was confirmed independently when we came across this StackOverflow question outlining the same issue that we were having (see the end of the question): http://stackoverflow.com/questions/33444460/swift-2-1-error-sorting-in-place-only-on-release-builds . We suspect the number to be related to the following lines in the Swift source code:
swift/stdlib/public/core/Sort.swift.gyb
Lines 194 to 198 in 99fcb2d
It is also worth mentioning that Bitcode is disabled.
Here is the relevant portion of our code:
(The linked StackOverflow question also provides a reproducible base case.)
The current workaround is to refactor the code to use `sort` instead of `sortInPlace`.
Is this the correct place to report this issue?
The text was updated successfully, but these errors were encountered: