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
{{ message }}
This repository has been archived by the owner on May 1, 2024. It is now read-only.
App crash when display the default main page of a newly Xamarin project.
System.InvalidOperationException
Cannot convert a NSColorType.Catalog color without specifying the color space, use the overload to specify an NSColorSpace
System.InvalidOperationException: Cannot convert a NSColorType.Catalog color without specifying the color space, use the overload to specify an NSColorSpace
at Xamarin.Forms.Platform.MacOS.ColorExtensions.ToColor (AppKit.NSColor color) [0x0000a] in <0f206d9b19e34bb492c169092feaa0b2>: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) [0x000d8] in <0f206d9b19e34bb492c169092feaa0b2>: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 <0f206d9b19e34bb492c169092feaa0b2>:0
at Xamarin.Forms.Platform.MacOS.LabelRenderer.UpdateFormattedText () [0x00033] in <0f206d9b19e34bb492c169092feaa0b2>:0
at Xamarin.Forms.Platform.MacOS.LabelRenderer.UpdateTextPlainText () [0x0004d] in <0f206d9b19e34bb492c169092feaa0b2>:0
at Xamarin.Forms.Platform.MacOS.LabelRenderer.UpdateText () [0x0001e] in <0f206d9b19e34bb492c169092feaa0b2>:0
at Xamarin.Forms.Platform.MacOS.LabelRenderer.OnElementChanged (Xamarin.Forms.Platform.MacOS.ElementChangedEventArgs1[TElement] e) [0x0008c] in <0f206d9b19e34bb492c169092feaa0b2>:0 at Xamarin.Forms.Platform.MacOS.VisualElementRenderer1[TElement].SetElement (TElement element) [0x0017a] in <0f206d9b19e34bb492c169092feaa0b2>:0
at Xamarin.Forms.Platform.MacOS.VisualElementRenderer1[TElement].Xamarin.Forms.Platform.MacOS.IVisualElementRenderer.SetElement (Xamarin.Forms.VisualElement element) [0x00000] in <0f206d9b19e34bb492c169092feaa0b2>:0 at Xamarin.Forms.Platform.MacOS.Platform.CreateRenderer (Xamarin.Forms.VisualElement element) [0x00014] in <0f206d9b19e34bb492c169092feaa0b2>:0 at Xamarin.Forms.Platform.MacOS.VisualElementPackager.OnChildAdded (Xamarin.Forms.VisualElement view) [0x0003e] in <0f206d9b19e34bb492c169092feaa0b2>:0 at Xamarin.Forms.Platform.MacOS.VisualElementPackager.Load () [0x0001e] in <0f206d9b19e34bb492c169092feaa0b2>:0 at Xamarin.Forms.Platform.MacOS.VisualElementRenderer1[TElement].SetElement (TElement element) [0x0012e] in <0f206d9b19e34bb492c169092feaa0b2>:0
at Xamarin.Forms.Platform.MacOS.VisualElementRenderer`1[TElement].Xamarin.Forms.Platform.MacOS.IVisualElementRenderer.SetElement (Xamarin.Forms.VisualElement element) [0x00000] in <0f206d9b19e34bb492c169092feaa0b2>:0
at Xamarin.Forms.Platform.MacOS.Platform.CreateRenderer (Xamarin.Forms.VisualElement element) [0x00014] in <0f206d9b19e34bb492c169092feaa0b2>:0
at Xamarin.Forms.Platform.MacOS.VisualElementPackager.OnChildAdded (Xamarin.Forms.VisualElement view) [0x0003e] in <0f206d9b19e34bb492c169092feaa0b2>:0
at Xamarin.Forms.Platform.MacOS.VisualElementPackager.Load () [0x0001e] in <0f206d9b19e34bb492c169092feaa0b2>:0
at Xamarin.Forms.Platform.MacOS.PageRenderer.Init () [0x0001b] in <0f206d9b19e34bb492c169092feaa0b2>:0
at Xamarin.Forms.Platform.MacOS.PageRenderer.ViewWillAppear () [0x00000] in <0f206d9b19e34bb492c169092feaa0b2>:0
at at (wrapper managed-to-native) ObjCRuntime.Messaging.void_objc_msgSend_IntPtr(intptr,intptr,intptr)
at AppKit.NSWindow.set_ContentViewController (AppKit.NSViewController value) [0x00025] in /Library/Frameworks/Xamarin.Mac.framework/Versions/6.20.2.2/src/Xamarin.Mac/AppKit/NSWindow.g.cs:8558
at Xamarin.Forms.Platform.MacOS.FormsApplicationDelegate.UpdateMainPage () [0x00034] in <0f206d9b19e34bb492c169092feaa0b2>:0
at Xamarin.Forms.Platform.MacOS.FormsApplicationDelegate.SetMainPage () [0x00000] in <0f206d9b19e34bb492c169092feaa0b2>:0
at Xamarin.Forms.Platform.MacOS.FormsApplicationDelegate.DidFinishLaunching (Foundation.NSNotification notification) [0x00041] in <0f206d9b19e34bb492c169092feaa0b2>:0
at XFCrashRepro.MacOS.AppDelegate.DidFinishLaunching (Foundation.NSNotification notification) [0x00013] in /Users/chaton/Projects/XFCrashRepro/XFCrashRepro.MacOS/AppDelegate.cs:31
at at (wrapper managed-to-native) AppKit.NSApplication.NSApplicationMain(int,string[])
at AppKit.NSApplication.Main (System.String[] args) [0x00040] in /Library/Frameworks/Xamarin.Mac.framework/Versions/6.20.2.2/src/Xamarin.Mac/AppKit/NSApplication.cs:109
at XFCrashRepro.MacOS.MainClass.Main (System.String[] args) [0x00017] in /Users/chaton/Projects/XFCrashRepro/XFCrashRepro.MacOS/Main.cs:11
Note : I was initially tested an issue with custom font integration but a first problem has appeared.
Steps to Reproduce
Use the attached repo and just launch it. If you comment the label with the FormatedText in the MainPage the app launch without crashing.
Basic Information
Version with issue: 5.0.0.1487-pre1
Last known good version: 4.8
IDE: Visual Studio Enterprise 2019 for Mac. Version 8.7.8 (build 4)
hartez
changed the title
[Bug] [macOS] [XF 5.0] App crash when rendering label with FormatedText
[Bug] [macOS] [XF 5.0] App crash when rendering label with FormattedText
Oct 1, 2020
Description
App crash when display the default main page of a newly Xamarin project.
System.InvalidOperationException: Cannot convert a NSColorType.Catalog color without specifying the color space, use the overload to specify an NSColorSpace
at Xamarin.Forms.Platform.MacOS.ColorExtensions.ToColor (AppKit.NSColor color) [0x0000a] in <0f206d9b19e34bb492c169092feaa0b2>: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) [0x000d8] in <0f206d9b19e34bb492c169092feaa0b2>: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 <0f206d9b19e34bb492c169092feaa0b2>:0
at Xamarin.Forms.Platform.MacOS.LabelRenderer.UpdateFormattedText () [0x00033] in <0f206d9b19e34bb492c169092feaa0b2>:0
at Xamarin.Forms.Platform.MacOS.LabelRenderer.UpdateTextPlainText () [0x0004d] in <0f206d9b19e34bb492c169092feaa0b2>:0
at Xamarin.Forms.Platform.MacOS.LabelRenderer.UpdateText () [0x0001e] in <0f206d9b19e34bb492c169092feaa0b2>:0
at Xamarin.Forms.Platform.MacOS.LabelRenderer.OnElementChanged (Xamarin.Forms.Platform.MacOS.ElementChangedEventArgs
1[TElement] e) [0x0008c] in <0f206d9b19e34bb492c169092feaa0b2>:0 at Xamarin.Forms.Platform.MacOS.VisualElementRenderer
1[TElement].SetElement (TElement element) [0x0017a] in <0f206d9b19e34bb492c169092feaa0b2>:0at Xamarin.Forms.Platform.MacOS.VisualElementRenderer
1[TElement].Xamarin.Forms.Platform.MacOS.IVisualElementRenderer.SetElement (Xamarin.Forms.VisualElement element) [0x00000] in <0f206d9b19e34bb492c169092feaa0b2>:0 at Xamarin.Forms.Platform.MacOS.Platform.CreateRenderer (Xamarin.Forms.VisualElement element) [0x00014] in <0f206d9b19e34bb492c169092feaa0b2>:0 at Xamarin.Forms.Platform.MacOS.VisualElementPackager.OnChildAdded (Xamarin.Forms.VisualElement view) [0x0003e] in <0f206d9b19e34bb492c169092feaa0b2>:0 at Xamarin.Forms.Platform.MacOS.VisualElementPackager.Load () [0x0001e] in <0f206d9b19e34bb492c169092feaa0b2>:0 at Xamarin.Forms.Platform.MacOS.VisualElementRenderer
1[TElement].SetElement (TElement element) [0x0012e] in <0f206d9b19e34bb492c169092feaa0b2>:0at Xamarin.Forms.Platform.MacOS.VisualElementRenderer`1[TElement].Xamarin.Forms.Platform.MacOS.IVisualElementRenderer.SetElement (Xamarin.Forms.VisualElement element) [0x00000] in <0f206d9b19e34bb492c169092feaa0b2>:0
at Xamarin.Forms.Platform.MacOS.Platform.CreateRenderer (Xamarin.Forms.VisualElement element) [0x00014] in <0f206d9b19e34bb492c169092feaa0b2>:0
at Xamarin.Forms.Platform.MacOS.VisualElementPackager.OnChildAdded (Xamarin.Forms.VisualElement view) [0x0003e] in <0f206d9b19e34bb492c169092feaa0b2>:0
at Xamarin.Forms.Platform.MacOS.VisualElementPackager.Load () [0x0001e] in <0f206d9b19e34bb492c169092feaa0b2>:0
at Xamarin.Forms.Platform.MacOS.PageRenderer.Init () [0x0001b] in <0f206d9b19e34bb492c169092feaa0b2>:0
at Xamarin.Forms.Platform.MacOS.PageRenderer.ViewWillAppear () [0x00000] in <0f206d9b19e34bb492c169092feaa0b2>:0
at at (wrapper managed-to-native) ObjCRuntime.Messaging.void_objc_msgSend_IntPtr(intptr,intptr,intptr)
at AppKit.NSWindow.set_ContentViewController (AppKit.NSViewController value) [0x00025] in /Library/Frameworks/Xamarin.Mac.framework/Versions/6.20.2.2/src/Xamarin.Mac/AppKit/NSWindow.g.cs:8558
at Xamarin.Forms.Platform.MacOS.FormsApplicationDelegate.UpdateMainPage () [0x00034] in <0f206d9b19e34bb492c169092feaa0b2>:0
at Xamarin.Forms.Platform.MacOS.FormsApplicationDelegate.SetMainPage () [0x00000] in <0f206d9b19e34bb492c169092feaa0b2>:0
at Xamarin.Forms.Platform.MacOS.FormsApplicationDelegate.DidFinishLaunching (Foundation.NSNotification notification) [0x00041] in <0f206d9b19e34bb492c169092feaa0b2>:0
at XFCrashRepro.MacOS.AppDelegate.DidFinishLaunching (Foundation.NSNotification notification) [0x00013] in /Users/chaton/Projects/XFCrashRepro/XFCrashRepro.MacOS/AppDelegate.cs:31
at at (wrapper managed-to-native) AppKit.NSApplication.NSApplicationMain(int,string[])
at AppKit.NSApplication.Main (System.String[] args) [0x00040] in /Library/Frameworks/Xamarin.Mac.framework/Versions/6.20.2.2/src/Xamarin.Mac/AppKit/NSApplication.cs:109
at XFCrashRepro.MacOS.MainClass.Main (System.String[] args) [0x00017] in /Users/chaton/Projects/XFCrashRepro/XFCrashRepro.MacOS/Main.cs:11
Note : I was initially tested an issue with custom font integration but a first problem has appeared.
Steps to Reproduce
Use the attached repo and just launch it. If you comment the label with the FormatedText in the MainPage the app launch without crashing.
Basic Information
Reproduction Link
XFCrashRepro.zip
The text was updated successfully, but these errors were encountered: