SkiaSharp Access Violations

Im getting a protected memory access violation when calling ResetMatrix(). I originally was using SKAutoCanvasRestore with the same issue but switched to this:

      try
      {
        canvas.Save();
        canvas.Translate(CurrentColumn * _labelOuterRect.Width, CurrentRow * _labelOuterRect.Height);
        DrawCropMarks();
      }
      finally
      {
        canvas.ResetMatrix();
        canvas.Restore();
      }

Also seeing below message in VS.


Microsoft Visual Studio

The target process exited with code -1073741819 while evaluating the function 'SkiaSharp.SKCanvas.DeviceClipBounds.get'.

If the problem happens regularly, consider disabling the Tools->Options setting "Debugging->General->Enable property evaluation and other implicit function calls" or debugging the cause by evaluating the expression from the Immediate window. See help for information on doing this.

OK Help

Im using SkiaSharp 1.68.0 nuget on Windows.

Posts

  • JonesieJonesie Member ✭✭

    Doh. Never mind. I disposed the canvas. :blush:

Sign In or Register to comment.