Access Violation Error

TeeChart for ActiveX, COM and ASP
Post Reply
roger
Newbie
Newbie
Posts: 26
Joined: Thu May 10, 2007 12:00 am

Access Violation Error

Post by roger » Fri Oct 15, 2010 1:02 pm

Hello,
Thanks for your response,
Now I am getting access voilation error.

Also can you please tell me the normal flow for painting as I read that graph.Repaint must be called after adding points to the series. So is there any protocol in which things should be carried out?

In my case i am doing things in following order:
//m_series[nChartIndx].SetActive(false);
series.clear()
series.addXY()
//m_series[nChartIndx].SetActive(true); (IS THIS NECESSARY)
//m_series[nChartIndx].RefreshSeries();(IS THIS NECESSARY)
m_graph[nChartIndx].RedrawWindow();
m_graph[nChartIndx].Repaint();
//m_graph[nChartIndx].UpdateWindow();(IS THIS NECESSARY)

Out of the above calls can you please tell me which of these are necessary and what is the difference in Redraw and Update window.

And what could be the optimized but correct (IDEAL) call sequence. Also why am I getting the access voilation error?

Error Message: Access Violation at address 504E6FE1in module TeeChart7.ocx . Read of address 00000004.

First-chance exception in KonikromPlus.exe (TEECHART7.OCX): 0xC0000005: Access Violation. It seems that I get this error when the teechart is put in background and I do some other work. Or open other window.

i read on other forums that it requires some QrTee.pas latest version . If it is so in my case could you please send it to me as well?

Waiting for an fast reply as an delivery is lined up.

Thanks in advance,roger
Newbie


Posts: 21
Joined: 10 May 2007 00:00
Last edited by roger on Mon Oct 18, 2010 9:04 am, edited 2 times in total.

roger
Newbie
Newbie
Posts: 26
Joined: Thu May 10, 2007 12:00 am

Re: Access Violation Error

Post by roger » Mon Oct 18, 2010 7:21 am

Some help would be appreciated
If i comment setActive(false) and setActive(true) then I get access violation error
And if I do setActive(false) then addxy then setActive(true) then I cannot view the graph properly. The graph momentarily dissapears and then it gets plotted.

What can be the solution
Please help its urgent!!

Yeray
Site Admin
Site Admin
Posts: 9602
Joined: Tue Dec 05, 2006 12:00 am
Location: Girona, Catalonia
Contact:

Re: Access Violation Error

Post by Yeray » Mon Oct 18, 2010 11:12 am

Hi Roger,
roger wrote:Also can you please tell me the normal flow for painting as I read that graph.Repaint must be called after adding points to the series. So is there any protocol in which things should be carried out?
If you are populating the series at startup and your program doesn't modify the data, you probably don't need to call any repaint method.
If you are adding points to the series at realtime, while the program is running, we recommend to control the repaint of the chart setting the autorepaint property to false before the AddXY calls, setting it back to true once the population has finished and forcing the Chart repaint.
roger wrote:Out of the above calls can you please tell me which of these are necessary and what is the difference in Redraw and Update window.
I think that the UpdateWindow and RedrawWindow methods are something related to the environment you are using. I'd wouldn't use them.
Setting the series to be inactive before the population and active after the population isn't necessary if you control the whole chart repaint as explained above.
roger wrote:And what could be the optimized but correct (IDEAL) call sequence.
I'm not sure about what are you exactly trying to achieve, but here it is a simple example doing something similar:

Code: Select all

  TChart1.AutoRepaint = False
  TChart1.Series(0).Clear
  Dim i As Integer
  For i = 0 To 100
    TChart1.Series(0).AddXY i, Rnd * 100, "", clTeeColor
  Next i
  TChart1.AutoRepaint = True
  TChart1.Repaint
roger wrote:Also why am I getting the access voilation error?

Error Message: Access Violation at address 504E6FE1in module TeeChart7.ocx . Read of address 00000004.

First-chance exception in KonikromPlus.exe (TEECHART7.OCX): 0xC0000005: Access Violation. It seems that I get this error when the teechart is put in background and I do some other work. Or open other window.

i read on other forums that it requires some QrTee.pas latest version . If it is so in my case could you please send it to me as well?
I don't think the latest QRTee.pas would help you here. It concerns to QuickReport that is a VCL component, not an ActiveX one.
If you want, you can try the TeeChart AX v8 eval version or the TeeChart AX v2010 Beta to see if this error doesn't occur with them (http://www.steema.com/evaluation/ax).
If you still have problems with it, it would be helpful if you could arrange a simple example project we could run as-is to reproduce the problem here. I'm trying to reproduce it here with the feature demo at All features\Welcome !\Speed\Delete Point Range but I can open other windows without problems while running it.
Best Regards,
ImageYeray Alonso
Development & Support
Steema Software
Av. Montilivi 33, 17003 Girona, Catalonia (SP)
Image Image Image Image Image Image Please read our Bug Fixing Policy

roger
Newbie
Newbie
Posts: 26
Joined: Thu May 10, 2007 12:00 am

Re: Access Violation Error

Post by roger » Wed Oct 20, 2010 9:04 am

This does not solve my problem.
It shows me access violation error if i dont put setActive.
Any ways i still get the graph dissapearing and chart resizing issue?
I have posted the problem here http://www.teechart.net/support/viewtop ... =1&t=11657
and also i have posted the code.
AS it is real time plotting i was not able to reproduce it in simpler code.
What could be the problem......
CAn you suggest any workaround for it.

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

Re: Access Violation Error

Post by Sandra » Wed Oct 20, 2010 11:49 am

Hello roger,

I am sorry but we couldn't reproduce your problem with code you posted. We need reproduce your problem here, for understand the problematic exactly and suggest a good solution. So, you would be so nice to send us a project we can run "as-is" to reproduce the problem here and we can try to help you to find solution?

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