Ich habe einen Report in einem Datenmodul, dieser wird aus einem Frame her aufgerufen das ein Chart beinhaltet, das im Report verwendet wird. Mache ich einen Report so bleibt ein Speicherleck über, das aus dem Zusammenspiel Report und Chart zu stammen scheint.
Ohne dem Frame habe ich keine Speicherlecks. Erst wenn ich den Report aufrufe entsteht es.
Auf ein Minimum reduziertes Beispiel ist angehängt.
Lazarus 4.99 (rev main_4_99-3282-g77ab8459cf) FPC 3.2.2 x86_64-linux-gtk2
Ooops: Lazarus 4.5 (rev lazarus_4_4-43-gb42c5e00a6) FPC 3.2.3 x86_64-linux-qt5Heap dump by heaptrc unit of /home/..../Versuche/Forum/TAChart/LazReportTest/lazreportdemo
17837 memory blocks allocated : 69183073/69214232
17766 memory blocks freed : 59601236/59632352
71 unfreed memory blocks : 9581837
True heap size : 12222464
True free heap : 2625088
Should be : 2626952
Call trace for block $0000775ACB48A980 size 16
$00000000007C5C98 DRAW, line 9298 of lr_class.pas
$0000000000821CE5 PAINT, line 519 of lr_view.pas
$0000000000556D93 PAINTWINDOW, line 123 of include/customcontrol.inc
$000000000053E0F4 PAINTHANDLER, line 4982 of include/wincontrol.inc
$0000000000542502 WMPAINT, line 6943 of include/wincontrol.inc
$0000000000556CC6 WMPAINT, line 103 of include/customcontrol.inc
$000000000043352A
$000000000053F633 WNDPROC, line 5547 of include/wincontrol.inc
$000000000072CCF2 DELIVERMESSAGE, line 114 of lclmessageglue.pas
$00000000005FFFB0 DELIVERMESSAGE, line 3755 of gtk2/gtk2proc.inc
$000000000060B116 DODELIVERPAINTMESSAGE, line 27 of gtk2/gtk2callback.inc
$000000000060B1DA DELIVERPAINTMESSAGE, line 45 of gtk2/gtk2callback.inc
$000000000060B3F4 DELIVERGTKPAINTMESSAGE, line 111 of gtk2/gtk2callback.inc
$000000000060C172 GTKEXPOSEEVENT, line 623 of gtk2/gtk2callback.inc
$0000775ACAF46420
$0000775ACAD842FA
Call trace for block $0000775AC86E5F00 size 33
$00000000007B2096 OUTLINE, line 3856 of lr_class.pas
$00000000007B1923 WRAPLINE, line 3882 of lr_class.pas
$00000000007B16DD OUTMEMO, line 4016 of lr_class.pas
$00000000007B126D WRAPMEMO, line 4075 of lr_class.pas
$00000000007B392E DRAW, line 4456 of lr_class.pas
$00000000007C5C98 DRAW, line 9298 of lr_class.pas
$0000000000821CE5 PAINT, line 519 of lr_view.pas
$0000000000556D93 PAINTWINDOW, line 123 of include/customcontrol.inc
$000000000053E0F4 PAINTHANDLER, line 4982 of include/wincontrol.inc
$0000000000542502 WMPAINT, line 6943 of include/wincontrol.inc
$0000000000556CC6 WMPAINT, line 103 of include/customcontrol.inc
$000000000043352A
$000000000053F633 WNDPROC, line 5547 of include/wincontrol.inc
$000000000072CCF2 DELIVERMESSAGE, line 114 of lclmessageglue.pas
$00000000005FFFB0 DELIVERMESSAGE, line 3755 of gtk2/gtk2proc.inc
$000000000060B116 DODELIVERPAINTMESSAGE, line 27 of gtk2/gtk2callback.inc
Call trace for block $0000775AC1345260 size 64
$00000000005716D1 CREATE, line 1510 of include/canvas.inc
$0000000000567A14 CREATE, line 23 of include/bitmapcanvas.inc
$00000000005649AC CREATECANVAS, line 325 of include/rasterimage.inc
$0000000000564970 GETCANVAS, line 317 of include/rasterimage.inc
$000000000056456A DRAW, line 259 of include/rasterimage.inc
$000000000056DE55 STRETCHDRAW, line 48 of include/canvas.inc
$00000000007B9DD7 DRAW, line 5814 of lr_class.pas
$00000000007C5C98 DRAW, line 9298 of lr_class.pas
$0000000000821CE5 PAINT, line 519 of lr_view.pas
$0000000000556D93 PAINTWINDOW, line 123 of include/customcontrol.inc
$000000000053E0F4 PAINTHANDLER, line 4982 of include/wincontrol.inc
$0000000000542502 WMPAINT, line 6943 of include/wincontrol.inc
$0000000000556CC6 WMPAINT, line 103 of include/customcontrol.inc
$000000000043352A
$000000000053F633 WNDPROC, line 5547 of include/wincontrol.inc
$000000000072CCF2 DELIVERMESSAGE, line 114 of lclmessageglue.pas
Call trace for block $0000775AC976ECE0 size 264
$000000000056E8F9 DOCREATEDEFAULTBRUSH, line 352 of include/canvas.inc
$000000000068E4AD
$000000000068E0A5
$0000000000567A14 CREATE, line 23 of include/bitmapcanvas.inc
$00000000005649AC CREATECANVAS, line 325 of include/rasterimage.inc
$0000000000564970 GETCANVAS, line 317 of include/rasterimage.inc
$000000000056456A DRAW, line 259 of include/rasterimage.inc
$000000000056DE55 STRETCHDRAW, line 48 of include/canvas.inc
$00000000007B9DD7 DRAW, line 5814 of lr_class.pas
$00000000007C5C98 DRAW, line 9298 of lr_class.pas
$0000000000821CE5 PAINT, line 519 of lr_view.pas
$0000000000556D93 PAINTWINDOW, line 123 of include/customcontrol.inc
$000000000053E0F4 PAINTHANDLER, line 4982 of include/wincontrol.inc
$0000000000542502 WMPAINT, line 6943 of include/wincontrol.inc
$0000000000556CC6 WMPAINT, line 103 of include/customcontrol.inc
$000000000043352A
Call trace for block $0000775AC13BFC00 size 144
$000000000056E8C9 DOCREATEDEFAULTPEN, line 347 of include/canvas.inc
$000000000068E40D
$000000000068E092
$0000000000567A14 CREATE, line 23 of include/bitmapcanvas.inc
$00000000005649AC CREATECANVAS, line 325 of include/rasterimage.inc
$0000000000564970 GETCANVAS, line 317 of include/rasterimage.inc
$000000000056456A DRAW, line 259 of include/rasterimage.inc
$000000000056DE55 STRETCHDRAW, line 48 of include/canvas.inc
$00000000007B9DD7 DRAW, line 5814 of lr_class.pas
$00000000007C5C98 DRAW, line 9298 of lr_class.pas
$0000000000821CE5 PAINT, line 519 of lr_view.pas
$0000000000556D93 PAINTWINDOW, line 123 of include/customcontrol.inc
$000000000053E0F4 PAINTHANDLER, line 4982 of include/wincontrol.inc
$0000000000542502 WMPAINT, line 6943 of include/wincontrol.inc
$0000000000556CC6 WMPAINT, line 103 of include/customcontrol.inc
$000000000043352A
Call trace for block $0000775AC86C9800 size 32
$000000000068E07F
$0000000000567A14 CREATE, line 23 of include/bitmapcanvas.inc
$00000000005649AC CREATECANVAS, line 325 of include/rasterimage.inc
$0000000000564970 GETCANVAS, line 317 of include/rasterimage.inc
$000000000056456A DRAW, line 259 of include/rasterimage.inc
$000000000056DE55 STRETCHDRAW, line 48 of include/canvas.inc
$00000000007B9DD7 DRAW, line 5814 of lr_class.pas
$00000000007C5C98 DRAW, line 9298 of lr_class.pas
$0000000000821CE5 PAINT, line 519 of lr_view.pas
$0000000000556D93 PAINTWINDOW, line 123 of include/customcontrol.inc
$000000000053E0F4 PAINTHANDLER, line 4982 of include/wincontrol.inc
$0000000000542502 WMPAINT, line 6943 of include/wincontrol.inc
$0000000000556CC6 WMPAINT, line 103 of include/customcontrol.inc
$000000000043352A
$000000000053F633 WNDPROC, line 5547 of include/wincontrol.inc
$000000000072CCF2 DELIVERMESSAGE, line 114 of lclmessageglue.pas
Call trace for block $0000775AC86C7C00 size 32
$000000000056E899 DOCREATEDEFAULTFONT, line 342 of include/canvas.inc
$000000000068E36D
$000000000068E07F
$0000000000567A14 CREATE, line 23 of include/bitmapcanvas.inc
$00000000005649AC CREATECANVAS, line 325 of include/rasterimage.inc
$0000000000564970 GETCANVAS, line 317 of include/rasterimage.inc
$000000000056456A DRAW, line 259 of include/rasterimage.inc
$000000000056DE55 STRETCHDRAW, line 48 of include/canvas.inc
$00000000007B9DD7 DRAW, line 5814 of lr_class.pas
$00000000007C5C98 DRAW, line 9298 of lr_class.pas
$0000000000821CE5 PAINT, line 519 of lr_view.pas
$0000000000556D93 PAINTWINDOW, line 123 of include/customcontrol.inc
$000000000053E0F4 PAINTHANDLER, line 4982 of include/wincontrol.inc
$0000000000542502 WMPAINT, line 6943 of include/wincontrol.inc
$0000000000556CC6 WMPAINT, line 103 of include/customcontrol.inc
$000000000043352A
Call trace for block $0000775AC13DCF80 size 160
$000000000056E899 DOCREATEDEFAULTFONT, line 342 of include/canvas.inc
$000000000068E36D
$000000000068E07F
$0000000000567A14 CREATE, line 23 of include/bitmapcanvas.inc
$00000000005649AC CREATECANVAS, line 325 of include/rasterimage.inc
$0000000000564970 GETCANVAS, line 317 of include/rasterimage.inc
$000000000056456A DRAW, line 259 of include/rasterimage.inc
$000000000056DE55 STRETCHDRAW, line 48 of include/canvas.inc
$00000000007B9DD7 DRAW, line 5814 of lr_class.pas
$00000000007C5C98 DRAW, line 9298 of lr_class.pas
$0000000000821CE5 PAINT, line 519 of lr_view.pas
$0000000000556D93 PAINTWINDOW, line 123 of include/customcontrol.inc
$000000000053E0F4 PAINTHANDLER, line 4982 of include/wincontrol.inc
$0000000000542502 WMPAINT, line 6943 of include/wincontrol.inc
$0000000000556CC6 WMPAINT, line 103 of include/customcontrol.inc
$000000000043352A
Call trace for block $0000775AC86C7900 size 24
$0000000000567A14 CREATE, line 23 of include/bitmapcanvas.inc
$00000000005649AC CREATECANVAS, line 325 of include/rasterimage.inc
$0000000000564970 GETCANVAS, line 317 of include/rasterimage.inc
$000000000056456A DRAW, line 259 of include/rasterimage.inc
$000000000056DE55 STRETCHDRAW, line 48 of include/canvas.inc
$00000000007B9DD7 DRAW, line 5814 of lr_class.pas
$00000000007C5C98 DRAW, line 9298 of lr_class.pas
$0000000000821CE5 PAINT, line 519 of lr_view.pas
$0000000000556D93 PAINTWINDOW, line 123 of include/customcontrol.inc
$000000000053E0F4 PAINTHANDLER, line 4982 of include/wincontrol.inc
$0000000000542502 WMPAINT, line 6943 of include/wincontrol.inc
$0000000000556CC6 WMPAINT, line 103 of include/customcontrol.inc
$000000000043352A
$000000000053F633 WNDPROC, line 5547 of include/wincontrol.inc
$000000000072CCF2 DELIVERMESSAGE, line 114 of lclmessageglue.pas
$00000000005FFFB0 DELIVERMESSAGE, line 3755 of gtk2/gtk2proc.inc
.....
macht es nicht
Heap dump by heaptrc unit of /home/andi/data/pascal/Versuche/Forum/TAChart/LazReportTest/lazreportdemo
25090 memory blocks allocated : 1247237588/1247284456
25090 memory blocks freed : 1247237588/1247284456
0 unfreed memory blocks : 0
True heap size : 2064384
True free heap : 2064384