Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / lazarus / 2013-07

Memory leaks in AggPas

6 messages · 3 people · –

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Leonardo M. Ramé

Hi, this is part of the dump generated by heaptrace from an fpGui application that uses AggPAS (the AggPas code from fpGui is the same as in Lazarus).

As you can see there are many leaks in agg_scanline_u and agg_array.

Can anyone help me fixin this?.

Heap dump by heaptrc unit
38065 memory blocks allocated : 25727712/25865560
37243 memory blocks freed : 15853989/15991464
822 unfreed memory blocks : 9873723
True heap size : 12550144
True free heap : 2543872
Should be : 2570832
Call trace for block $00007FC1A486A3D0 size 1648
$00000000005A17A2 line 216 of ../render/software/agg_scanline_u.pas $00000000005C1D32 line 64 of ../render/software/agg_render_scanlines.pas $0000000000575950 line 787 of ../render/software/Agg2D.pas $000000000057D040 line 3498 of ../render/software/Agg2D.pas $000000000057C2C8 line 3110 of ../render/software/Agg2D.pas $000000000057A8F5 line 2460 of ../render/software/Agg2D.pas $0000000000606091 line 638 of imagecell.pas
$00000000004CEE24 line 207 of seriecell.pas
Call trace for block $00007FC1F32181C0 size 103
$00000000005A178E line 215 of ../render/software/agg_scanline_u.pas $00000000005C1D32 line 64 of ../render/software/agg_render_scanlines.pas $0000000000575950 line 787 of ../render/software/Agg2D.pas $000000000057D040 line 3498 of ../render/software/Agg2D.pas $000000000057C2C8 line 3110 of ../render/software/Agg2D.pas $000000000057A8F5 line 2460 of ../render/software/Agg2D.pas $0000000000606091 line 638 of imagecell.pas
$00000000004CEE24 line 207 of seriecell.pas
Call trace for block $00007FC1A48675F0 size 2288
$000000000058C07C line 697 of ../render/software/agg_array.pas $000000000058BF11 line 649 of ../render/software/agg_array.pas $000000000059EBDE line 682 of ../render/software/agg_rasterizer_scanline_aa.pas $00000000005A0301 line 1570 of ../render/software/agg_rasterizer_scanline_aa.pas $00000000005C1CF6 line 62 of ../render/software/agg_render_scanlines.pas $0000000000575950 line 787 of ../render/software/Agg2D.pas $000000000057D040 line 3498 of ../render/software/Agg2D.pas $000000000057C2C8 line 3110 of ../render/software/Agg2D.pas Call trace for block $00007FC1A48680D0 size 8800
$000000000058C07C line 697 of ../render/software/agg_array.pas $000000000058BF11 line 649 of ../render/software/agg_array.pas $000000000059EBB6 line 679 of ../render/software/agg_rasterizer_scanline_aa.pas $00000000005A0301 line 1570 of ../render/software/agg_rasterizer_scanline_aa.pas $00000000005C1CF6 line 62 of ../render/software/agg_render_scanlines.pas $0000000000575950 line 787 of ../render/software/Agg2D.pas $000000000057D040 line 3498 of ../render/software/Agg2D.pas $000000000057C2C8 line 3110 of ../render/software/Agg2D.pas ...

Reply by email

Mattias Gaertner
to Leonardo M. Ramé
Show quoted text 7 lines
Hi, this is part of the dump generated by heaptrace from an fpGui application that uses AggPAS (the AggPas code from fpGui is the same as in Lazarus). As you can see there are many leaks in agg_scanline_u and agg_array. Can anyone help me fixin this?.

You have the backtrace and you have your code that lead to this mem leak. So you have more information than we do.
What help do you need?

Show quoted text 44 lines
Heap dump by heaptrc unit 38065 memory blocks allocated : 25727712/25865560 37243 memory blocks freed : 15853989/15991464 822 unfreed memory blocks : 9873723 True heap size : 12550144 True free heap : 2543872 Should be : 2570832 Call trace for block $00007FC1A486A3D0 size 1648 $00000000005A17A2 line 216 of ../render/software/agg_scanline_u.pas $00000000005C1D32 line 64 of ../render/software/agg_render_scanlines.pas $0000000000575950 line 787 of ../render/software/Agg2D.pas $000000000057D040 line 3498 of ../render/software/Agg2D.pas $000000000057C2C8 line 3110 of ../render/software/Agg2D.pas $000000000057A8F5 line 2460 of ../render/software/Agg2D.pas $0000000000606091 line 638 of imagecell.pas $00000000004CEE24 line 207 of seriecell.pas Call trace for block $00007FC1F32181C0 size 103 $00000000005A178E line 215 of ../render/software/agg_scanline_u.pas $00000000005C1D32 line 64 of ../render/software/agg_render_scanlines.pas $0000000000575950 line 787 of ../render/software/Agg2D.pas $000000000057D040 line 3498 of ../render/software/Agg2D.pas $000000000057C2C8 line 3110 of ../render/software/Agg2D.pas $000000000057A8F5 line 2460 of ../render/software/Agg2D.pas $0000000000606091 line 638 of imagecell.pas $00000000004CEE24 line 207 of seriecell.pas Call trace for block $00007FC1A48675F0 size 2288 $000000000058C07C line 697 of ../render/software/agg_array.pas $000000000058BF11 line 649 of ../render/software/agg_array.pas $000000000059EBDE line 682 of ../render/software/agg_rasterizer_scanline_aa.pas $00000000005A0301 line 1570 of ../render/software/agg_rasterizer_scanline_aa.pas $00000000005C1CF6 line 62 of ../render/software/agg_render_scanlines.pas $0000000000575950 line 787 of ../render/software/Agg2D.pas $000000000057D040 line 3498 of ../render/software/Agg2D.pas $000000000057C2C8 line 3110 of ../render/software/Agg2D.pas Call trace for block $00007FC1A48680D0 size 8800 $000000000058C07C line 697 of ../render/software/agg_array.pas $000000000058BF11 line 649 of ../render/software/agg_array.pas $000000000059EBB6 line 679 of ../render/software/agg_rasterizer_scanline_aa.pas $00000000005A0301 line 1570 of ../render/software/agg_rasterizer_scanline_aa.pas $00000000005C1CF6 line 62 of ../render/software/agg_render_scanlines.pas $0000000000575950 line 787 of ../render/software/Agg2D.pas $000000000057D040 line 3498 of ../render/software/Agg2D.pas $000000000057C2C8 line 3110 of ../render/software/Agg2D.pas ...

Mattias

Reply by email

Leonardo M. Ramé
to Mattias Gaertner
Mattias Gaertner wrote 16 lines
On Tue, 30 Jul 2013 17:39:30 -0300 Leonardo M. Ram? wrote: > Hi, this is part of the dump generated by heaptrace from an fpGui > application that uses AggPAS (the AggPas code from fpGui is the > same as in Lazarus). > > As you can see there are many leaks in agg_scanline_u and agg_array. > > Can anyone help me fixin this?. You have the backtrace and you have your code that lead to this mem leak. So you have more information than we do. What help do you need?

Well, I don't think my code leads to leaking memory. That's why I'm looking for help with AggPAS.

Reply by email

Mattias Gaertner
to Leonardo M. Ramé
Show quoted text 9 lines
[...] > You have the backtrace and you have your code that lead to this mem > leak. So you have more information than we do. > What help do you need? > > Well, I don't think my code leads to leaking memory. That's why I'm looking for help with AggPAS.

Before we can help, you have to help us.
For example: create a bug report with an example demonstrating the leak.

Mattias

Reply by email

Leonardo M. Ramé
to Mattias Gaertner
Mattias Gaertner wrote 16 lines
On Tue, 30 Jul 2013 18:19:27 -0300 Leonardo M. Ram? wrote: >[...] > > You have the backtrace and you have your code that lead to this mem > > leak. So you have more information than we do. > > What help do you need? > > > > > > Well, I don't think my code leads to leaking memory. That's why I'm > looking for help with AggPAS. Before we can help, you have to help us. For example: create a bug report with an example demonstrating the leak.

Mattias, I've compiled the examples with -gh and them doesn't leak, so, you might be right, the problem can be in my code or in fpGui's interface to AggPas.

Regards,

Reply by email