Export Crash - SkiaSharpVersion issue at build

Gamma 2021.4.2. I wonder if its building with a different version of Skia, maybe from a previous version of Gamma? (Would have pasted text but the error message disappears before I can do it).

A little more detail. I’ve now tried compiling my app in 2021.4.0 and I get the same error, this time with the error message staying on screen:

See the end of this message for details on invoking 
just-in-time (JIT) debugging instead of this dialog box.

See the end of this message for details on invoking 
just-in-time (JIT) debugging instead of this dialog box.

************** Exception Text **************
System.TypeInitializationException: The type initializer for 'VL.Skia.Imaging' threw an exception. ---> System.TypeInitializationException: The type initializer for 'SkiaSharp.SKObject' threw an exception. ---> System.InvalidOperationException: The version of the native libSkiaSharp library is incompatible with this version of SkiaSharp. Supported versions of the native libSkiaSharp library are in the range [80.3, 81.0).
   at SkiaSharp.SkiaSharpVersion.CheckNativeLibraryCompatible(Version minSupported, Version current, Boolean throwIfIncompatible)
   at SkiaSharp.SKObject..cctor()
   --- End of inner exception stack trace ---
   at SkiaSharp.SKObject..ctor(IntPtr handle, Boolean owns)
   at SkiaSharp.SKPixmap..ctor(SKImageInfo info, IntPtr addr, Int32 rowBytes)
   at VL.Skia.Imaging.FromImage(IImage image, Boolean discardHigherBits)
   at VL.Skia.Imaging..cctor()
   --- End of inner exception stack trace ---
   at _CoreLibBasics_.Control.Changed_A8JGbead2bxNdnPybiEqVS`1.__Create__[TWitness](NodeContext Node_Context, Boolean Changed_On_Create_In)
   at _CoreLibBasics_.Control.Changed_A8JGbead2bxNdnPybiEqVS`1.Create[TWitness](NodeContext Node_Context, Boolean Changed_On_Create_In)
   at _VL_Skia_.Graphics.Skia.Layers.DrawImage_Ff5nplF14r4OY4tRx45O9o.__Create__(NodeContext Node_Context)
   at _FotoBoothApp_.Visuals.CameraPreview_R0IxcpzeS3ILCAUoXYZRfG.__Create__(NodeContext Node_Context)
   at _FotoBoothApp_.Visuals.ScreenOutput_AncSYd3j94MNFPzILzjE4i.__Create__(NodeContext Node_Context)

Somehow when I compile there are some wires crossed.

> The version of the native libSkiaSharp library is incompatible with this version of SkiaSharp. Supported versions of the native libSkiaSharp library are in the range [80.3, 81.0).

Not sure how that’s happening but should it be a case of changing the nuget in the csproj file, or is there something else I could do so Gamma sets up the .csproj correctly(if that is the actual issue)?

Hm, can it be that you have SkiaSharp referenced manually somewhere in your patches? And an old version of it?

Nope only the vl. package as is.
Having a look for the node throwing this error I can see that the reference to the vl.skia.dll is different from the one loaded

And the csproj is referencing C:\Users\me\.nuget\packages\vl.skia\2021.4.2

And you’ve the “clear sources” enabled on export?

Yeah, export Log attached
OutputLog.log (97.7 KB)

Weirdly enough the libs folder has the current version of Skia (2.80.3 or something).

Trying a dependency walk…

No dice. The problem is I can’t get the debug info for Skia to show me which version is actually being seen, or where its loaded from. The .exe’s console displays the same message on another machine…
Then again:
image

Looking for that file in my folder and comparing it to the one in Gamma…

I replaced the libSkiaSharp.dll in my apps libs\x64\ folder with the one in C:\Program Files\vvvv\vvvv_gamma_2021.4.2\lib. It works, but something needs a bit of plumbing down there.

How do the generated csproj files look like? If you search with a texteditor for “SkiaSharp” and the filter set to “.csproj” - what is the outcome?

Sorry I don’t quite understand the question. There is a VL.Skia.csproj if that’s what you mean:
(Searched for libskiasharp)
image

But I’ll probably have to reply tomorrow or Wedneday because I need to catch up on the work. Thanks though

I meant a grep search for “SkiaSharp” over the whole generated src folder with the file filter set to “*.csproj” - the Sublime text editor can do that for example.

*.csproj It doesn’t turn up anything, “skiasharp” is only seen in the *.json's
Research Results.log (79.6 KB)
I’m guessing that I must have built out a version with Gamma 2020.3 sometime ago. I moved on to developing in 2021.4 previews to take advantage of the Skia’s image handling and performance improvements, so more recent builds have been with them (different folder). So when building with this stable version, whereever the libSkiaSharp.dll was copying from, it didn’t copy over the previous libSkiaSharp.dll.

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.