Page 1 of 1

Access Violation Error

Posted: Fri Oct 15, 2010 1:02 pm
by 9535061
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

Re: Access Violation Error

Posted: Mon Oct 18, 2010 7:21 am
by 9535061
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!!

Re: Access Violation Error

Posted: Mon Oct 18, 2010 11:12 am
by yeray
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.

Re: Access Violation Error

Posted: Wed Oct 20, 2010 9:04 am
by 9535061
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.

Re: Access Violation Error

Posted: Wed Oct 20, 2010 11:49 am
by 10050769
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,