Page 1 of 1

Access violations C++ Builder Rio and Android

Posted: Wed Aug 07, 2019 12:21 am
by 16886444
Hi,

I have a resize function that adjusts chart height/width and position on form, it works fine. Today i tried to add ability to toggle bottom axis labels on/off. ChartName->BottomAxis->Labels = true; (or = false) causes an access violation on Android. Works fine on iOS.

Is this a known bug? The only series on the chart are TFastLineSeries.

UPDATE: I ran across another one. ChartName->Legend->Visible = true; (or = false). Works as expected on iOS but causes access violation on Android (os ver 9). I'm hoping that C++ is not an afterthought here...the lack of C++ examples makes me think it may be.

thanks,
russ

p.s. Embarcadero® C++Builder 10.3 Version 26.0.33219.4899

Re: Access violations C++ Builder Rio and Android

Posted: Tue Aug 13, 2019 2:12 pm
by Marc
Hello Russ,

Sorry for the delay replying.

I've tried your test code in an Android project, SDK 25, running from RAD Studio 10.3.2. The property executes correctly at runtime.

(Embarcadero® C++Builder 10.3 Version 26.0.34749.6593)

Are there any other clues that may help us reproduce the issue? This may be related to the version of RAD Studio.

ChartName->Legend->Visible = false/true; also runs correctly.

Regards,
Marc Meumann

Re: Access violations C++ Builder Rio and Android

Posted: Sun Sep 01, 2019 7:02 pm
by 16886444
Hi Marc,

Sorry, just now saw your reply. No, the simple code above caused the access violation. In fact, I've had quite a few problems - including one now that i can't figure how to stop. After i've created several charts - the app will spontaneously crash. I'm putting the charts in a TScrollBox so i can move them around etc. Works fine, except the unexpected crashes. Can't debug it either...

So, i'm wondering if i'd be better off to dive into Delphi and stop building my app it C++. It seems the charts are much better behaved in Delphi? Is that fair assessment?

thanks,
russ

p.s. Is there a way to stop the chart from doing anything after being initially created? I'm thinking some "recalculation" must be going on in the background for it to just go belly up without being manipulated.

Re: Access violations C++ Builder Rio and Android

Posted: Mon Sep 02, 2019 8:20 am
by yeray
Hello,

I can't say if you should continue using C++ or move to Delphi.
We use Delphi to develop TeeChart VCL/FMX and the tools associated with it. So we don't have enough experience in C++ to give you an impartial opinion.

Regarding the error you are getting and the impression you have that TeeChart is doing something in the background, you could try to disable the zoom, scroll and hover features:

Code: Select all

  Chart1.AllowPanning:=pmNone;
  Chart1.AllowZoom:=False;
  Chart1.Hover.Hide;

Re: Access violations C++ Builder Rio and Android

Posted: Tue Sep 03, 2019 1:43 am
by 16886444
Hi Yeray,

I've spent the day on a memory leak error (the minor Android issues i'll get back to). I can create one or more TeeChart's on a TScrollBox in my FMX app (i have a nice template chart that i just clone and add series to). It works fine - except, if i start scrolling up/down or left/right to see all of the charts and to see entire chart (horizontally) i start gobbling up memory. I'm watching my app performance via Xcode Console to see the messages. I'll eventually get a "Received memory warning" for my app and then it kills my app and gives me a kernal message, "EXC_RESOURCE -> myappname[5548] exceeded mem limit: ActiveHard 1400MB (fatal)". This does not occur when i run my app on Win32 - very stable memory usage.

On iOS If i just plot the charts and leave it alone no crash. But, that is obviously not a solution.
To get the scroll capability (so i can go from x=0 to x = last sample) on my chart i'm putting the charts in a TScrollBox. [b]Is there another way to get a left/right scroll capability with the TeeChart i can try?[/b] I've attached a zip of my chart code showing how i clone the template and then add points to the required series. thanks, russ [attachment=1]snip3.jpg

Re: Access violations C++ Builder Rio and Android

Posted: Tue Sep 03, 2019 1:47 am
by 16886444
Forgot to mention that i'm using registered version of TeeChartVCLFMXStandard-2019.27 and i'm building in C++Builder in Rad Studio (10.3.2).

Re: Access violations C++ Builder Rio and Android

Posted: Thu Sep 05, 2019 1:14 pm
by yeray
Hello,

There are variables not initialized in the code snipped you attached.
Please arrange a simple example project we can run as-is to reproduce the problem here.

Re: Access violations C++ Builder Rio and Android

Posted: Thu Sep 05, 2019 2:20 pm
by 16886444
Thanks Yeray - since the topic shifted to the memory leak i made a new thread, "memory leak on iOS with teechart (FMX, C++)".

Re: Access violations C++ Builder Rio and Android

Posted: Fri Sep 06, 2019 6:22 am
by yeray
Ok, thanks for clarifying.
We'll reply you there as soon as possible.