View Issue Details

IDProjectCategoryView StatusLast Update
0002134JEDI VCL00 JVCL Componentspublic2006-04-03 00:53
ReportermaxpAssigned To 
Status closedResolutionopen 
Product Version 
Target VersionFixed in Version 
Summary0002134: JvInterpreter incorrectly treats float in Open Arrays (using floats in open array parameters leads to AV)
DescriptionTJvInterpreterArgs.OpenArray method (based on V2OA procedure) incorrectly treats Float arguments. See V2OA fragment:
case TVarData(V[I]).VType of
  varDouble, varCurrency:
      OAValues[I] := V[I];
      OA[I].VExtended := TVarData(V[I]).VPointer; //Line(*)
      OA[I].VType := vtExtended;

I think Line(*) is completely wrong: OA[I].VExtended expects PExtended value (reference to Extended type) but gets invalid pointer. Variant cannot contain information of Extended type so in this realization of V2OA procedure it is impossibly to pass float values at all. I it would be better to remove this lines (replace them with something like 'Not Implemented') error then keep certainly wrong piece of code.
Additional Informationto see the bug try to execute JvInterpreter script and you should get an AV:
unit TestUnit; // JvInterpreter unit!
  A: Double;
  I: Integer;

procedure Main;
  A := 3.1415926;
  I := 31415926;
  ShowMessage(Format('%f', [A]));

I'v attached this example as
TagsNo tags attached.


duplicate of 0002675 resolvedobones Format function in JvInterpreter 


2004-09-10 01:29


JvInterpreterTest.ZIP (1,527 bytes)


2005-08-10 03:20

administrator   ~0007766

Could anyone have a look at this ?


2006-04-03 00:53

administrator   ~0008815

See issue 0002675, it has a solution for it, and the solution will be in CVS as soon as it's back online:

Issue History

Date Modified Username Field Change
2004-09-10 01:29 maxp New Issue
2004-09-10 01:29 maxp File Added: JvInterpreterTest.ZIP
2005-08-10 03:20 obones Note Added: 0007766
2005-08-10 03:20 obones Status new => feedback
2006-04-03 00:53 obones Relationship added duplicate of 0002675
2006-04-03 00:53 obones Status feedback => closed
2006-04-03 00:53 obones Note Added: 0008815