Forum General
We are excited to announce that the Xamarin Forums are moving to the new Microsoft Q&A experience. Q&A is the home for technical questions and answers at across all products at Microsoft now including Xamarin!

We encourage you to head over to Microsoft Q&A for .NET for posting new questions and get involved today.

System.AccessViolationException occurred in Skiasharp.dll while retrieving font stream.

dillibabundillibabun Member ✭✭

We measuring a text in paragraph which has used a different fonts. To measure, we need a Font stream internally and so retrieved them for each text range. So used Typeface.OpenStream(), to retrieve the font. We are facing the following exception when running this program in loop more than 50 time.

System.AccessViolationException occurred
Message=Attempted to read or write protected memory. This is often an indication that other memory is corrupt.
at SkiaSharp.SkiaApi.sk_stream_read(IntPtr stream, IntPtr buffer, IntPtr size)
at SkiaSharp.SKStream.Read(IntPtr buffer, Int32 size)
at SkiaSharp.SKStream.Read(Byte[] buffer, Int32 size)

Sign In or Register to comment.