Solved BUG: Unable to take screenshots on Linux due to missing libSkiaSharp

Atravita

Tiller
When I try to take a screenshot using the "options" menu, I receive the following error

Map Screenshot: Error trying to create Bitmap: System.TypeInitializationException: The type initializer for 'SkiaSharp.SKImageInfo' threw an exception.
---> System.DllNotFoundException: Unable to load shared library 'libSkiaSharp' or one of its dependencies. In order to help diagnose loading problems, consider setting the LD_DEBUG environment variable: liblibSkiaSharp: cannot open shared object file: No such file or directory
at SkiaSharp.SkiaApi.sk_colortype_get_default_8888()
at SkiaSharp.SKImageInfo..cctor()
--- End of inner exception stack trace ---
at StardewValley.Game1.takeMapScreenshot(Nullable`1 in_scale, String screenshot_name, Action onDone)
Map Screenshot: Error trying to create Bitmap: System.TypeInitializationException: The type initializer for 'SkiaSharp.SKImageInfo' threw an exception.
---> System.DllNotFoundException: Unable to load shared library 'libSkiaSharp' or one of its dependencies. In order to help diagnose loading problems, consider setting the LD_DEBUG environment variable: liblibSkiaSharp: cannot open shared object file: No such file or directory
at SkiaSharp.SkiaApi.sk_colortype_get_default_8888()
at SkiaSharp.SKImageInfo..cctor()
--- End of inner exception stack trace ---
at StardewValley.Game1.takeMapScreenshot(Nullable`1 in_scale, String screenshot_name, Action onDone)

This is on a Linux machine (Ubuntu 20.04) that does have net-5.0-sdk installed (from Microsoft's repositories). Am not running through SMAPI. Discussed on discord here: https://discord.com/channels/137344473976799233/337774601696313347/917157393396293633
 

Atravita

Tiller
Looking through the game files, I can find a file called SkiaSharp.dll but not libSkiaSharp.dll

I forgot to mention that I did test with and without SMAPI, and same error each way. Using the same test save on Windows (again, with and without SMAPI) does take screenshots properly.
 
Last edited:

Quirinea

Farmer
I tested this, on Ubuntu Linux 18.04, Running SMAPI, and I do have that .net-5.0 installed (don't know if it is actually used, I got it after a lot of yelling and cursing as a previous SMAPI needed it, somebody said the current one does not), and got the same message.
I've never used that before, I've taken screenshots with the Gnome application, and now I noticed that I could not take a screenshot with a "selected area" (I have that in Finnish, I don't know what terms are used in English). Capturing the "whole window" worked, though.
 

Atravita

Tiller
Quirinea - I'm not talking about the GNOME screenshot tool. I'm talking about the game's screenshot tool.
 

Quirinea

Farmer
Quirinea - I'm not talking about the GNOME screenshot tool. I'm talking about the game's screenshot tool.
I know you meant that. I tested that, and it did not work for me either (Ubuntu Linux too, but different combination). Got the same result as you
I noticed this thread as I had tried to take screenshots with the gnome tool, which also has worked earlier -- also for using a selected area. Now it did not work either. I was able to make a screenshot of the whole window, though. And my first guess is that both show the same bug.
 

Shalassa

Newcomer
As discussed in the linked discord. I can't do any screenshots either.
GOG version, Kubuntu 20.04, however no .net (neither 5.0 nor the older versions) but mono.

I was curious and tested what happened if I just rename the existing SkiaSharp.dll to libSkiaSharp.dll but the game either doesn't start (if I rename it before launching) or crashes as soon as I hit the button (if I rename it midgame). That it wouldn't work was to be expected but I still tried a shot at that.


I noticed this thread as I had tried to take screenshots with the gnome tool, which also has worked earlier -- also for using a selected area. Now it did not work either. I was able to make a screenshot of the whole window, though. And my first guess is that both show the same bug.
I have no issues making screenshots via spectacle (default app on KDE), fullscreen and cut/rectangle
 

Atravita

Tiller
I was curious and tested what happened if I just rename the existing SkiaSharp.dll to libSkiaSharp.dll but the game either doesn't start (if I rename it before launching) or crashes as soon as I hit the button (if I rename it midgame). That it wouldn't work was to be expected but I still tried a shot at that.



I have no issues making screenshots via spectacle (default app on KDE), fullscreen and cut/rectangle
I tried making a symlink and that didn't change the error message. I also don't have any problems with the default Ubuntu screenshot app, either fullscreen or cut.
 

Shalassa

Newcomer
Just ran a test with copying the SkiaSharp and renaming the copy into libSkiaSharp. As almost expected it didn't change things and the error is still there
 
Top