Strage Access Violation with high memory usage (64 bit)

TeeChart VCL for Borland/CodeGear/Embarcadero RAD Studio, Delphi and C++ Builder.
Post Reply
marder
Advanced
Posts: 115
Joined: Thu May 29, 2008 12:00 am

Strage Access Violation with high memory usage (64 bit)

Post by marder » Wed Sep 18, 2013 1:48 pm

Hi.

I am using TeeChart Pro (2013.08.130521) with Delphi XE2.

I have seen an access violation in my 64 bit compiled application, when the application uses quite much memory.

The call stack shows some tee chart components:
http://download.jam-software.de/treesiz ... lstack.txt

Could you please take a look at the call stack and let me know what you think about it?
Thanks and best regards!

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

Re: Strage Access Violation with high memory usage (64 bit)

Post by Yeray » Fri Sep 20, 2013 3:23 pm

Hi,

What are the chart characteristics when the crash occurs?
We'd need a simple example project so we can reproduce the problem here. Looking at the stack trace it seems the application crashed when drawing the foot title shadow. However, we'd need to debug an application to see in what circumstances does it happen.

Also, looking at the stack trace it doesn't look as an out of resources problem, does it?
physical memory : 11262/16091 MB (free/total)
allocated memory : 2,30 GB
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

marder
Advanced
Posts: 115
Joined: Thu May 29, 2008 12:00 am

Re: Strage Access Violation with high memory usage (64 bit)

Post by marder » Tue Sep 24, 2013 12:50 pm

Hi.

I fear this is a bit more complicated.
I have no sample which can be used to reproduce this issue. It only occurred twice and we do not know the steps to reproduce.

I hoped that you could show me any direction where I could take a look at to find the reason for this.

Anyway, I will let you know in case we have a repro for this issue.

Best regards!

marder
Advanced
Posts: 115
Joined: Thu May 29, 2008 12:00 am

Re: Strage Access Violation with high memory usage (64 bit)

Post by marder » Tue Oct 29, 2013 3:41 pm

Hi.

I do still have no simple demo project for this issue, but I now used the source code of the latest beta version () and I got a new call stack (including line numbers this time):
http://download.jam-software.de/treesiz ... tack_2.txt

Could you please take a look at this new call stack and the related source code?
Maybe you will get a new idea how this could happen.

Any help would be good.
We could also try out any patches you might think of.

Thanks and best regards!

marder
Advanced
Posts: 115
Joined: Thu May 29, 2008 12:00 am

Re: Strage Access Violation with high memory usage (64 bit)

Post by marder » Mon Nov 04, 2013 2:43 pm

Hello.

I was now able to reproduce this issue in my IDE
Image

I noticed that here the local variable IBackLines32 has strange values from the 3rd entry (see image below).

I then searched inside the code and found some castings from Integer to Pointer, which is incorrect for 64 bit builds.
See here one example (TeCanvas.pas, line: 1637):
Image

Note: Pointer in 64 bit applications is not a 32 bit integer value, but a 64 bit integer value.
To work in both, 64 and 32 bit applications, you should consider using NativeInt instead.

Please let me know what you think about this.
best regards

Narcís
Site Admin
Site Admin
Posts: 14730
Joined: Mon Jun 09, 2003 4:00 am
Location: Banyoles, Catalonia
Contact:

Re: Strage Access Violation with high memory usage (64 bit)

Post by Narcís » Tue Nov 05, 2013 9:26 am

Hello marder,
marder wrote:Note: Pointer in 64 bit applications is not a 32 bit integer value, but a 64 bit integer value.
To work in both, 64 and 32 bit applications, you should consider using NativeInt instead.
Thanks for your feedback! Yes, you are right. We are going to change it immediately.
Best Regards,
Narcís Calvet / Development & Support
Steema Software
Avinguda Montilivi 33, 17003 Girona, Catalonia
Tel: 34 972 218 797
http://www.steema.com
Image Image Image Image Image Image
Instructions - How to post in this forum

Post Reply