ChartException: Render device create failed

A forum dedicated to WinForms version of LightningChart Ultimate.

Moderator: Queue Moderators

Post Reply
abol810
Posts: 6
Joined: Sat Aug 11, 2018 2:53 pm

ChartException: Render device create failed

Post by abol810 » Tue Apr 13, 2021 9:41 am

The samples can compile and run fine on my development system but when I compile a sample app (using trial version)
I get the following exception when trying to create a char object:
Arction.WinForms.Charting.ChartException: Render device create failed : rendering engine initialization failed.
I have tried every DeviceType but non of them work.

ArctionKestutis
Posts: 549
Joined: Mon Mar 14, 2016 9:22 am

Re: ChartException: Render device create failed

Post by ArctionKestutis » Tue Apr 13, 2021 12:49 pm

It also possible that Arction’s DLLs maybe missing next to application binaries. User should check that all DLLs listed in User's Manual chapter 29.1 Referenced assemblies are there.
Next, you may want to refrain from changing Chart.RenderOptions.AntiAliasLevel during initial chart construction. Sometimes it causes the issue (because GPU antialiasing level check is slow process and goes in separate background thread). You can change AntiAliasLevel later, then chart is already loaded.

If tips above did not solve problem, then subscribing to _Chart.ChartMessage event and check Rendering Engine initialization results, GetLastEngineInitResults. For example,

Code: Select all

        private void Chart_ChartMessage(ChartMessageInfo info)
        {
            Console.WriteLine(info.ToString());

            if(info.MessageType == MessageType.RenderDeviceCreateFailed)
            {
                CheckEngineResult();
            }
        }
 
        private void CheckEngineResult()
        {
            var results = LcuChart.GetLastEngineInitResults();
 
            foreach (var engineInitResult in results)
            {
                string sLog = string.Format("Engine {0}. Success:{1}", engineInitResult.DeviceType, engineInitResult.Success);
 
                foreach (var exception in engineInitResult.Exceptions)
                {
                    sLog = string.Format("{0}\n Exception: {1}", sLog, exception.Message);
                }
 
                System.Diagnostics.Debug.WriteLine(sLog);
            }
        }
P.S. setting Chart.(Chart)RenderOptions.DeviceType = RendererDeviceType.Auto; should try to create device in order automatically.

Post Reply