Welcome, Guest
Username: Password: Remember me
General discussions, feature requests for CodeTyphon Project and discussions that don't fit in any of the other specific CodeTyphon forum categories.
  • Page:
  • 1

TOPIC:

Version 5.30 Errors 9 years 6 months ago #7237

  • Dinko
  • Dinko's Avatar Topic Author
  • Offline
  • Junior Member
  • Junior Member
  • Posts: 91
  • Thank you received: 5
Hello.
I have big project which use Typhon version 5.10.
Now I tried to compile it with version 5.30 (Win32 version)
So far I found following inconsistance.
1. VirtualTreeView package is impossible to cross compile from Typhon Win32 to win64. You get error: Error: Illegal processor type "x86_64-Rintel".
I know that this was the same error as in version 5.20 and it was avoidable if you choose in Compiler Options/Parsing comiler options Default instead of Intel.
With version 5.30 this does not work any more.
2. Component TfrBarCodeView is renamed to TfrBarcodeView which makes it impossible to load forms which use TFrBarCodeView. You need to change lfm manually in notepad
3. GZip problem in indy components still exists: At line 630 you need to put
//&&&& Fix (add the following lines)
if (strm.avail_in = 0) and (strm.avail_out = 0) then begin
WriteOut;
end;
//&&&& Fix end
4. When you use Postgres and you make Win64 application, all postgres fields which are float, are taked by application as FMTBCD and result is multiplied with 10000
Try this select and read values SELECT CODE_DATABASE, CAST(1.401 as NUMERIC(8,4)) as NUM1, CAST(1.401 as NUMERIC(28, 8)) as NUM2 FROM CONF_DATABASE.
MyNum11 := MyQuery.FieldByName('NUM1').AsFloat;
MyNum21 := MyQuery.FieldByName('NUM2').AsFloat;

5. If you try to open old project which have form opened (saved in session), and this form are inherited from some other form, then Typhon first hangs and then crash. To avoid this problem you need to uncheck embedded form designer, restart typhon and then try to open project.

6. This is very BIG error which make this version not good for production. In DataUtils.inc there is big error in function
Function LocalTimeToUniversal(LT: TDateTime;TZOffset: Integer): TDateTime;
I use this function to convert local time to utc
Prior version was correct:
Function LocalTimeToUniversal(LT: TDateTime;TZOffset: Integer): TDateTime;

begin
if (TZOffset > 0) then
Result := LT + EncodeTime(TZOffset div 60, TZOffset mod 60, 0, 0)
else if (TZOffset < 0) then
Result := LT - EncodeTime(Abs(TZOffset) div 60, Abs(TZOffset) mod 60, 0, 0)
else
Result := LT;
end;

New version is:

Function LocalTimeToUniversal(LT: TDateTime;TZOffset: Integer): TDateTime;

begin
if (TZOffset > 0) then
Result := LT - EncodeTime(TZOffset div 60, TZOffset mod 60, 0, 0)
else if (TZOffset < 0) then
Result := LT + EncodeTime(Abs(TZOffset) div 60, Abs(TZOffset) mod 60, 0, 0)
else
Result := LT;
end;


They changed in LT - and LT + which gives opposite result. Insted time is minus, you retrive time plus and opposite.

Regards, Dinko

Please Log in or Create an account to join the conversation.

Version 5.30 Errors 9 years 6 months ago #7242

  • Sternas Stefanos
  • Sternas Stefanos's Avatar
  • Offline
  • Moderator
  • Moderator
  • Ex Pilot, M.Sc, Ph.D
  • Posts: 4535
  • Thank you received: 1114
Thanks Sir
we will test and put your fix in Lab version
please help us
1. Fixed
3. in which file ?
6. DataUtils.inc is the file ?
PilotLogic Architect and Core Programmer

Please Log in or Create an account to join the conversation.

Last edit: by Sternas Stefanos.

Version 5.30 Errors 9 years 6 months ago #7247

  • Dinko
  • Dinko's Avatar Topic Author
  • Offline
  • Junior Member
  • Junior Member
  • Posts: 91
  • Thank you received: 5
1. How can I apply fix for virtualTreeView? Where can I download updated package?

3. File is IdZLib.pas
6. Yes, DateUtils.inc is the file, but I think that this is some general problem of fpc trunk source. Is your responsibility to fix that or this is responsibility of fpc developers. Maybe, they are changing something global and because of that we now have this error.


Thanks for quick response.

Please Log in or Create an account to join the conversation.

Version 5.30 Errors 9 years 6 months ago #7248

  • Sternas Stefanos
  • Sternas Stefanos's Avatar
  • Offline
  • Moderator
  • Moderator
  • Ex Pilot, M.Sc, Ph.D
  • Posts: 4535
  • Thank you received: 1114
Here Sir
pl_VirtualTrees ver 5.4.1
please test and report

in IdZLib.pas line 630 is procedure IndyCompressStream
can you post here the correct procedure code?
is like this ?
begin
  FillChar(strm, SizeOf(strm), 0);

  InBuf          := nil;
  OutBuf         := nil;
  LastOutCount   := 0;

//=========================================================== ct9999 
  if (strm.avail_in = 0) and (strm.avail_out = 0) then 
    begin
      WriteOut;
    end;
//===========================================================

  strm.next_in   := DMAOfStream(InStream, strm.avail_in);
  UseInBuf := strm.next_in = nil;
PilotLogic Architect and Core Programmer

Please Log in or Create an account to join the conversation.

Last edit: by Sternas Stefanos.

Version 5.30 Errors 9 years 6 months ago #7250

  • Dinko
  • Dinko's Avatar Topic Author
  • Offline
  • Junior Member
  • Junior Member
  • Posts: 91
  • Thank you received: 5
In attachment you can find correct code.

Regards, Dinko
Attachments:

Please Log in or Create an account to join the conversation.

Version 5.30 Errors 9 years 6 months ago #7251

  • Sternas Stefanos
  • Sternas Stefanos's Avatar
  • Offline
  • Moderator
  • Moderator
  • Ex Pilot, M.Sc, Ph.D
  • Posts: 4535
  • Thank you received: 1114
Thanks Sir,
we put this fix in to Lab CT 5.40
PilotLogic Architect and Core Programmer

Please Log in or Create an account to join the conversation.

Version 5.30 Errors 9 years 6 months ago #7252

  • Dinko
  • Dinko's Avatar Topic Author
  • Offline
  • Junior Member
  • Junior Member
  • Posts: 91
  • Thank you received: 5
New pl_VirtualTrees.7z is OK but you need to choose Default instead of Intel (see attached picture).

Thanks, Dinko

Please Log in or Create an account to join the conversation.

  • Page:
  • 1