-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Don’t call NSAttributedString with HTML from a background thread #26153
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
Conversation
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
I now noticed that the crash happens with
|
Ohh I just bumped into a scaling issue with ListView/CollectionView1 and CollectionView1 after changes in this PR: For the following code:
It gets automatically fixed after updating any of the Label's properties |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nop, not from the top of my mind, can we rebase, see if it's still a issue and also add a test case for this ?
I've rebased, but the issue is still there without using |
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Failing tests on iOS not related
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
Comments suppressed due to low confidence (1)
src/Core/src/Platform/iOS/LabelExtensions.cs:93
- The NSError variable nsError is not checked after the NSAttributedString initialization. Add a check for nsError and handle any errors appropriately.
platformLabel.AttributedText = new NSAttributedString(text, attr, ref nsError);
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
Comments suppressed due to low confidence (1)
src/Core/src/Platform/iOS/LabelExtensions.cs:93
- Check and handle nsError after assigning NSAttributedString to ensure any errors are properly managed.
platformLabel.AttributedText = new NSAttributedString(text, attr, ref nsError);
Item1 Item1 Item1 I tested and this is fixed with this PR: #25664 But, I believe @albyrock87 divided it into smaller ones |
/azp run |
This comment was marked as off-topic.
This comment was marked as off-topic.
For more information about inflight process check https://github.com/dotnet/maui/wiki/Inflight-Branch-Process # .NET MAUI Release Notes - inflight/candidate Branch ## MAUI Product Fixes * [iOS] Fix SwipeView programmatic open when background color is set by @Shalini-Ashokan in #29765 * [iOS] FormattedText with text color causes stack overflow - fix by @kubaflo in #29874 * [iOS] Fix AdaptiveTrigger not working as expected by @jsuarezruiz in #20987 * [iOS] Fix for Flyout title is not broken over multiple lines when you rotate your screen by @BagavathiPerumal in #29171 * [Windows] Fix for Assigning null to the SelectedItem of the CollectionView in the SelectionChanged event does not clear the selection by @SyedAbdulAzeemSF4852 in #29288 * Fix TapCoordinates method in Catalyst by @jsuarezruiz in #29775 * Fixed ItemSpacing on CarouselView resizes items [Android] by @Dhivya-SF4094 in #29796 * Perf : ButtonContentTypeConverter now using InvariantCulture to parse double by @antoine-jonathan in #25393 * ToolbarItem behavior with ImageSource iOS - fix by @kubaflo in #28833 * [Android] Fixed Button Shadow Color Transparency Not Applied Correctly by @NanthiniMahalingam in #29371 * Don't call NSAttributedString with HTML from a background thread by @kubaflo in #26153 * [Windows] Implemented the Resize and Downsize functions in the W2DImage class by @HarishwaranVijayakumar in #29138 * Templated indicator view - improvements by @kubaflo in #25642 * Update Issue25946.xaml by @anandhan-rajagopal in #30025 ## Testing * Fixed Test case failure in PR 26153 - iOS by @kubaflo in #29906 * Fixed Test case failure in PR 25642 - snapshots by @kubaflo in #29881 * [Testing] Feature Matrix UITest Cases for RadioButton by @TamilarasanSF4853 in #29744 * [Testing] Feature Matrix UITest Cases for CollectionView ItemsSource Feature by @LogishaSelvarajSF4525 in #29322 * [Testing] Feature Matrix UITest Cases for Stepper by @nivetha-nagalingam in #29731 * [Testing] Feature Matrix UITest Cases for CheckBox Control by @anandhan-rajagopal in #29739 * Update the comment for the test properties by @mattleibow in #27306 ## Dependency Updates * No changes in this category ## Docs * No changes in this category ## Housekeeping * [create-pull-request] automated change by @github-actions[bot] in #29875 * [create-pull-request] automated change by @github-actions[bot] in #29792 * [create-pull-request] automated change by @github-actions[bot] in #29760 **Full Changelog**: origin/main...origin/inflight/candidate
…net#26153) * Don’t call NSAttributedString with HTML from a background thread * Added a UITest * Refactor * add more comments and move to Controls --------- Co-authored-by: Matthew Leibowitz <mattleibow@live.com>
…ead (dotnet#26153)" This reverts commit 61ee829.
According to Apple's documentation: https://developer.apple.com/documentation/foundation/nsattributedstring/1524613-initwithdata
Also, it seems to be a common problem among Apple developers:
https://forums.developer.apple.com/forums/thread/115405
Issues Fixed
Fixes #25946
Simulator.Screen.Recording.-.iPhone.16.Pro.-.2024-11-27.at.12.54.42.mp4
Simulator.Screen.Recording.-.iPhone.16.Pro.-.2024-11-27.at.12.52.55.mp4