Delphi-PRAXiS
Seite 2 von 2     12   

Delphi-PRAXiS (https://www.delphipraxis.net/forum.php)
-   GUI-Design mit VCL / FireMonkey / Common Controls (https://www.delphipraxis.net/18-gui-design-mit-vcl-firemonkey-common-controls/)
-   -   Delphi Ersatz für Buggy/Deprecated pngdelphi? (https://www.delphipraxis.net/113904-ersatz-fuer-buggy-deprecated-pngdelphi.html)

Assertor 17. Mai 2008 19:23

Re: Ersatz für Buggy/Deprecated pngdelphi?
 
Hier das kurze Log:

Delphi-Quellcode:
--------------------------------2008/5/17 20:10:14--------------------------------
This application has leaked memory. The small block leaks are (excluding expected leaks registered by pointer):

5 - 12 bytes: TIdThreadSafeInteger x 1
13 - 20 bytes: TPNGList x 2
21 - 28 bytes: TIdCriticalSection x 2, TPen x 2, TBrush x 2
29 - 36 bytes: TFont x 2, Unknown x 2
53 - 68 bytes: Unknown x 1
85 - 100 bytes: TCanvas x 2
549 - 612 bytes: TPNGObject x 2
TIdThreadSafe und TIdCriticalSection ist von Indy und klar (by Design).

Kommentiere ich die beiden fraglichen Zeilen aus gibt es keine (bzw. nur die gewollten Indy) Leaks.

Gruß Assertor

Edit: Endlich ein roter Kasten ;) Das prüfe ich gleich mal ab mit Graphics32.

omata 17. Mai 2008 19:35

Re: Ersatz für Buggy/Deprecated pngdelphi?
 
Ich kenne deine Anwendung ja nicht, aber kann es vielleicht sein, dass das Speicherleck von TPNGObject auch durch die Indys entsteht? Immerhin sind dort auch zwei TIdCriticalSection offen geblieben.

Mit MemProof habe ich keine Probleme. Vielleicht solltest du nochmal einen Test ohne die Indys durchführen.

Gruss
Thorsten

Assertor 17. Mai 2008 19:48

Re: Ersatz für Buggy/Deprecated pngdelphi?
 
Nein, Lecks sind nicht von Indy. Ich verwende die aktuelle FPC/Lazarus Indy Port für die Delphi VCL - alles sehr aktuell. Daher nicht so typisch die Meldungen.

Aber TPNGObjects werden da nicht verwendet ;)

Gruß Assertor

P.S.: Hab grad Graphics32 gesehen. Da ist auch kein adäquater Ersatz für TPNGImageList. Ich versuche mal das nachzuprüfen...

omata 17. Mai 2008 19:50

Re: Ersatz für Buggy/Deprecated pngdelphi?
 
Liste der Anhänge anzeigen (Anzahl: 1)
Kannst du nicht einfach mal eine leere Anwendung zum testen benutzen.

Edit: Die TPNGImageList musste ich erstmal finden! (hier)
Edit2: Anhang enthält mal das Archiv (ohne Setup!)

Andreas L. 17. Mai 2008 20:45

Re: Ersatz für Buggy/Deprecated pngdelphi?
 
Liste der Anhänge anzeigen (Anzahl: 1)
Bei TBX 2.2 Alpha ist eine sehr funktionale ImageListe dabei. Leider ist die Projektseite (http://www.g32.org) schon seit Monaten down. Im Anhang das komplette Paket. Die ImageList sollte sich auch ohne installiertes Toolbar2000 installieren lassen. Vielleicht hilfts dir ja weiter, ansonsten eine der unzähligen Grafik-Libs wie z. B. Graphics32 (da hat der TBX-Autor mitgewirkt).

omata 17. Mai 2008 20:52

Re: Ersatz für Buggy/Deprecated pngdelphi?
 
So, ich habe jetzt mal alle Komponenten aus #14 ausprobiert und mit FastMM auf Speicherlecks getestet. Da ist alles in Ordnung!

Der Fehler muss in deinem Quellcode liegen.

Gruss
Thorsten

Assertor 17. Mai 2008 21:08

Re: Ersatz für Buggy/Deprecated pngdelphi?
 
Zitat:

Zitat von omata
So, ich habe jetzt mal alle Komponenten aus #14 ausprobiert und mit FastMM auf Speicherlecks getestet. Da ist alles in Ordnung!

Der Fehler muss in deinem Quellcode liegen.

Hast Du auch die Heap-Überwachung an. Da kommt etwas von Zugriff auf bereits destroyed Objects in den beiden...

An alle anderen: Danke für die Tipps, ich prüfe das nochmal ab.

omata 17. Mai 2008 21:23

Re: Ersatz für Buggy/Deprecated pngdelphi?
 
Ja habe ich, mein Testfall ist folgender...
Delphi-Quellcode:
procedure TForm.FormCreate(Sender: TObject);
type
  TMyType = record
    a:integer;
  end;
  TMyPType = ^TMyType;

var MyP:TMyPType;
begin
  new(MyP);
end;
Den zeigt mir FastMM auch als einziges an...
Code:

--------------------------------2008/5/17 22:22:17--------------------------------
A memory block has been leaked. The size is: 4

Stack trace of when this block was allocated (return addresses):
402963 [System][@GetMem]
4725AA [Unit1.pas][Unit][TForm.FormCreate]
452CCB [Forms][TCustomForm.DoCreate]
4529AB [Forms][TCustomForm.AfterConstruction]
4037D2 [System][@AfterConstruction]
452981 [Forms][TCustomForm.Create]
7C91FB6C [RtlNtStatusToDosError]
7C91FB71 [RtlNtStatusToDosError]
7C809382 [GetTickCount]
7C84051D [ValidateLocale]

The block is currently used for an object of class: Unknown

The allocation number is: 744

Current memory dump of 256 bytes starting at pointer address 1022320:
[...unwichtig, deshalb gelöscht...]

--------------------------------2008/5/17 22:22:17--------------------------------
This application has leaked memory. The small block leaks are (excluding expected leaks registered by pointer):

1 - 4 bytes: Unknown x 1

Note: Memory leak detail is logged to a text file in the same folder as this application. To disable this memory leak check, undefine "EnableMemoryLeakReporting".
Gruss
Thorsten

Assertor 17. Mai 2008 23:51

Re: Ersatz für Buggy/Deprecated pngdelphi?
 
Hallo,

danke für die ganze Hilfe. Ich habe jetzt beschlossen, die MemoryLeaks zu ignorieren, da ja PNGdelphi dank Gustavo Daud in Tiburón enthalten sein wird.

Somit liegt das Problem dann in der VCL und nicht bei mir ;)

Gruß Assertor


Alle Zeitangaben in WEZ +1. Es ist jetzt 15:55 Uhr.
Seite 2 von 2     12   

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024 by Thomas Breitkreuz