mono / SkiaSharp

SkiaSharp is a cross-platform 2D graphics API for .NET platforms based on Google's Skia Graphics Library. It provides a comprehensive 2D API that can be used across mobile, server and desktop models to render images.
MIT License
4.52k stars 540 forks source link

[QUESTION] 'SkiaSharp.SKImageInfo' threw an exception #2222

Open RicardoVR opened 2 years ago

RicardoVR commented 2 years ago

Hi.. I have read this kind of error but I havent the solution.. First of all I m using .net 5.0.408 + Angular 13 (node 14.17.1)

My project worked fine in windows and CentOS 7 (x86-64 Kernel Linux 3.10.0) mounted in VSP contabo. Suddenly, the project doesnt work in CentOS 7 (create PDF), even, I havent touch this part of the program, appear the following error.

" 2022-08-20 00:58:10.2711 | ConfluxApiOperator | WARN | Exception | StandarViewForWearEquipmentMaintenanceView() | Message:[The type initializer for 'SkiaSharp.SKImageInfo' threw an exception.],Stack:[ at SkiaSharp.SKImageInfo..ctor(Int32 width, Int32 height) " always the declaration was:

PackageReference Include="EPPlus" Version="4.5.3.3"
PackageReference Include="Magick.NET-Q8-AnyCPU" Version="7.23.2"
PackageReference Include="MailKit" Version="3.0.0"
PackageReference Include="PdfSharp" Version="1.50.5147"
PackageReference Include="PDFsharp-MigraDoc" Version="1.50.5147"
PackageReference Include="SixLabors.ImageSharp" Version="1.0.4"
PackageReference Include="SkiaSharp" Version="2.80.3"
PackageReference Include="SkiaSharp.NativeAssets.Linux" Version="2.80.3"

I tested change the following:

PackageReference Include="SkiaSharp" Version="2.80.3" 
PackageReference Include="SkiaSharp.NativeAssets.Linux" Version="2.80.3" 

to

PackageReference Include="SkiaSharp" Version="2.88.1" 
PackageReference Include="SkiaSharp.NativeAssets.Linux" Version="2.88.1" 

or to

PackageReference Include="SkiaSharp.NativeAssets.Linux.NoDependencies" Version="2.88.1"

but nothing works, I have to say I dont manage programing, but I try to find a solution.

Thanks for any hint Ricardo

aleksandrsmyk commented 2 years ago

I have the same issue trying to run samples

RicardoVR commented 2 years ago

Hi aleksandrsmyk

did you find the solution?

could you give some hint?

thanks..

aleksandrsmyk commented 2 years ago

No, I didnt. I skipped it for a while