-
Notifications
You must be signed in to change notification settings - Fork 597
Closed
Labels
Description
Description
Unable to launch page that uses SkiaSharp.
build output
* Executing task: dotnet build /Users/xxx/Projects/Practice/SkiaSharpSample/SkiaSharpSample.csproj -p:Configuration=Debug -p:TargetFramework=net9.0-android -p:AndroidSdkDirectory=/Users/xxx/Library/Developer/Xamarin/android-sdk-macosx
load .zprofile complete
SkiaSharpSample net9.0-android succeeded with 1 warning(s) (31.3s) → bin/Debug/net9.0-android/SkiaSharpSample.dll
/usr/local/share/dotnet/packs/Microsoft.Android.Sdk.Darwin/35.0.7/tools/Xamarin.Android.Common.targets(2192,2): warning XA0141: NuGet package 'SkiaSharp.NativeAssets.Android' version '3.118.0-preview.1.2' contains a shared library 'libSkiaSharp.so' which is not correctly aligned. See https://developer.android.com/guide/practices/page-sizes for more details
Build succeeded with 1 warning(s) in 31.6s
* Terminal will be reused by tasks, press any key to close it.
Exception:
F/mono-rt : [ERROR] FATAL UNHANDLED EXCEPTION: System.TypeInitializationException: The type initializer for 'SkiaSharp.SKImageInfo' threw an exception.
F/mono-rt : ---> System.DllNotFoundException: libSkiaSharp
F/mono-rt : at SkiaSharp.SKImageInfo..cctor() in /_/binding/SkiaSharp/SKImageInfo.cs:line 48
F/mono-rt : --- End of inner exception stack trace ---
F/mono-rt : at SkiaSharp.Views.Android.SurfaceFactory.CreateInfo(Int32 width, Int32 height) in /_/source/SkiaSharp.Views/SkiaSharp.Views/Platform/Android/SurfaceFactory.cs:line 90
F/mono-rt : at SkiaSharp.Views.Android.SurfaceFactory.UpdateCanvasSize(Int32 w, Int32 h, Single density) in /_/source/SkiaSharp.Views/SkiaSharp.Views/Platform/Android/SurfaceFactory.cs:line 23
F/mono-rt : at SkiaSharp.Views.Android.SKCanvasView.set_IgnorePixelScaling(Boolean value) in /_/source/SkiaSharp.Views/SkiaSharp.Views/Platform/Android/SKCanvasView.cs:line 72
F/mono-rt : at SkiaSharp.Views.Maui.Handlers.SKCanvasViewHandler.MapIgnorePixelScaling(SKCanvasViewHandler handler, ISKCanvasView canvasView) in /_/source/SkiaSharp.Views.Maui/SkiaSharp.Views.Maui.Core/Handlers/SKCanvasView/SKCanvasViewHandler.Android.cs:line 42
F/mono-rt : at Microsoft.Maui.PropertyMapper`2.<>c__DisplayClass5_0[[SkiaSharp.Views.Maui.ISKCanvasView, SkiaSharp.Views.Maui.Core, Version=3.118.0.0, Culture=neutral, PublicKeyToken=null],[SkiaSharp.Views.Maui.Handlers.SKCanvasViewHandler, SkiaSharp.Views.Maui.Core, Version=3.118.0.0, Culture=neutral, PublicKeyToken=null]].<Add>b__0(IElementHandler h, IElement v) in /_/src/Core/src/PropertyMapper.cs:line 172
F/mono-rt : at Microsoft.Maui.PropertyMapper.UpdatePropertyCore(String key, IElementHandler viewHandler, IElement virtualView) in /_/src/Core/src/PropertyMapper.cs:line 47
F/mono-rt : at Microsoft.Maui.PropertyMapper.UpdateProperties(IElementHandler viewHandler, IElement virtualView) in /_/src/Core/src/PropertyMapper.cs:line 82
F/mono-rt : at Microsoft.Maui.Handlers.ElementHandler.SetVirtualView(IElement view) in /_/src/Core/src/Handlers/Element/ElementHandler.cs:line 79
F/mono-rt : at Microsoft.Maui.Handlers.ViewHandler`2[[SkiaSharp.Views.Maui.ISKCanvasView, SkiaSharp.Views.Maui.Core, Version=3.118.0.0, Culture=neutral, PublicKeyToken=null],[SkiaSharp.Views.Android.SKCanvasView, SkiaSharp.Views.Android, Version=3.118.0.0, Culture=neutral, PublicKeyToken=0738eb9f132ed756]].SetVirtualView(IView view) in /_/src/Core/src/Handlers/View/ViewHandlerOfT.cs:line 53
F/mono-rt : at Microsoft.Maui.Handlers.ViewHandler`2[[SkiaSharp.Views.Maui.ISKCanvasView, SkiaSharp.Views.Maui.Core, Version=3.118.0.0, Culture=neutral, PublicKeyToken=null],[SkiaSharp.Views.Android.SKCanvasView, SkiaSharp.Views.Android, Version=3.118.0.0, Culture=neutral, PublicKeyToken=0738eb9f132ed756]].SetVirtualView(IElement view) in /_/src/Core/src/Handlers/View/ViewHandlerOfT.cs:line 56
F/mono-rt : at Microsoft.Maui.Controls.Element.SetHandler(IElementHandler newHandler) in /_/src/Controls/src/Core/Element/Element.cs:line 1027
F/mono-rt : at Microsoft.Maui.Controls.Element.set_Handler(IElementHandler value) in /_/src/Controls/src/Core/Element/Element.cs:line 969
F/mono-rt : at Microsoft.Maui.Controls.VisualElement.Microsoft.Maui.IElement.set_Handler(IElementHandler value) in /_/src/Controls/src/Core/VisualElement/VisualElement.cs:line 2138
F/mono-rt : at Microsoft.Maui.Platform.ElementExtensions.ToHandler(IElement view, IMauiContext context) in /_/src/Core/src/Platform/ElementExtensions.cs:line 96
F/mono-rt : at Microsoft.Maui.Platform.ElementExtensions.ToPlatform(IElement view, IMauiContext context) in /_/src/Core/src/Platform/ElementExtensions.cs:line 127
F/mono-rt : at Microsoft.Maui.Handlers.LayoutHandler.SetVirtualView(IView view) in /_/src/Core/src/Handlers/Layout/LayoutHandler.Android.cs:line 41
F/mono-rt : at Microsoft.Maui.Handlers.ViewHandler`2[[Microsoft.Maui.ILayout, Microsoft.Maui, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null],[Microsoft.Maui.Platform.LayoutViewGroup, Microsoft.Maui, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null]].SetVirtualView(IElement view) in /_/src/Core/src/Handlers/View/ViewHandlerOfT.cs:line 56
F/mono-rt : at Microsoft.Maui.Controls.Element.SetHandler(IElementHandler newHandler) in /_/src/Controls/src/Core/Element/Element.cs:line 1027
F/mono-rt : at Microsoft.Maui.Controls.Element.set_Handler(IElementHandler value) in /_/src/Controls/src/Core/Element/Element.cs:line 969
F/mono-rt : at Microsoft.Maui.Controls.VisualElement.Microsoft.Maui.IElement.set_Handler(IElementHandler value) in /_/src/Controls/src/Core/VisualElement/VisualElement.cs:line 2138
F/mono-rt : at Microsoft.Maui.Platform.ElementExtensions.ToHandler(IElement view, IMauiContext context) in /_/src/Core/src/Platform/ElementExtensions.cs:line 96
F/mono-rt : at Microsoft.Maui.Platform.ElementExtensions.ToPlatform(IElement view, IMauiContext context) in /_/src/Core/src/Platform/ElementExtensions.cs:line 127
F/mono-rt : at Microsoft.Maui.Handlers.ScrollViewHandler.UpdateInsetView(IScrollView scrollView, IScrollViewHandler handler, ICrossPlatformLayout crossPlatformLayout) in /_/src/Core/src/Handlers/ScrollView/ScrollViewHandler.Android.cs:line 186
Code
https://github.com/maonaoda/SkiaSharpBug
Expected Behavior
Do not crash
Actual Behavior
Crash
Version of SkiaSharp
3.118.0-preview.1 (Next Preview)
Last Known Good Version of SkiaSharp
not sure
IDE / Editor
Visual Studio Code (macOS)
Platform / Operating System
Android
Platform / Operating System Version
Android15
Devices
No response
Relevant Screenshots
No response
Relevant Log Output
No response
Code of Conduct
- I agree to follow this project's Code of Conduct
Metadata
Metadata
Assignees
Labels
Type
Projects
Status
Done


