Page 1 of 1

Pointer of TLineSeries v8.05

Posted: Wed Jun 10, 2009 2:02 pm
by 10547489
C++ Builder 2007 Pro
TeeChart Pro v8.05

after I make a new TLineSereis during runtime, Pointer of this series have a NULL Pointer.

Older TeeChart version is Normal work.
after upgrade this TeeChart v8.x, many problems are happened. :(

Code: Select all

TLineSeries* fls = new TLineSeries(Chart1);
fls->ParentChart = Chart1;
fls->HorizAxis 	 = aBottomAxis;
fls->ColorEachPoint = true;
fls->ColorEachLine = true;
fls->VertAxis    = aLeftAxis;

//below error....fls->Pointer = NULL
fls->Pointer->Visible 	= FShowPoint;
fls->Pointer->VertSize 	= FPointSize;
fls->Pointer->HorizSize = FPointSize;
fls->Pointer->Pen->Style = psClear;
fls->XValues->DateTime 	= true;
fls->LinePen->Width 	= FGraphLineThick;

Re: Pointer of TLineSeries v8.05

Posted: Thu Jun 11, 2009 11:54 am
by yeray
Hi JKLee,

I've tested your code and it seems to work fine. I've tested it adding some points and setting the chart to 2D.

Code: Select all

void __fastcall TForm1::FormCreate(TObject *Sender)
{
	Chart1->View3D = false;

	TLineSeries* fls = new TLineSeries(Chart1);
	fls->ParentChart = Chart1;
	fls->HorizAxis     = aBottomAxis;
	fls->ColorEachPoint = true;
	fls->ColorEachLine = true;
	fls->VertAxis    = aLeftAxis;

	//below error....fls->Pointer = NULL
	fls->Pointer->Visible    = true;
	fls->Pointer->VertSize    = 4;
	fls->Pointer->HorizSize = 4;
	fls->Pointer->Pen->Style = psClear;
	fls->XValues->DateTime    = true;
	fls->LinePen->Width    = 2;

	fls->FillSampleValues(10);
}
Could you please attach a simple example project we can run as-is to reproduce the problem here?

Re: Pointer of TLineSeries v8.05

Posted: Thu Jul 02, 2009 4:28 am
by 10545663
I hope that you can reproduce this problem. I am having exactly the same problem. For me, it wasn't necessarily the move to 8.05. I got a new laptop, installed compiler, TeeChart, etc. And I get the same thing. Help! I tried going back to 8.04 but that didn't help. Version 7 works, but I can't get past this on v8. For me it is as simple as:
TLineSeries * Series = new TLineSeries( this );
Series->Title = AnsiString( "Name" );
Series->Color = myColor;
Series->ParentChart = GtChart;

Note that it's not just Pointer, it's also Color and other things. What can I do to either work around it or help debug it?

Thanks,
Michael

Re: Pointer of TLineSeries v8.05

Posted: Thu Jul 02, 2009 4:49 am
by 10545663
And I should know better than to not post version.

TeeChart Pro 8.04 (and 8.05)
C++ Builder 2007 December 2007 Update
Vista Ultimate 64 bit

Thanks,
Michael

Re: Pointer of TLineSeries v8.05

Posted: Thu Jul 02, 2009 4:51 am
by 10545663
FWIW, I can't reproduce the problem on my XP machine...

Thanks,
Michael

Re: Pointer of TLineSeries v8.05

Posted: Thu Jul 02, 2009 7:57 am
by yeray
Hi Michael and JKLee,

I've tested both codes in a Vista Ultimate x64, C++Builder 2007 (also with December 2007 update), TeeChart v8.05 and I can't reproduce any error or crash.

We suspect that it could happen only with updated projects from an earlier C++Builder version. We are aware that here are some problems with code aligning when generating *.hpp and *.objc files for C++ Builder using dcc32 (Delphi compiler). Those problems usually are totally random but most visible with some subproperties which don't return a valid pointer. Hence some random Access Violation errors. This is a known C++ Builder error as you can see in the Quality Central entries below. This issue was supposed to be fixed in C++ Builder 2009 but obviously it is not working perfectly yet.

http://qc.embarcadero.com/wc/qcmain.aspx?d=47943
http://qc.embarcadero.com/wc/qcmain.aspx?d=46158
http://qc.embarcadero.com/wc/qcmain.aspx?d=27917
http://qc.embarcadero.com/wc/qcmain.aspx?d=653

Could it be what you are facing? If so, you could try to update your project manually by creating a new project in C++Builder 2007 and importing the units from the old C++Builder project manually to it.

Re: Pointer of TLineSeries v8.05

Posted: Thu Jul 02, 2009 3:31 pm
by 10545663
Yuck! Would it help if I recompiled TeeChart? This was a project brought in from scratch, not an upgraded one.

Thanks,
Michael

Re: Pointer of TLineSeries v8.05

Posted: Thu Jul 02, 2009 3:42 pm
by narcis
Hi Michael,

Since it's something random it could help recompiling TeeChart packages and generating new units for TeeChart using TeeRecompile tool shipped with the sourcecode installer.

Re: Pointer of TLineSeries v8.05

Posted: Thu Jul 02, 2009 3:57 pm
by 9335230
Hi,

If you were upgrading from an old version (or downgrading from a newer one) that seems to be a mix of different TeeChart versions while compiling, linking and running. I would rename older version folder, check the TeeChart packages used in your projects and rebuild all the way.
Hope you get it works.

Re: Pointer of TLineSeries v8.05

Posted: Thu Jul 02, 2009 8:15 pm
by 10545663
Thanks very much for all the help. And I must apologize for this stupid error on my part. Although I had uninstalled v7.12 from my machine, the folder was still there. And my project was referencing it in some area. Once I got rid of the folder and references, voila! Thanks again to Steema and everyone.

But here is another question. I have seen in the support forums that indeed the TEELIBPATH is incorrect, it should point to the obj directory. I changed that. But when I start a new VCL application without any TeeChart components, why does the IDE complain that it cannot find TEEUI811.lib? I didn't add any TeeChart components?

Thanks again,
Michael

Re: Pointer of TLineSeries v8.05

Posted: Fri Jul 03, 2009 7:27 am
by yeray
Hi Michael,

The problem is with C++Builder projects that need the library reference of both the TeeChart library path ant the Library\Obj path.
And the TeeInstaller adds the following entries to the library path:
Library Path wrote:$(TEELIBPATH)
\Obj
So you simply need to change the \Obj reference:
Library Path wrote:$(TEELIBPATH)
$(TEELIBPATH)\Obj
That's a known problem already on the wish list.

Re: Pointer of TLineSeries v8.05

Posted: Sat Jul 04, 2009 6:28 pm
by 10545663
Ah, thanks. I just wanted to let you guys know how much we appreciate your support, and your product. We were just at the Navy and we got numerous compliments on the plotting ability of our product. I explained that it was TeeChart 8 Pro. They were very impressed. Thanks again, Michael