Recent

Author Topic: SIGSEGV with TChart  (Read 8991 times)

CCP1CON

  • New Member
  • *
  • Posts: 14
SIGSEGV with TChart
« on: June 16, 2012, 04:38:09 pm »
Hello folks,

I have recently converted a project from Delphi. It works fine.
But now I wish to add an Chart.
As soon as I place the TChart component (as it is, no changes) I get an SIGSEGV during start up.
I could debug it down to TCustomTabControl.ReadState -> inherited ReadState(Reader) this loops twice and then fails with SIGSEGV

Any ideas?

Ask

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 687
Re: SIGSEGV with TChart
« Reply #1 on: June 17, 2012, 05:28:25 am »
Which Lazarus version?
Can you reproduce with a simple project?

CCP1CON

  • New Member
  • *
  • Posts: 14
Re: SIGSEGV with TChart
« Reply #2 on: June 17, 2012, 04:35:44 pm »
Thanks Ask,

I have used version 0.9.30 but have updated to 0.9.31
It is with both versions the same.

But I think it  must  be a particular problem with my project converted from Delphi, because if I create a new project everything with TChart works fine.

CCP1CON

  • New Member
  • *
  • Posts: 14
Re: SIGSEGV with TChart
« Reply #3 on: June 19, 2012, 08:46:04 pm »
I don't know how, I don't know why but it’s working now!
I scratched my head for hours and did a lot of tests.
I have created a backtrace and from it I understood the failure was raised in tagraph.pas:611
This is  in TChart.Create -  FBuiltinToolset := OnInitBuiltinTools(Self);
This caused me to try a different Toolset then the build in one.
And it was working like a charm– no SIGSEGV.
In order to make sure, I have removed the toolset again and surprisingly it is still working.

I don't get it :-)
However thanks for your time.

GBarton

  • Newbie
  • Posts: 3
Re: SIGSEGV with TChart
« Reply #4 on: March 23, 2013, 12:14:59 pm »
The exact same thing has happened to me: adding a TChart to an existing application (converted from Delphi) caused a SIGSEGV error when running.

I'm glad I found this thread because following what CCP1CON did has fixed it. All I had to do was to add a TChartToolset component and the error was gone. I then removed the TChartToolset and the error was still gone.

Lazarus 1.0.8

sergeykarpov

  • Newbie
  • Posts: 5
Re: SIGSEGV with TChart
« Reply #5 on: February 24, 2015, 10:39:08 am »
The same thing happened to me. SIGSEGV on creating form with TChart. Adding then removing of TChartToolset helped.
This added TATools to "uses" section. After refactoring and removing TATools as unused unit SIGSEGV returned.

So, adding TATools  to uses was the key.
Lazarus version 1.5

wp

  • Hero Member
  • *****
  • Posts: 13625
Re: SIGSEGV with TChart
« Reply #6 on: February 24, 2015, 10:43:07 am »
Please give precise instructions what you are doing. I've created numerous charts without having seen this issue.

sergeykarpov

  • Newbie
  • Posts: 5
Re: SIGSEGV with TChart
« Reply #7 on: February 24, 2015, 12:00:41 pm »
I need to mention that i also had that problem in the project converted from Delphi (delphi xe5). When create form directly in Lazarus and add TChart there, it works fine.
Sorry, have no time to describe all steps of creating and converting form right now, probably will do it later.

wp

  • Hero Member
  • *****
  • Posts: 13625
Re: SIGSEGV with TChart
« Reply #8 on: February 24, 2015, 12:07:01 pm »
Never got happy with the converions of charts from Delphi to Lazarus. TeeChart and TAChart are too much different.

PaulRowntree

  • Full Member
  • ***
  • Posts: 132
    • Paul Rowntree
Re: SIGSEGV with TChart
« Reply #9 on: August 03, 2016, 04:55:45 am »
Just to confirm ... same experience using Lazarus 1.6 32 bit Windows.  TChart on converted project crashes program on start, until TChartToolset is dropped on form (not linked).  Remove TChartToolset and program behaves correctly.
Paul Rowntree
- coding for instrument control, data acquisition & analysis, CNC systems

wp

  • Hero Member
  • *****
  • Posts: 13625
Re: SIGSEGV with TChart
« Reply #10 on: August 03, 2016, 10:22:24 am »
I added TATools to the uses clauses of TAGraph to make sure that the built-in tools of the chart are created. In my tests, this fixes the crash of converted Delphi projects. Please test.

If you don't use Lazarus trunk, please add TATools to the uses clause of TAGraph.pas in the implementation section. Then rebuild the IDE.

 

TinyPortal © 2005-2018