This repository has been archived by the owner on May 1, 2024. It is now read-only.
[Bug] Crash XF for Mac 4.7.0.1080 #11272
Labels
4.7.0
regression on 4.7.0
a/label
e/2 🕑
2
i/high
Completely doesn't work, crashes, or is unusably slow, has no obvious workaround; occurs less often
i/regression
in-progress
This issue has an associated pull request that may resolve it!
p/macOS
t/bug 🐛
Description
Just updated from XF 4.5.0.657 to 4.7.0.1080.
App now crashes when attempting to render labels that contains formatted strings which are made up of several spans containing emoji's as well as text. The labels are also contained in grids.
The issue was introduced as early as 4.6, but Im not going to restore each version manually just to check.
Steps to Reproduce
Callstack:
at (wrapper managed-to-native) ObjCRuntime.Messaging.void_objc_msgSend_out_nfloat_out_nfloat_out_nfloat_out_nfloat(intptr,intptr,System.nfloat&,System.nfloat&,System.nfloat&,System.nfloat&)
at AppKit.NSColor.GetRgba (System.nfloat& red, System.nfloat& green, System.nfloat& blue, System.nfloat& alpha) [0x0000c] in /Library/Frameworks/Xamarin.Mac.framework/Versions/6.18.2.1/src/Xamarin.Mac/NSColor.g.cs:944
at Xamarin.Forms.Platform.MacOS.ColorExtensions.ToColor (AppKit.NSColor color) [0x00015] in <80383802214540fe948b297f6790b923>:0
at Xamarin.Forms.Platform.MacOS.FormattedStringExtensions.ToAttributed (Xamarin.Forms.Span span, Xamarin.Forms.BindableObject owner, Xamarin.Forms.Color defaultForegroundColor, Xamarin.Forms.TextAlignment textAlignment, System.Double lineHeight) [0x000c0] in <80383802214540fe948b297f6790b923>:0
at Xamarin.Forms.Platform.MacOS.FormattedStringExtensions.ToAttributed (Xamarin.Forms.FormattedString formattedString, Xamarin.Forms.BindableObject owner, Xamarin.Forms.Color defaultForegroundColor, Xamarin.Forms.TextAlignment textAlignment, System.Double lineHeight) [0x0001b] in <80383802214540fe948b297f6790b923>:0
at Xamarin.Forms.Platform.MacOS.LabelRenderer.UpdateFormattedText () [0x00033] in <80383802214540fe948b297f6790b923>:0
at Xamarin.Forms.Platform.MacOS.LabelRenderer.UpdateTextPlainText () [0x0004d] in <80383802214540fe948b297f6790b923>:0
at Xamarin.Forms.Platform.MacOS.LabelRenderer.UpdateText () [0x0001e] in <80383802214540fe948b297f6790b923>:0
at Xamarin.Forms.Platform.MacOS.LabelRenderer.OnElementChanged (Xamarin.Forms.Platform.MacOS.ElementChangedEventArgs`1[TElement] e) [0x0008c] in <80383802214540fe948b297f6790b923>:0
Expected Behavior
Not to crash.
Actual Behavior
Crash with the above call stack.
Basic Information
Screenshots
Reproduction Link
Workaround
Setting the label TextColor appears to work as a hackaround/workaround.
The text was updated successfully, but these errors were encountered: