Project JEDI - Issue Tracker
Mantis Bugtracker

Viewing Issue Simple Details Jump to Notes ] View Advanced ] Issue History ] Print ]
ID Category Severity Reproducibility Date Submitted Last Update
0004278 [JEDI VCL] 00 JVCL Components crash always 2007-10-27 04:11 2008-07-21 00:12
Reporter ZENsan View Status public  
Assigned To obones
Priority normal Resolution fixed  
Status resolved   Product Version Daily / GIT
Summary 0004278: TJvAppEvents exception and total crash when using OnActiveControlChange
Description JvAppEvents calls OnActiveControlChange also after JvAppEvents.Chained = False!!! Whis produce unhandled situations and problems.
Source project attached.
Additional Information That was difficult to catch out where is the problem in my project. Because I had verry difficult structure and interfaces/threads and thread safe version of JvDebugHandler.. So at the end I found where is the problem!
Tags No tags attached.
Attached Files 7z file icon JvAppEvents.7z [^] (14,094 bytes) 2007-10-27 04:11

- Relationships

-  Notes
(0014000)
ZENsan (reporter)
2007-10-27 04:16

I understand that onActiveControlChange notification goes from Screen object, but I think that it is not correct to call OnChangeActiveControl in DoActiveControlChange JvAppEvent.pas[539] there must be a check for "Chained"!
And this also belongs to all other events such as OnActiveFormChange which also comes from Screen object.
(0014001)
ZENsan (reporter)
2007-10-27 04:25

var
  I: Integer;
begin
  for I := FAppEvents.Count - 1 downto 0 do
  begin
    TJvAppEvents(FAppEvents[I]).FCancelDispatch := False;
    if Assigned(TJvAppEvents(FAppEvents[I]).FOnActiveControlChange) then
      TJvAppEvents(FAppEvents[I]).FOnActiveControlChange(Sender);
    if not TJvAppEvents(FAppEvents[I]).Chained or
     TJvAppEvents(FAppEvents[I]).FCancelDispatch then
      Exit;
  end;
  if Assigned(FOnActiveControlChange) then
    FOnActiveControlChange(Sender);

Maybe that line "if not TJvAppEvents(FAppEvents[I]).Chained TJvAppEvents(FAppEvents[I]).FCancelDispatch then Exit;" must be before previous lines?
And if we replace Original events of objects Application and Screen why
Originals must not be called when your AppEvents object is not chained: ?

  if Assigned(FOnActiveControlChange) then
    FOnActiveControlChange(Sender);

if that Exit; works then this will not be called, but your Appevents.OnActiveControlChange(..) - will be called. It must be opposite I think..
(0014173)
obones (administrator)
2008-02-20 06:55

Can you explain to me in more details using simple terms what the problem is? I'm having a hard time understanding it.
(0014398)
ZENsan (reporter)
2008-07-18 02:16

I see that now it is resolved. So we can close this issue.

- Issue History
Date Modified Username Field Change
2007-10-27 04:11 ZENsan New Issue
2007-10-27 04:11 ZENsan File Added: JvAppEvents.7z
2007-10-27 04:16 ZENsan Note Added: 0014000
2007-10-27 04:25 ZENsan Note Added: 0014001
2008-02-20 06:55 obones Note Added: 0014173
2008-02-20 06:55 obones Status new => feedback
2008-07-18 02:16 ZENsan Note Added: 0014398
2008-07-21 00:12 obones Status feedback => resolved
2008-07-21 00:12 obones Fixed in Version => Daily / SVN
2008-07-21 00:12 obones Resolution open => fixed
2008-07-21 00:12 obones Assigned To => obones


Mantis 1.1.6[^]
Copyright © 2000 - 2008 Mantis Group
Powered by Mantis Bugtracker