AGB  ·  Datenschutz  ·  Impressum  







Anmelden
Nützliche Links
Registrieren
Thema durchsuchen
Ansicht
Themen-Optionen

sporadische Exceptions bei TForm.SetFocus

Ein Thema von dataspider · begonnen am 28. Jul 2021 · letzter Beitrag vom 30. Jul 2021
 
Benutzerbild von dataspider
dataspider

Registriert seit: 9. Nov 2003
Ort: 04539 Groitzsch
1.350 Beiträge
 
Delphi 11 Alexandria
 
#1

sporadische Exceptions bei TForm.SetFocus

  Alt 28. Jul 2021, 07:53
Hallo

Ich erhalte von MadExcept immer mal einen Fehlerbericht, z.B.:

exception class : EAccessViolation
exception message : Zugriffsverletzung bei Adresse 006BCFBF in Modul 'AIS3.exe'. Lesen von Adresse 00000040.

006bcfbf +1cb AIS3.exe Vcl.Forms TCustomForm.SetFocusedControl
005c66e7 +21f AIS3.exe Vcl.Controls TWinControl.WndProc
008f0118 +1ac AIS3.exe cxControls TcxControl.WndProc
00bd963d +029 AIS3.exe cxGridCustomView TcxGridSite.WndProc
005c60d0 +02c AIS3.exe Vcl.Controls TWinControl.MainWndProc
004ff5c0 +014 AIS3.exe System.Classes StdWndProc
77bd0d94 +034 ntdll.dll KiUserCallbackDispatcher
033900f2 +066 AIS3.exe RWForms 1399 +8 TRWForm.doMouseActivate
033904ef +0ef AIS3.exe RWForms 1586 +26 TRWForm.WMMouseActivate

Hier die betreffende Routine
Delphi-Quellcode:
procedure TRWForm.doMouseActivate(AControl: TControl);
begin
  if (not WinControlValid(Self)) or IsDestroying then
    Exit;
  FLastClickedControl := AControl;
  if (Self <> rwScreen.ActiveForm) then
  begin
    try
      if (Visible and CanFocus) then
        SetFocus; // Hier wird Exception ausgelöst!
    except
      ///// Nur vorübergehend
    end;
    rwScreen.ActiveForm := Self;
  end;
end;
Was kann noch die Ursache für eine Exception sein?
Ich teste doch schon auf Visible, CanFocus und csDestroying...
Wichtig, ich benutze embedded Forms...

Frank
Frank Reim

Geändert von dataspider (28. Jul 2021 um 08:08 Uhr)
  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 03:10 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