Run time errors - TeeChart 2010 / C++ Builder XE

TeeChart VCL for Borland/CodeGear/Embarcadero RAD Studio, Delphi and C++ Builder.
Post Reply
iQuestMike
Newbie
Newbie
Posts: 2
Joined: Wed Dec 01, 2010 12:00 am

Run time errors - TeeChart 2010 / C++ Builder XE

Post by iQuestMike » Thu Mar 10, 2011 2:33 am

I am working with C++ Builder XE and TeeChart 2010 Pro.

Setting the color of a series at runtime produces an EAccessViolation. I have installed the latest maintenance release today and still have the same problem. I have also found similar errors changing axis properties at runtime. This appears to be specific to C++ Builder and not Delphi.

I tested with a simple app. Created new C++ Builder project with a TChart with a single TLineSeries (Series1). Added a button that uses FillSampleValues to add 25 samples. Then used a second button to change the color:

void __fastcall TForm1::Button2Click(TObject *Sender)
{
Series1->Color = clRed;
}

Running it in debug with a breakpoint at this line, I can see that Series1->Color is 104708548 so there is no problem with any NULL pointers anywhere. After executing the line I get:
---------------------------
Debugger Exception Notification
---------------------------
Project Project1.exe raised exception class EAccessViolation with message 'Access violation at address 01CA3874. Write of address B12946BA'.
---------------------------
Break Continue Help
---------------------------

I created a second simple app exactly the same but with Delphi XE and it works perfectly. Here is the code for that second button:

procedure TForm1.Button2Click(Sender: TObject);
begin
Series1.Color := clRed;
end;

The code is in a very large application that has previously worked with CBuilder5 / TeeChart ? and C++ Builder 2007 / TeeChart8 Pro. I don't want to have to re-write it in Delphi! Please provide me with the solution to this problem (or if I am making a mistake, please tell me where) as it is a really big issue.

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

Re: Run time errors - TeeChart 2010 / C++ Builder XE

Post by Yeray » Tue Mar 15, 2011 3:09 pm

Hi Mike,

I've tried to follow your steps with WinXP SP3, RAD Studio XE and TeeChart VCL v2010.02 and I don't reproduce the AV with the application attached.
SeriesColor.zip
(86.23 KiB) Downloaded 636 times
Please, check that TeeChart include path is in the top of your IDE include path and the "Delphi15\Lib" and "Delphi15\Lib\Obj" are on the top of your IDE library path.
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

iQuestMike
Newbie
Newbie
Posts: 2
Joined: Wed Dec 01, 2010 12:00 am

Re: Run time errors - TeeChart 2010 / C++ Builder XE

Post by iQuestMike » Tue Mar 15, 2011 9:30 pm

Hi Yeray,
Moving the TeeChart include and library paths to the top of the IDE list has fixed the problem straight away. Thankyou very much for ending a week of frustration!

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

Re: Run time errors - TeeChart 2010 / C++ Builder XE

Post by Yeray » Wed Mar 16, 2011 8:11 am

Hi Mike,

You're welcome! :)
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

Chacal
Newbie
Newbie
Posts: 4
Joined: Mon Mar 14, 2011 12:00 am

Re: Run time errors - TeeChart 2010 / C++ Builder XE

Post by Chacal » Fri Mar 18, 2011 11:17 am

check that TeeChart include path is in the top of your IDE include path and the "Delphi15\Lib" and "Delphi15\Lib\Obj" are on the top of your IDE library path.
this action solve the same problem for me, thanks !

MikeBeachBum
Newbie
Newbie
Posts: 14
Joined: Fri Jun 22, 2007 12:00 am

Re: Run time errors - TeeChart 2010 / C++ Builder XE

Post by MikeBeachBum » Mon Mar 21, 2011 9:23 pm

Fixed my issue as well. Wish this would happen automatically on update...

Post Reply