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

[release/7.0.1xx-xcode14-rc2] [UIKit] Change UITextInput.SelectedTextRange to not be ArgumentSemantic.Copy. Fixes #15677. #16277

Conversation

vs-mobiletools-engineering-service2
Copy link
Collaborator

When a property is declared as ArgumentSemantic.Copy, we'll copy the input value in property setters.

Unfortunately this makes UIKit crash, because for
UITextField.SelectedTextRange UIKit might use a custom UITextRange subclass,
with a broken 'copy' implementation (doesn't copy all the fields), that
subsequently makes the app crash.

On the other hand, UITextRange doesn't conform to NSCopying, and as such is in
theory not necessarily copyable, and thus I believe the bug is really that the
property is declared as a 'copy' property.

Fixes #15677.

Backport of #16201

…ic.Copy. Fixes xamarin#15677.

When a property is declared as ArgumentSemantic.Copy, we'll copy the input value in property setters.

Unfortunately this makes UIKit crash, because for
UITextField.SelectedTextRange UIKit might use a custom UITextRange subclass,
with a broken 'copy' implementation (doesn't copy all the fields), that
subsequently makes the app crash.

On the other hand, UITextRange doesn't conform to NSCopying, and as such is in
theory not necessarily copyable, and thus I believe the bug is really that the
property is declared as a 'copy' property.

Fixes xamarin#15677.
@vs-mobiletools-engineering-service2
Copy link
Collaborator Author

🔥 [PR Build] Build failed 🔥

Build failed for the job 'Build packages'

Pipeline on Agent
Hash: [PR build]

@vs-mobiletools-engineering-service2
Copy link
Collaborator Author

🔥 Failed to compare API and create generator diff 🔥

Failed to run apidiff

Pipeline on Agent
Hash: 80ca348218c264d28bf54ed966b51c336acc5406 [PR build]

@vs-mobiletools-engineering-service2
Copy link
Collaborator Author

❌ [PR Build] Tests on macOS Mac Catalina (10.15) failed ❌

No test package could be found for tests on macOS Mac Catalina (10.15)

Pipeline on Agent
Hash: 80ca348218c264d28bf54ed966b51c336acc5406 [PR build]

@vs-mobiletools-engineering-service2
Copy link
Collaborator Author

❌ [PR Build] Tests on macOS M1 - Mac Big Sur (11.5) failed ❌

No test package could be found for tests on macOS M1 - Mac Big Sur (11.5)

Pipeline on Agent
Hash: 80ca348218c264d28bf54ed966b51c336acc5406 [PR build]

@vs-mobiletools-engineering-service2
Copy link
Collaborator Author

@vs-mobiletools-engineering-service2
Copy link
Collaborator Author

🔥 [CI Build] Test results 🔥

Test results

❌ Tests failed on VSTS: simulator tests

1 tests crashed, 0 tests failed, 160 tests passed.

Failures

❌ mmp tests

🔥 Failed catastrophically on VSTS: simulator tests - mmp (no summary found).

Html Report (VSDrops) Download

Successes

✅ bcl: All 59 tests passed. Html Report (VSDrops) Download
✅ cecil: All 1 tests passed. Html Report (VSDrops) Download
✅ dotnettests: All 1 tests passed. Html Report (VSDrops) Download
✅ fsharp: All 5 tests passed. Html Report (VSDrops) Download
✅ framework: All 5 tests passed. Html Report (VSDrops) Download
✅ generator: All 2 tests passed. Html Report (VSDrops) Download
✅ interdependent_binding_projects: All 5 tests passed. Html Report (VSDrops) Download
✅ install_source: All 1 tests passed. Html Report (VSDrops) Download
✅ introspection: All 5 tests passed. Html Report (VSDrops) Download
✅ linker: All 38 tests passed. Html Report (VSDrops) Download
⚠️ mac_binding_project: No tests selected. Html Report (VSDrops) Download
✅ mononative: All 8 tests passed. Html Report (VSDrops) Download
✅ monotouch: All 20 tests passed. Html Report (VSDrops) Download
✅ msbuild: All 2 tests passed. Html Report (VSDrops) Download
✅ mtouch: All 1 tests passed. Html Report (VSDrops) Download
⚠️ xammac: No tests selected. Html Report (VSDrops) Download
✅ xcframework: All 5 tests passed. Html Report (VSDrops) Download
✅ xtro: All 2 tests passed. Html Report (VSDrops) Download

Pipeline on Agent
Hash: [PR build]

@vs-mobiletools-engineering-service2
Copy link
Collaborator Author

🚀 [CI Build] Test results 🚀

Test results

✅ All tests passed on VSTS: simulator tests.

🎉 All 160 tests passed 🎉

Tests counts

✅ bcl: All 59 tests passed. Html Report (VSDrops) Download
✅ cecil: All 1 tests passed. Html Report (VSDrops) Download
✅ dotnettests: All 1 tests passed. Html Report (VSDrops) Download
✅ fsharp: All 5 tests passed. Html Report (VSDrops) Download
✅ framework: All 5 tests passed. Html Report (VSDrops) Download
✅ generator: All 2 tests passed. Html Report (VSDrops) Download
✅ interdependent_binding_projects: All 5 tests passed. Html Report (VSDrops) Download
✅ install_source: All 1 tests passed. Html Report (VSDrops) Download
✅ introspection: All 5 tests passed. Html Report (VSDrops) Download
✅ linker: All 38 tests passed. Html Report (VSDrops) Download
⚠️ mac_binding_project: No tests selected. Html Report (VSDrops) Download
⚠️ mmp: No tests selected. [attempt 2] Html Report (VSDrops) Download
✅ mononative: All 8 tests passed. Html Report (VSDrops) Download
✅ monotouch: All 20 tests passed. Html Report (VSDrops) Download
✅ msbuild: All 2 tests passed. Html Report (VSDrops) Download
✅ mtouch: All 1 tests passed. Html Report (VSDrops) Download
⚠️ xammac: No tests selected. Html Report (VSDrops) Download
✅ xcframework: All 5 tests passed. Html Report (VSDrops) Download
✅ xtro: All 2 tests passed. Html Report (VSDrops) Download

Pipeline on Agent
Hash: [PR build]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backported bug If an issue is a bug or a pull request a bug fix
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants