Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SkiaSharp.SkImageInfo threw an exception #332

Closed
Seanba opened this issue Jul 4, 2017 · 4 comments
Closed

SkiaSharp.SkImageInfo threw an exception #332

Seanba opened this issue Jul 4, 2017 · 4 comments

Comments

@Seanba
Copy link

Seanba commented Jul 4, 2017

Hi there. Thanks for SkiaSharp. It's great. I've been using it in Tiled2Unity for a couple months now.

However, I've got some Windows users reporting this exception to me:

The type initializer for 'SkiaSharp.SKImageInfo' threw an exception.

Sometimes this exception goes away for them (maybe after updating their .Net Framework, or OS) but I haven't been able to pin down much more information than that (sorry, I don't have access to their workstations and haven't been able to reproduce the error myself.)

I wonder if there's something going on with the static constructor on SKImageInfo? I see some platform specific code there.

static SKImageInfo ()
{
	PlatformColorType = SkiaApi.sk_colortype_get_default_8888 ();
	SkiaApi.sk_color_get_bit_shift (out PlatformColorAlphaShift, out PlatformColorRedShift, out PlatformColorGreenShift, out PlatformColorBlueShift);
}

BTW, this is appearing on Windows 10 64bit for some users. Other users are reporting it on Win8 64 as well.

@mattleibow
Copy link
Contributor

I am not too sure exactly, but the exception is probably related to the fact that it either can't find the native libSkiaSharp.dll, or is unable to load it (ie: it may be an x86 dll and you are on an x64 OS).

I will need to see more of the exception, but this is just SkiaSharp saying that it can't find or load the native bits.

@Seanba
Copy link
Author

Seanba commented Aug 28, 2017

It looks like SkiaSharp has a dependency on the Visual C++ Redistributable from Visual Studio 2015. I haven't confirmed it yet but I'm guessing some of my users don't have that installed.

@mattleibow
Copy link
Contributor

That is correct. There is a dependency on the redist. More info: #136

@mattleibow
Copy link
Contributor

Closing this as this is not a bug, but a requirement.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants