The graphs don't load

Need help in implementing some specific function to your LightningChart Ultimate powered application? Post a question and get code snippets from other LightningChart Ultimate community members.

Moderator: Arction_LasseP

Post Reply
0uss
Posts: 16
Joined: Mon Apr 18, 2016 5:05 pm

The graphs don't load

Post by 0uss » Tue Mar 06, 2018 9:55 pm

Hello all,

I have a weird problem with some graphs. They don't load in some PCs after deployment (and it happens at random times). After playing with resolution it get back to normal.
Can you please help me find the source of this problem?

The attached pictures show one normal behavior and one wrong behavior.

Thank you very much in advance.
Attachments
2018-03-06_16-50-42.png
This is my DEV environment and a normal graphics
2018-03-06_16-50-42.png (89.66 KiB) Viewed 2670 times
2018-03-06_16-41-13.png
Here is the BUG.
2018-03-06_16-41-13.png (185.2 KiB) Viewed 2670 times

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

Re: The graphs don't load

Post by ArctionKestutis » Wed Mar 07, 2018 8:50 am

Hi,

We at least need to know the LightningChart version and platform (WinFroms, WPF, bindable etc.) you currently are using. Try to use latest one, as it has not only new features but improved reporting on errors.
Which engine (_chart.(Chart)RenderOptions.DeviceType) you try to initialize, is it ‘Auto’?
Could you get LightningChart specific information: ChartError and GetLastEngineInitResults? For example with following:

Code: Select all

            _chart = new LightningChartUltimate();
            CheckEngineResult();
            _chart.ChartError += _chart_ChartError;

        private void _chart_ChartError(ErrorType errorType, string errorDescription, string details, LightningChartUltimate chart, object source, DateTime timeStamp)
        {
            System.Diagnostics.Debug.WriteLine($@"LightningChart Error [{timeStamp}][{errorType}][{source?.GetType()}] {errorDescription}: {details}");

            if (errorType == ErrorType.RenderDeviceCreateFailed || errorType == ErrorType.MemoryAllocationError)
            {
                CheckEngineResult();
            }
        }


        private void CheckEngineResult()
        {
            var results = _chart.GetLastEngineInitResults();
            foreach (var engineInitResult in results)
            {
                string sLog = string.Format("Engine {0}. Success:{1}", engineInitResult.DeviceType, engineInitResult.Success);

                foreach (var exception in engineInitResult.Exceptions)
                {
                    //Log.Write(() => $"Exception: {exception.Message}");
                    sLog = string.Format("{0}\n Exception: {1}", sLog, exception.Message);
                }

                System.Diagnostics.Debug.WriteLine(sLog);
            }
        }
DxDiag output as text file also would be nice (please send it here or to Arction's support email)

All the best.

0uss
Posts: 16
Joined: Mon Apr 18, 2016 5:05 pm

Re: The graphs don't load

Post by 0uss » Wed Mar 07, 2018 1:56 pm

Hello,

I'm using the following components :
  • Visual Studio 2015
  • Windows From application
  • .Net Framework 4.0
  • LightningChart version 6.5.1.4001
  • C#
I know it's not the latest version but moving to version 7 or earlier versions will need too much work (due to many incompatibilities between 6 and 7) for us and it's not possible until fall 2018.

I will implement the code and hope for an error to occur. Because it's really random and happened only three times on two windows 10 tablets among 40 - 50 tablets (windows 10 - 8 and 7). Our customers use our softwares on a daily basis.

The only way to get the graphs back is to open another windows form software with the same version of LightningChart and then run the other buggy one and it will show the graphs again.

Thank you very much for your help. I will try to get the error again and get back here.

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

Re: The graphs don't load

Post by ArctionKestutis » Thu Mar 08, 2018 9:05 am

Hello,

It is just much more easy to debug problems with latest LightningChart versions: it have multiple fallback systems, extensive list of error reporting and additional events to follow rendering process.

Don't remember that was already available in version 6.5 (as we stop supporting that version for quite some time already), but you could try to check Chart's events BeforeRendering, AfterRendering and SizeChanged. Are you getting those then Chart is not visible in your app?

P.S. Version 6 and 7 should not be that incompatible. Version 7/8 with RenderingEngine 9 (chart.RenderOptions.DeviceType = RendererDeviceType.HardwareOnlyD9) is very similar to LCU v6. The rest of modifications mainly small change of property names or moved property to other property-grid location.

Hope this helps.

0uss
Posts: 16
Joined: Mon Apr 18, 2016 5:05 pm

Re: The graphs don't load

Post by 0uss » Thu Mar 08, 2018 3:03 pm

Thank you for your response. I will add those events and try to track the problem. But now I can't reproduce it in DEV environment or on a client system.

I think we will have the move earlier to LCU 7 or 8 if the version 6 is not supported anymore.

Thank you very much for your help. I will post something if it happens again with the detailed information about the error.

Post Reply