We are using Aspose.Total.NET.lic license. To convert PPTX to PDF on linux server we are using Aspose.Slides from Aspose repo instead of nuget as suggested here:
But we are getting below error intermittently and then server is also crashing:
Unhandled exception. System.TypeInitializationException: The type initializer for ‘SkiaSharp.SKObject’ threw an exception.
2024-11-09T06:14:05.639310761Z —> System.DllNotFoundException: Unable to load shared library ‘libSkiaSharp’ or one of its dependencies. In order to help diagnose loading problems, consider using a tool like strace. If you’re using glibc, consider setting the LD_DEBUG environment variable:
2024-11-09T06:14:05.639320062Z /usr/share/dotnet/shared/Microsoft.NETCore.App/8.0.10/libSkiaSharp.so: cannot open shared object file: No such file or directory
2024-11-09T06:14:05.639326162Z /App/libSkiaSharp.so: cannot open shared object file: No such file or directory
2024-11-09T06:14:05.639332363Z /usr/share/dotnet/shared/Microsoft.NETCore.App/8.0.10/liblibSkiaSharp.so: cannot open shared object file: No such file or directory
2024-11-09T06:14:05.639338363Z /App/liblibSkiaSharp.so: cannot open shared object file: No such file or directory
2024-11-09T06:14:05.639344063Z /usr/share/dotnet/shared/Microsoft.NETCore.App/8.0.10/libSkiaSharp: cannot open shared object file: No such file or directory
2024-11-09T06:14:05.639349763Z /App/libSkiaSharp: cannot open shared object file: No such file or directory
2024-11-09T06:14:05.639355364Z /usr/share/dotnet/shared/Microsoft.NETCore.App/8.0.10/liblibSkiaSharp: cannot open shared object file: No such file or directory
2024-11-09T06:14:05.639361364Z /App/liblibSkiaSharp: cannot open shared object file: No such file or directory
2024-11-09T06:14:05.639381165Z
2024-11-09T06:14:05.639387665Z at SkiaSharp.SkiaApi.sk_version_get_milestone()
2024-11-09T06:14:05.639393465Z at SkiaSharp.SkiaSharpVersion.get_Native()
2024-11-09T06:14:05.639398866Z at SkiaSharp.SkiaSharpVersion.CheckNativeLibraryCompatible(Boolean throwIfIncompatible)
2024-11-09T06:14:05.639404466Z at SkiaSharp.SKObject…cctor()
2024-11-09T06:14:05.639410066Z — End of inner exception stack trace —
2024-11-09T06:14:05.639415466Z at SkiaSharp.SKObject.DeregisterHandle(IntPtr handle, SKObject instance)
2024-11-09T06:14:05.639421067Z at SkiaSharp.SKObject.set_Handle(IntPtr value)
2024-11-09T06:14:05.639426567Z at SkiaSharp.SKNativeObject.Dispose(Boolean disposing)
2024-11-09T06:14:05.639432167Z at SkiaSharp.SKObject.Dispose(Boolean disposing)
2024-11-09T06:14:05.639437567Z at SkiaSharp.SKBitmap.Dispose(Boolean disposing)
2024-11-09T06:14:05.639443068Z at SkiaSharp.SKNativeObject.Finalize()
Sorry, couldn’t share the sample application with you due to security reasons, because even if I removed the code logic I will have to provide the exact Docker file to replicate the issue.
However, we found a word document with which we were able to consistently replicate the issue. It was happening during extraction of data from the word document. This means the issue is not just with PPT to PDF conversion. Couldn’t share the word document as well due to security reasons.
But I found that other people are also facing similar issue of SkiaSharp dll not found in linux server:
From the suggestions in the post adding SkiaSharp.NativeAssets.Linux.NoDependencies version 2.88.6 worked for now. Adding libfontconfig or SkiaSharp.NativeAssets.Linux package with latest version didn’t work. We are trying other scenarios.
@dsom,
Thank you for the message. We would be very grateful if you could provide all the necessary information and files to reproduce the problem on our side and investigate the case.