Pending Review
Last Updated: 26 Jun 2025 13:12 by Olivier
Olivier
Created on: 26 Jun 2025 13:12
Type: Bug Report
0
ReportProcessor.RenderReport() crashes with a 'System.ExecutionEngineException' when using SkiaSharp on Windows

Hi,

I'm working on a multiplatform project, using Telerik Reporting to generate PDF reports. The development is taking place on Windows.

The report is loaded programmatically (ReportPackager.Unpackage(...)), and the data is injected directly into the reports.

Some reports requires specific charts that are created as images and inserted into the PictureBox elements of the report before rendering. We are using SkiaSharp to generate these images, and I'm now trying to inject these images into the PictureBox elements.

For my first attempt, I have used the Gdi by first converting the SKImage to a System.Drawing.Image and it worked fine although it does not seem optimal.

Now I'm trying to write directly the SKImage to the PictureBox :

        public bool SetPictureBoxImage(string pictureBoxName, SKImage image)
        {
            PictureBox? pictureBox = (PictureBox?)_telerikReport.Items.Find(pictureBoxName, true).FirstOrDefault();
            if (pictureBox is null) return false;

            DrawingFactory.CurrentGraphicsEngine = GraphicsEngine.Skia;
            using var bitmap = SKBitmap.FromImage(image);
            IImage tlkImage = DrawingFactory.CreateImage(bitmap);
            pictureBox.Value = tlkImage;

            return true;
        }

However, when calling 'ReportProcessor.RenderReport(...)', a 'System.ExecutionEngineException' is thrown (no call stack, no additional details available).

I have tried to move the call 'DrawingFactory.CurrentGraphicsEngine = GraphicsEngine.Skia' before loading the report with no luck.

 

Is the 'Skia' rendering not available on Windows?

 

Please note that I cannot rely on the 'appsettings.json' file to configure the graphic engine.

I have tried to set the configuration programmatically through a custom implementation of 'Microsoft.Extensions.Configuration.IConfiguration' passed as an argument to 'ReportProcessor' constructors, but it had no effect. I have searched your code to find another way to set the configuration but it does not seem possible as everything is static and internal.

 

Kind regards

0 comments