You are not logged in.
Pages: 1
Please would you split up SynCommon.pas into at least 10 units? 1.5MB is very hard to handle. Half an hour for scrolling bothers...
Thank you!
Offline
This unit does not work with D6 very well.
I get not reproducible Debugger crash (Delphi 6) here:
InitSynCommonConversionTables;
or
RetrieveSystemInfo;
Last edited by RalfS (2014-09-27 14:18:18)
Offline
This unit does not work with D6 very well.
I get not reproducible Debugger crash (Delphi 6) here:
InitSynCommonConversionTables;
or
RetrieveSystemInfo;
Offline
bugfix1:
{$ifdef DOPATCHTRTL}
if DebugHook=0 then // patch VCL/RTL only outside debugging
InitRedirectCode;
{$endif}
bugfix2:
{$define PUREPASCAL}
Last edited by RalfS (2014-09-27 21:07:34)
Offline
bugfix3:
Following procedures don't respect the PurePascal define:
function SystemFillCharAddress: Pointer;
procedure CopyArray(dest, source, typeInfo: Pointer; cnt: PtrUInt);
procedure _Finalize(Data: Pointer; TypeInfo: Pointer);
procedure RecordCopy(var Dest; const Source; TypeInfo: pointer);
procedure RecordClear(var Dest; TypeInfo: pointer);
function VariantsDispInvokeAddress: pointer;
procedure _DynArrayClear(var a: Pointer; typeInfo: Pointer);
procedure _FinalizeArray(p: Pointer; typeInfo: Pointer; elemCount: PtrUInt);
procedure SynRtlUnwind(TargetFrame, TargetIp: pointer; ExceptionRecord: PExceptionRecord; ReturnValue: Pointer); stdcall;
function TSynLog._Release: Integer;
class function TSynLog.Enter(aInstance: TObject; aMethodName: PUTF8Char; aMethodNameLocal: boolean): ISynLog;
procedure TSynLog.Log(Level: TSynLogInfo);
procedure AddStackManual(Stack: PPtrUInt);
64bit:
function StrInt32(P: PAnsiChar; val: PtrInt): PAnsiChar;
function StrUInt32(P: PAnsiChar; val: PtrUInt): PAnsiChar;
function bswap32(a: cardinal): cardinal; {$ifdef FPC}nostackframe; assembler;{$endif}
function StrLen(S: pointer): PtrInt;
Offline
While in a perfect world I wish this huge SynCommon.pas unit will be split into smaller modules (for a lot of good reasons), but I can easily live with its current statues. Aside from Ctrl+G MVP mentioned, you can also utilize the GREP search function of GExperts.
Delphi XE4 Pro on Windows 7 64bit.
Lazarus trunk built with fpcupdelux on Windows with cross-compile for Linux 64bit.
Offline
@Ralf
I used the unit with Delphi 6 daily for almost 4 years, at my previous work, when maintaining huge application.
Defining PUREPASCAL for Delphi 6 is dubious. This is not the solution. It is like using a nuclear bomb to catch a fly.
The asm version of PUREPASCAL are in fact needed, when patching the low-level RTL, or to use the optimized x86/x64 version.
Outside Win32/Win64, PUREPASCAL will in fact be pure pascal - and work with ARM (we are currently making all our units compatible with FPC and also ARM, so I know what I say a little).
I suspect you are changing the default options of Synopse.inc, e.g. adding range checking or such for our units.
We run the automated tests with Delphi 6 here without any issue.
And use SynCommons in production worldwide with Delphi 6 compiled applications.
Could you say more about your problem?
Perhaps un-defining DOPATCHTRTL conditional may help you.
Offline
I had several crashes of program and debugger in D6. Undefing DOPATCHTRTL and using PurePascal solve 2 of them. See post above. I prefer not having manipulations on my RTL/VCL. This is the cause for most problems I had so far.
Offline
Where does it crash? Are you using SynCommons in packages? Did you change Synopse.inc?
DOPATCHTRTL and PUREPASCAL have a wide code scope - we need to identify what is wrong in your case.
Disabling them is not a viable solution.
Offline
You should apply bugfix1 first. Second question: What is PurePascal for when its not a solution?
Offline
I have applied bugfix 1.
See http://synopse.info/fossil/info/0a1175cf9b
Thanks for the report.
PUREPASCAL is to be used when compiled e.g. on ARM CPU (for future FPC / Linux).
Offline
Thanks!
Offline
RedirtectCode is being called in SynRegisterCustomVariantType when DoPatchRTL is off.
Offline
Pages: 1