AGB  ·  Datenschutz  ·  Impressum  







Anmelden
Nützliche Links
Registrieren
Zurück Delphi-PRAXiS Programmierung allgemein Programmieren allgemein Exception der Klasse EAccessViolation aufgetreten!
Thema durchsuchen
Ansicht
Themen-Optionen

Exception der Klasse EAccessViolation aufgetreten!

Ein Thema von T.E. · begonnen am 31. Jul 2007 · letzter Beitrag vom 31. Jul 2007
 
T.E.

Registriert seit: 27. Mai 2007
Ort: Hamburg
284 Beiträge
 
Delphi XE2 Enterprise
 
#1

Exception der Klasse EAccessViolation aufgetreten!

  Alt 31. Jul 2007, 15:28
Hallo

Beim Kompilieren eines meiner Projekte, tritt (mir unerklärlicher Weise) folgende Exception auf:

---------------------------
Benachrichtigung über Debugger-Exception
---------------------------
Im Projekt BrainTrainer.exe ist eine Exception der Klasse EAccessViolation aufgetreten. Meldung: 'Zugriffsverletzung bei Adresse 0046120E in Modul 'BrainTrainer.exe'. Lesen von Adresse 000002F4'. Prozess wurde angehalten. Mit Einzelne Anweisung oder Start fortsetzen.
---------------------------
OK Hilfe
---------------------------

Ich weiß auch nicht was mit der Zugriffsverletzung gemeint ist...
Weiß jemand wo der Fehler liegt und eine Lösung?

Hier ist der Quellcode des Hauptformulars:
Delphi-Quellcode:
unit StartbildschirmUnit;

interface

uses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs, StdCtrls, ComCtrls, jpeg, ExtCtrls, LMDControl, LMDBaseControl,
  LMDBaseGraphicControl, LMDBaseLabel, LMDCustomLabel, LMDCustomLabelFill,
  LMDLabelFill, LMDCustomSimpleLabel, LMDSimpleLabel;

type
  TStartbildschirm = class(TForm)
    StartTimer: TTimer;
    Image1: TImage;
    Label1: TLabel;
    Label2: TLabel;
    LMDSimpleLabel1: TLMDSimpleLabel;
    Memo1: TMemo;
    ProgressBar1: TProgressBar;
    Timer1: TTimer;
    LMDSimpleLabel2: TLMDSimpleLabel;
    LMDSimpleLabel3: TLMDSimpleLabel;
    LMDSimpleLabel4: TLMDSimpleLabel;
    Label3: TLabel;
    Label4: TLabel;
    Memo2: TMemo;
    Label5: TLabel;
    Label6: TLabel;
    Label7: TLabel;
    procedure StartTimerTimer(Sender: TObject);
    procedure FormShow(Sender: TObject);
    procedure FormCreate(Sender: TObject);
    procedure Timer1Timer(Sender: TObject);
  private
    { Private-Deklarationen }
  public
    { Public-Deklarationen }
  end;

var
  Startbildschirm: TStartbildschirm;

implementation

uses Inifiles, BrainTrainerStartUnit, Registry, InfoUnit, BestenlisteUnit, AnfaengerUnit, MittelUnit, ProfiUnit, GenieUnit,EndeUnit,
  RegSchluesselEingabeUnit, CommCtrl, OptionsUnit;

{$R *.dfm}

procedure TStartbildschirm.StartTimerTimer(Sender: TObject);
begin
  Start.show;
  Startbildschirm.Visible := false;
  if Start.Visible = true then
  begin
    Startbildschirm.StartTimer.Enabled := false ;
  end;
end;


procedure TStartbildschirm.FormShow(Sender: TObject);
begin
  if FileExists('C:\Program Files\E.T.-IT Software Corporation\BrainTrainer 2.0\RegKey.txt') then
    begin
      Memo1.Lines.LoadFromFile('C:\Program Files\E.T.-IT Software Corporation\BrainTrainer 2.0\RegKey.txt');
    end;
end;

procedure TStartbildschirm.FormCreate(Sender: TObject);
var regist: TRegistry;
  i: integer;
  s: string;
  datum1, datum2, datum3: TDate;
  ini : TInifile;
begin
{
if FileExists('C:\Program Files\E.T.-IT Software Corporation\BrainTrainer 2.0\FVsRegKey.rep') then
  begin
    startbildschirm.Memo1.Lines.LoadFromFile('C:\Program Files\E.T.-IT Software Corporation\BrainTrainer 2.0\FVsRegKey.rep');
    Startbildschirm.LMDSimpleLabel1.visible := false;
    Startbildschirm.LMDSimpleLabel2.Visible := false;
    Startbildschirm.LMDSimpleLabel3.Visible := false;
    Startbildschirm.LMDSimpleLabel4.Visible := false;
  end;
}

  regist:=TRegistry.Create;
  try
    regist.RootKey:=HKEY_LOCAL_MACHINE; //voreingestellt ist HKEY_CURRENT_USER
    regist.OpenKey('SOFTWARE\E.T.-IT Software Corporation\BrainTrainer\2.0',true);
    regist.WriteString('Product', 'BrainTrainer');
    regist.WriteString('Version', '2.0');
    regist.WriteString('Seriennummer', 'PTIN-ZVUW-MKOH-XZ5D');
     if LMDSimpleLabel1.Visible = true then
      begin
        regist.WriteString('', 'Unregistriert');
      end else
      begin
        regist.WriteString('', 'Registriert');
      end;

  finally
    regist.Free;
end;

 if FileExists('C:\Program Files\E.T.-IT Software Corporation\BrainTrainer 2.0\language.ini') then
    try
    Ini:=TIniFile.Create('C:\Program Files\E.T.-IT Software Corporation\BrainTrainer 2.0\language.ini');
    label7.Caption:=Ini.ReadString('favoritelanguage','language','Wert');

    finally
    Ini.Free;
  end;

startbildschirm.label5.Caption := datetostr(now);
if fileexists('C:\Program Files\E.T.-IT Software Corporation\BrainTrainer 2.0\regdate.rep') then
begin
startbildschirm.memo2.Lines.LoadFromFile('C:\Program Files\E.T.-IT Software Corporation\BrainTrainer 2.0\regdate.rep');
startbildschirm.label4.Caption := startbildschirm.memo2.Text;
datum1:=StrToDate(label4.Caption);
  datum2:=now;
{ datum3:=label3.caption;}

  //Differenz zwischen datum1 und datum2 in Tagen
  datum3:=datum2-datum1;

label3.Caption := datetostr(datum3);
SendMessage(Startbildschirm.ProgressBar1.Handle, PBM_SETBARCOLOR, 0,cllime);
if FileExists('C:\Program Files\E.T.-IT Software Corporation\BrainTrainer 2.0\Config.reg') then
  begin
    Options.visible:=false;
  end else
    Options.visible:=true;
  end;
end;

procedure TStartbildschirm.Timer1Timer(Sender: TObject);
begin
  ProgressBar1.StepIt;
end;
end.
Hier habe ich dann noch mal den Quelcode der Projektdatei:

Delphi-Quellcode:
program BrainTrainer;

uses
  Forms,
  StartbildschirmUnit in 'StartbildschirmUnit.pas{Startbildschirm},
  BrainTrainerStartUnit in 'BrainTrainerStartUnit.pas{Start},
  BestenlisteUnit in 'BestenlisteUnit.pas{Bestenliste},
  InfoUnit in 'InfoUnit.pas{Info},
  AnfaengerUnit in 'AnfaengerUnit.pas{Anfaenger},
  MittelUnit in 'MittelUnit.pas{Mittel},
  ProfiUnit in 'ProfiUnit.pas{Profi},
  GenieUnit in 'GenieUnit.pas{Genie},
  EndeUnit in 'EndeUnit.pas{Ende},
  KontaktUnit in 'KontaktUnit.pas{Kontakt},
  HinweisUnit in 'HinweisUnit.pas{Hinweis},
  RegSchluesselEingabeUnit in 'RegSchluesselEingabeUnit.pas{RegistrierungsschluesselEingeben},
  RegKeyUnit in 'RegKeyUnit.pas{RegKey},
  PCRECHNERUnit in 'PCRECHNERUnit.pas{PCRECHNER},
  NeuerUser in 'NeuerUser.pas{NeuerBenutzer},
  PCRECHNERFortgeschritten in 'PCRECHNERFortgeschritten.pas{PCRFortgeschritten},
  PCRECHNERGenie in 'PCRECHNERGenie.pas{PCRGEnie},
  PCRECHNERProfi in 'PCRECHNERProfi.pas{PCRProfi},
  OptionsUnit in 'OptionsUnit.pas{Options};

{$R *.res}

begin
 Application.Initialize;
  Application.Title := 'BrainTrainer';
  Application.HelpFile := 'C:\Program Files\E.T.-IT Software Corporation\BrainTrainer 2.0\HILFE.HLP';
  Application.CreateForm(TStartbildschirm, Startbildschirm);
  
  Application.CreateForm(TStart, Start);

  Application.CreateForm(TInfo, Info);
  Application.CreateForm(TAnfaenger, Anfaenger);
  Application.CreateForm(TMittel, Mittel);
  Application.CreateForm(TProfi, Profi);
  Application.CreateForm(TGenie, Genie);
  Application.CreateForm(TBestenliste, Bestenliste);
  Application.CreateForm(TEnde, Ende);
  Application.CreateForm(TKontakt, Kontakt);
  Application.CreateForm(THinweis, Hinweis);
  Application.CreateForm(TRegistrierungsschluesselEingeben, RegistrierungsschluesselEingeben);
  Application.CreateForm(TRegKey, RegKey);
  Application.CreateForm(TPCRECHNER, PCRECHNER);
  Application.CreateForm(TNeuerBenutzer, NeuerBenutzer);
  Application.CreateForm(TPCRFortgeschritten, PCRFortgeschritten);
  Application.CreateForm(TPCRGEnie, PCRGEnie);
  Application.CreateForm(TPCRProfi, PCRProfi);
  Application.CreateForm(TOptions, Options);
  Application.Run;
end.
Da das 19 Formulare sind hab hier halt nur die zwei wichtigsten genommen!
PS: Nach der Exception war vor "Application.CreateForm(TStart, Start);" ein Pfeil (vllt. hilft das ja jemandem ...)
Gruß Torben
  Mit Zitat antworten Zitat
 


Forumregeln

Es ist dir nicht erlaubt, neue Themen zu verfassen.
Es ist dir nicht erlaubt, auf Beiträge zu antworten.
Es ist dir nicht erlaubt, Anhänge hochzuladen.
Es ist dir nicht erlaubt, deine Beiträge zu bearbeiten.

BB-Code ist an.
Smileys sind an.
[IMG] Code ist an.
HTML-Code ist aus.
Trackbacks are an
Pingbacks are an
Refbacks are aus

Gehe zu:

Impressum · AGB · Datenschutz · Nach oben
Alle Zeitangaben in WEZ +1. Es ist jetzt 12:15 Uhr.
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