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
HResult=0x80004003
Message=Attempted to read or write protected memory. This is often an indication that other memory is corrupt.
Source=
StackTrace:
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.