![]() |
Exception bei Programmende
Moin,
wenn mein Programm beendet wird bekomme ich am Schluss folgende Exception: --------------------------- Benachrichtigung über Debugger-Exception --------------------------- Im Projekt Csv2008.exe ist eine Exception der Klasse $C0000005 mit der Meldung 'access violation at 0x00000000: read of address 0x00000000' aufgetreten. --------------------------- Anhalten Fortsetzen Hilfe --------------------------- Ich nehme an das ich da irgendwas nicht wieder freigegeben habe - aber ein Vergleich der verschiedenen Creates und Frees hat nichts ergeben - ich glaube (!) das ich alles auch wieder freigebe. Wie finde ich denn raus was daran Schuld ist ? Hans |
AW: Exception bei Programmende
FastMM, MadExcept, EurekaLog usw könnte dabei helfen den schuldigen zu finden.
Ps: Vielleicht hast Du auch etwas zu früh freigegen und greifst danach nochmal darauf zu.... |
AW: Exception bei Programmende
Zitat:
|
AW: Exception bei Programmende
Zitat:
|
AW: Exception bei Programmende
Dann sind es vielleicht Klassen die keinen Owner haben.
Wie sieht der Callstack aus? |
AW: Exception bei Programmende
Liste der Anhänge anzeigen (Anzahl: 1)
Vielen Dank für Eure Hilfen, ich habe da aber nur mehrere StringList erstellt und diese alle auch richtig wieder freigegeben.
Es knallt wirklich beim beenden des Programmes - allerdings nur in der Entwicklungsumgebung - wenn ich das Programm direkt starte passiert nichts. Und zwar hier: begin Application.Initialize; Application.MainFormOnTaskbar := True; Application.CreateForm(TMainForm, MainForm); Application.CreateForm(TMailen, Mailen); Application.CreateForm(TAusgabeForm, AusgabeForm); MainForm.Show; MainForm.Verarbeitung; end. <---------------------------------- Ob das CPU-Fenster was aussagt weiß ich nciht - ich hab da mal ein Hardcopy angehängt. |
AW: Exception bei Programmende
Fehlt da nicht noch irgendwo ein
Delphi-Quellcode:
was einen bezug zur Zeile
Application.Run
Delphi-Quellcode:
hat?
Application.Initialize;
Delphi-Beispiel einer .dpr Datei:
Delphi-Quellcode:
{
This example shows progress of loading forms as an application starts up. The code example is placed in the project source (*.dpr) file. To see project source, right click on the executable file in the Project Manager and select the View Source menu item. You will need to set up your project with the following steps before using the codeexample: Add four additional forms to a default project. Place a TProgressBar on Form5 Take the Project|Options|Forms menu option and place Form5 on the available forms list. Change the code of your project (*.dpr) file to look like the example. } begin Application.Initialize; with TForm5.Create(nil) do try Application.MainFormOnTaskbar := True; ProgressBar1.Max := 100; Show; // show a splash screen contain ProgressBar control Update; // force display of Form5 Application.CreateForm(TForm1, Form1); ProgressBar1.StepBy(25); Label1.Caption := 'Form1 loaded successfully.'; Update; // force display of Form5 Sleep(3000); Application.CreateForm(TForm2, Form2); ProgressBar1.StepBy(25); Label1.Caption := 'Form2 loaded successfully.'; Update; // force display of Form5 Sleep(3000); Application.CreateForm(TForm3, Form3); ProgressBar1.StepBy(25); Label1.Caption := 'Form3 loaded successfully.'; Update; // force display of Form5 Sleep(3000); Application.CreateForm(TForm4, Form4); ProgressBar1.StepBy(25); Label1.Caption := 'Form4 loaded successfully.'; Update; // force display of Form5 Sleep(3000); finally Free; end; Application.Run; |
AW: Exception bei Programmende
Die komplette .dpr sieht so aus ....
program Csv2008; {$R *.dres} uses Vcl.Forms, Csv2008Main in 'Csv2008Main.pas' {MainForm}, MailenUnit in 'MailenUnit.pas' {Mailen}, RecordUnit in 'RecordUnit.pas', AusgabeUnit in 'AusgabeUnit.pas' {AusgabeForm}; {$R *.res} begin Application.Initialize; Application.MainFormOnTaskbar := True; Application.CreateForm(TMainForm, MainForm); Application.CreateForm(TMailen, Mailen); Application.CreateForm(TAusgabeForm, AusgabeForm); MainForm.Show; MainForm.Verarbeitung; end. Es kann aber sein das das daran liegt das ich mir mal zerschossen hatte :-( Aber bis auf die Exception in der Entwicklungsumgebung läuft alles :-) Hans |
AW: Exception bei Programmende
Das ist auf jeden Fall keine Standard DPR. Statt MainForm.Show und MainForm.Verarbeitung sollte da ein Application.Run stehen. Aber wir wissen ja auch nicht, was in MainForm.Verarbeitung so alles passiert.
|
AW: Exception bei Programmende
Zitat:
Im Formular "MainForm" ein "OnCreate" erzeugen mit "Verarbeitung" als Aufruf. Versuche das mal. |
Alle Zeitangaben in WEZ +1. Es ist jetzt 05:04 Uhr. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024 by Thomas Breitkreuz