Delphi-PRAXiS

Delphi-PRAXiS (https://www.delphipraxis.net/forum.php)
-   Sonstige Fragen zu Delphi (https://www.delphipraxis.net/19-sonstige-fragen-zu-delphi/)
-   -   Delphi Zugriffsverletzung bei Tform.update (https://www.delphipraxis.net/8516-zugriffsverletzung-bei-tform-update.html)

lkz633 6. Sep 2003 18:33


Zugriffsverletzung bei Tform.update
 
Hallo,

habe foldenden code:
Code:
 FSplash := tFSplash.Create (Application);
  Try
    // SplashScreen Fenster anzeigen
    Application.Initialize;
    Application.Title := 'WWCL Tool 1.0';
    Application.CreateForm(Tfmain, fmain);
    FSplash.Show;
    fsplash.Update;
    Application.CreateForm(Tform2, form2);
    Application.CreateForm(Tform3, form3);

    sleep(300);
   FSplash.Hide;
  finally
    FSplash.Free;
  end;
  Application.Run;
end.
Bei FSplash.update kommt es immer zu einer zugriffsverletzung. Woran liegt dies? Wenn ich den Code Zeile fuer Zeile debugge, kommt diese Verletzung nicht. Wo kann das Problem liegen?

Im oncreate von fmain fuelle ich eineImagekomponente des FSplash Formulars mit einem Bild, aber das muesste ja auch ok sein, da das fsplash- Formular ja bereits erzeugt wurde

Danke fuer eure Hilfe
lkz633

Christian Seehase 7. Sep 2003 00:34

Re: Zugriffsverletzung bei Tform.update
 
Moin lkz,

wenn ein Fehler im normalen Programmlauf auftritt, beim Singlestep aber nicht, liegt vermutlich ein Timingproblem vor.
Eine Funktion will etwas verarbeiten, dass noch nicht da ist.

Warum lässt Du die Update Zeile nicht weg, bzw. ersetzt sie durch Application.ProcessMessages?

lkz633 7. Sep 2003 12:17

Re: Zugriffsverletzung bei Tform.update
 
Weglassen habe ich bereits versucht, dann wird das Fenster nicht angeyeigt, und bei application.processmessages kommt auch eine Zugriffsverletzung

Gruss lkz633

Christian Seehase 7. Sep 2003 12:50

Re: Zugriffsverletzung bei Tform.update
 
Moin lkz,

kann es sein, dass TFSplash einen Fehler hat?

lkz633 7. Sep 2003 13:01

Re: Zugriffsverletzung bei Tform.update
 
leider nein, da das Fenster rein gar nichts macht, ausser ein jpg bild und eine Caption anzeigt. Gibt es vielleicht Probleme mit JPG und Update/processmessages?

Gruss lkz633

Christian Seehase 7. Sep 2003 13:04

Re: Zugriffsverletzung bei Tform.update
 
Moin lkz,

statt
Delphi-Quellcode:
FSplash := tFSplash.Create (Application);
probier's mal mit
Delphi-Quellcode:
FSplash := tFSplash.Create (nil);

lkz633 7. Sep 2003 13:42

Re: Zugriffsverletzung bei Tform.update
 
Leider hat auch dieses nicht geholfen.

Ich verstehe das nicht, wie kann durch ein application.porocessmessages eine Zugriffsverletzung zustande kommen.

Gruss lkz633

neolithos 8. Sep 2003 08:00

Re: Zugriffsverletzung bei Tform.update
 
Schon mal das Jpeg entfernt und dann versucht?


Alle Zeitangaben in WEZ +1. Es ist jetzt 17:57 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