Tee chart direct2d issue , gives red cross in the form.

TeeChart for Microsoft Visual Studio .NET, Xamarin Studio (Android, iOS & Forms) & Monodevelop.
Post Reply
Saumil
Newbie
Newbie
Posts: 13
Joined: Tue Aug 28, 2012 12:00 am

Tee chart direct2d issue , gives red cross in the form.

Post by Saumil » Tue Jul 16, 2013 6:27 am

Hello,

I have made a sample demo project to explain.

I am just adding random values in the fastline series.

Image

once the plotting starts , I hit ctrl , alt , delete and try to open the task manager. and graph disappear and I get red cross in the graph.

Image

The error is related to d2d, if i don't use direct2d then it runs without any issue.
Error log is attached. and sample project too.

Image
The error is
SlimDX.Direct2D.Direct2DException: D2DERR_RECREATE_TARGET: here has been a presentation error that may be recoverable. The caller needs to recreate, rerender the entire frame, and reattempt present. (-2003238900)
at SlimDX.Result.Throw[T](Object dataKey, Object dataValue)
at SlimDX.Result.Record[T](Int32 hr, Boolean failed, Object dataKey, Object dataValue)
at SlimDX.Direct2D.RenderTarget.EndDraw()
at Steema.TeeChart.Drawing.Direct2D.Graphics3DDirect2D.ShowImage(Graphics g)
at Steema.TeeChart.TChart.Draw(Graphics g)
at Steema.TeeChart.TChart.OnPaint(PaintEventArgs pe)
at System.Windows.Forms.Control.PaintWithErrorHandling(PaintEventArgs e, Int16 layer)
at System.Windows.Forms.Control.WmPaint(Message& m)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)

Please let me know if I am missing anything.
Thank you.
SampleProject.zip
Please addTeeChart.dll and TeeChart.Direct2D.dll in reference.
(211.25 KiB) Downloaded 694 times

Sandra
Site Admin
Site Admin
Posts: 3132
Joined: Fri Nov 07, 2008 12:00 am

Re: Tee chart direct2d issue , gives red cross in the form.

Post by Sandra » Tue Jul 16, 2013 3:22 pm

Hello Saumil,

Ok seems the problem is your infinite loop. I have changed your loop for a timer with interval=1 and your problem doesn't appear:

Code: Select all

        private Timer timer; 
       public void FileExitItemClick(System.Object Sender, System.EventArgs _e1)
        {
            this.Close();
        }

        public void FormCreate(System.Object Sender, System.EventArgs _e1)
        {
            Chart1.Aspect.View3D = false;
            Chart1.Walls.View3D = false;
            timer = new Timer(); 
            Chart1.Panel.Gradient.Visible = false;
            Chart1.Panel.Color = System.Drawing.SystemColors.ButtonFace;
            Chart1.Header.Text.Remove(0);            
            Chart1.Header.Text.Insert(0, "");
            timer.Start();
            timer.Interval = 1; 
            timer.Tick +=timer_Tick;
        }
        void timer_Tick(object sender, EventArgs e)
        {
          Random abc = new Random();
          Series1.Add(abc.NextDouble(), "", Color.Blue);
          Series1.RefreshSeries();
          Series1.Repaint();
          Chart1.Refresh();
        }
Could you tell us if previous code help you to solve your problem? Remember adjusts your timer as you like.

Thanks,
Best Regards,
Sandra Pazos / Development & Support
Steema Software
Avinguda Montilivi 33, 17003 Girona, Catalonia
Tel: 34 972 218 797
http://www.steema.com
Image Image Image Image Image Image
Instructions - How to post in this forum

Saumil
Newbie
Newbie
Posts: 13
Joined: Tue Aug 28, 2012 12:00 am

Re: Tee chart direct2d issue , gives red cross in the form.

Post by Saumil » Wed Jul 17, 2013 5:37 am

Sandra,

I am using the code you posted. I still get the red X.

if I comment this line , Chart1.Graphics3D = new Graphics3DDirect2D(Chart1.Chart);
then it works fine , i don't get this error.

Also , the error only appears when
1. I use direct2d in the project
2. I open task manager through ctrl, alt, delete and through the screen below.

Image

a normal user would open task manager through ctrl alt delete and We need to direct2d in the project for performance.
I have recorded the screen , please check .
screen record.zip
(503.03 KiB) Downloaded 625 times

Saumil
Newbie
Newbie
Posts: 13
Joined: Tue Aug 28, 2012 12:00 am

Re: Tee chart direct2d issue , gives red cross in the form.

Post by Saumil » Wed Jul 17, 2013 7:34 am

Sandra,

I just checked with Teechart Direct2D Demo. It also shows he red x.

Image

Saumil
Newbie
Newbie
Posts: 13
Joined: Tue Aug 28, 2012 12:00 am

Re: Tee chart direct2d issue , gives red cross in the form.

Post by Saumil » Wed Jul 17, 2013 7:36 am

GDI + Canvas runs fine, Direct2D canvas throws error.

Sandra
Site Admin
Site Admin
Posts: 3132
Joined: Fri Nov 07, 2008 12:00 am

Re: Tee chart direct2d issue , gives red cross in the form.

Post by Sandra » Wed Jul 17, 2013 11:06 am

Hello Saumil,

Your problem is very strange and its reproduction is very complicate, but we can reproduce it finally, with your code, our code and demo. Therefore, I have added your request in bug list report with number [TD29016645]. We will try to fix it for next maintenance releases of TeeChartForDirect2D.

Thanks,
Best Regards,
Sandra Pazos / Development & Support
Steema Software
Avinguda Montilivi 33, 17003 Girona, Catalonia
Tel: 34 972 218 797
http://www.steema.com
Image Image Image Image Image Image
Instructions - How to post in this forum

Saumil
Newbie
Newbie
Posts: 13
Joined: Tue Aug 28, 2012 12:00 am

Re: Tee chart direct2d issue , gives red cross in the form.

Post by Saumil » Thu Aug 01, 2013 9:36 am

Sandra , the issue is not solved in the latest release.

We need a fix soon, is there any alternate solution I can perform?

D2D demo shipped with latest release also gives me a red cross just like i posted earlier.

Sandra
Site Admin
Site Admin
Posts: 3132
Joined: Fri Nov 07, 2008 12:00 am

Re: Tee chart direct2d issue , gives red cross in the form.

Post by Sandra » Fri Aug 02, 2013 9:32 am

Hello Saumil,
Sandra , the issue is not solved in the latest release.
The time we need to fix the bugs depends of some variables such as the complexity of the problem, the number of issues with even higher priority that claims our team attention. I recommend you to be aware at this forum, our RSS news feed, twitter and facebook accounts for new release announcements and what's implemented on them.
We need a fix soon, is there any alternate solution I can perform?
D2D demo shipped with latest release also gives me a red cross just like i posted earlier.
In both cases I can only recommend you in the moment, try to avoid the situation for example, doesn't do Ctrl+Alt+Supr. In the case you want open task manager, you can do click with right button in the bottom task bar and open the task manager.

Thanks,
Best Regards,
Sandra Pazos / Development & Support
Steema Software
Avinguda Montilivi 33, 17003 Girona, Catalonia
Tel: 34 972 218 797
http://www.steema.com
Image Image Image Image Image Image
Instructions - How to post in this forum

Post Reply