View Issue Details

IDProjectCategoryView StatusLast Update
0000890JEDI VCL00 JVCL Componentspublic2003-07-27 05:04
ReporterdanyszAssigned Tomarcelb 
PrioritynormalSeverityblockReproducibilityalways
Status closedResolutionfixed 
Product Version 
Target VersionFixed in Version 
Summary0000890: The JvScheduledEvents1 on empty application create AV in JCLRTTI...
DescriptionIf you just add the component to an empty form and application when you start running you just got an AV

procedure LocateIsClass;
var
  AddrOfHelper: PReadLoc;
begin
  AddrOfHelper := PReadLoc(Addr(LocateIsClassHelper));
  OrgIsClass := Pointer(AddrOfHelper.CallOffset + Longint(AddrOfHelper) +
    SizeOf(TReadLoc));
  with PJmp(OrgIsClass)^ do
  begin
    if OpCodeJmp = $FF then
      // _IsClass is in a package. Obtain address in the package.
      OrgIsClass := Pointer(PInteger(EntryOffset)^);
  end;
  Move(PChar(OrgIsClass), SavedIs, SizeOf(SavedIs));
end;

The relevant row is : "if OpCodeJmp = $FF then".

TagsNo tags attached.

Activities

marcelb

2003-04-30 01:35

manager   ~0001962

Created a new application, dropped a TJvScheduledEvents on it, compiled and executed the application. No errors. Added a schedule to the component, compiled and executed again. Still no errors.

Which version of JVCL do you use?
Which version Delphi?
Which OS?

marcelb

2003-04-30 06:46

manager   ~0001963

I think I found the reason (although I still haven't been able to reproduce it). It's related to JCL bug 0000744. LocateIsClassHelper and LocateAsClassHelper can be removed and LocateIsClass and LocateAsClass are to be rewritten as:

1: procedure LocateIsClass;
2: begin
3: asm
4: MOV EAX,OFFSET System.@IsClass
5: MOV OrgIsClass, EAX
6: end;
7: Move(PChar(OrgIsClass), SavedIs, SizeOf(SavedIs));
8: end;

and

1: procedure LocateAsClass;
2: begin
3: asm
4: MOV EAX,OFFSET System.@AsClass
5: MOV OrgAsClass, EAX
6: end;
7: Move(PChar(OrgAsClass), SavedAs, SizeOf(SavedAs));
8: end;

respectively (line numbers added to avoid format screw up)

danysz

2003-04-30 07:15

reporter   ~0001965

Sorry for the delay...

Delphi 7.
Latest release from sourceforge
Win 2k Pro. SP 3

Regarding the function si exactly thi sone since I worte where is bloiwing.

Thanks

Daniel

danysz

2003-04-30 07:15

reporter   ~0001966

Sorry ... It's D7 Architect

Daniel

marcelb

2003-04-30 08:19

manager   ~0001967

Did rewriting the functions above (LocateIsClass and LocateAsClass in JclRTTI) solve this issue?

danysz

2003-04-30 08:24

reporter   ~0001968

I will change the functions later ( about 4 hours) and I will let you know.

Daniel

danysz

2003-04-30 10:17

reporter   ~0001970

I change the functions in JclRTTI and now it looks it is working. I will make more test and I will le tyou know..

Daniel

danysz

2003-04-30 21:39

reporter   ~0001974

It's working. Now there is a new bug but this part is working and I can't see that the RTTI changes create other problems.

Daniel

Issue History

Date Modified Username Field Change