Jump to content


Popular Content

Showing content with the highest reputation since 08/25/22 in all areas

  1. Please calm down. There is no sense in hyperventilating now in a 1.5 years old thread. In addition, useless a and total garbage have no objective meaning. If you want things to get better you should clearly describe where the current implementation doesn't fit your needs. Perhaps some slight adjustments to the workflow are enough to get you on track. If there still are issues they should be described properly so they can be evaluated and implemented properly. Pure ranting doesn't help at all. OT: This reminds me of the move to the new Galileo IDE with the docked layout, where people said they will stay with Delphi 7 forever. I still feel sorry for all of them who did.
  2. I am a systems administrator and with every upgrade there is always risk and someone's system becomes unusable. To avoid some grief here is a pre-check list of the basics from a system level to help put together a back out plan. 1. Full backup via system image As always, data loss is unacceptable and not being able to roll back is unacceptable. Take a system image. 2. Source files - Branch or Backup I plan to branch my projects for the first few days in 11.2 so I have a rollback. Anything that is not in source control should obviously get a snapshot via zip or backup software. 3. Registry export reg export HKCU\SOFTWARE\Embarcadero\BDS\22.0 Pre_11_2_BkUp.reg Always have a backup, and read the release notes / known issues before you upgrade. No need for good luck with this upgrade, you have a back-out plan !
  3. Then please put the DLL projects into the repo with documentation on how to get the missing pieces to produce them ourselves instead of distributing binaries. As for the RTL routines - as mentioned FillChar already has been improved in 11.1 (and hopefully will get another final improvements - some of which are detailed here: https://msrc-blog.microsoft.com/2021/01/11/building-faster-amd64-memset-routines/). Pos has also been improved (mostly Win64 is affected by this as the new code is basically the purepascal code of what was the asm implementation for Win32). Hopefully for 12, we will get an improved Move I was working on (using SSE2 as that is the supported instruction set RTL can assume). Because Move handles forward/backward and overlap it covers what memcopy and memmove do. That leaves CompareMem which I already looked into in context of faster string comparison, UpperCase and Replace.
  4. Lars Fosdal

    11.2 Pre-Upgrade Checklist / back out plan

    10.3 and 10.4 were major versions. Then you got 10.3.n and 10.4.n as incremental upgrades. They changed this with version 11. 11.0, 11.1 and 11.2 are the same version.
  5. Remy Lebeau

    How to force update to label during a loop

    No, but Repaint() is. In any case, depending on what the rest of your loop is doing, it may be worthwhile to move the logic into a worker thread, and then have that post updates to the UI thread when it wants to display something.
  6. Uwe Raabe

    The Delphi 11.2 release thread

    That is a severe problem with the Parnassus plugins: They use modules shared between Delphi versions. This has been a source of many problems even before they were handed over to Embarcadero. The integration in GetIt and the need to uninstall all GetIt stuff for an update just raises the visibility.
  7. Tommi Prami

    The Delphi 11.2 release thread

    To me quite the opposite, just the release we needed. Quality updates should come more frequently IMHO. -Tee-
  8. Rollo62

    The Delphi 11.2 release thread

    In the webinar Q&A Marco Cantu was confirming that this update is binary compatible to the last version and that this was deeply tested before release. But to be honest, I would never trust such information, no matter how deeply this was tested, only because of saving a few extra clicks and re-builds of BPL's and DCU's. I usually re-build everything after every update and had no "hard-to-find", "mystical" problems and crashes ever since, at least under Windows platform.
  9. Dave Nottage

    The Delphi 11.2 release thread

    {$IF Declared(RTLVersion111)} {$IF Declared(RTLVersion112)}
  10. Fr0sT.Brutal

    Exception call stacks on Windows with only a few LOCs

    You're right for sure, that's why I recently implemented MAP file reading and extracting all the info available for any given address. Besides some tricky aspects, that wasn't too hard. I merged that with built-in stack traces and now I have fully detailed traces with module, function name and LOC. Alas, the code requires some other my routines which are not fully ready for publishing yet (translate & add comments etc). But in case someone is interested I could try to switch to built-in routines
  11. First of there is no 10.5 - I assume you meant 11. That's like the mother of pointless benchmarks. We know that default MM is prone to problems with heavy multithreading. Test with FastMM5 because that has addressed that issue. For using TBB, I think it was mentioned in another thread that also the memory footprint should be considered. Part of the improvement might come from the better system routines such as Move (FillChar has already been improved in 11.1) - I have been working on an improved version but I am afraid we will not get it before Delphi 12. Also - I think I mentioned this before: in the age of supply chain attacks and malicious code being distributed via open source platforms, I would be very careful about using some binaries. You mentioned before how you compiled them: why are you reluctant to post the code on GitHub so everyone can compile it themselves?
  12. Lars Fosdal

    The Delphi 11.2 release thread

    Just to capture the gossip ūüôā
  13. Vincent Parrett

    The Delphi 11.2 release thread

    Not so - they used helpers to avoid breaking dcu compatibility between the other 11.x releases - those helper methods will be merged into the classes in the next major release. Without the binary compatibility, third party vendors would find it next to impossible to support the varions .x releases.
  14. Der sch√∂ne G√ľnther

    Encoding accented char in JSON format

    As far as I understand, not the DB layer (TFields and stuff) is throwing the exception, but your Writer is, correct? If that's the case, have you seen its StringEscapeHandling-property?
  15. pyscripter

    The Delphi 11.2 release thread

    The issue was in the following: procedure TRegExHelper.AddRawOptions(PCREOptions: Integer); begin with Self do FRegEx.SetAdditionalPCREOptions (PCREOptions); end; FRegEx is defined in System.RegularExpressions and the nearest helper was in that unit. By the way the issue is now fixed. Thanks for reporting it.
  16. Vincent Parrett

    The Delphi 11.2 release thread

    FWIW, the helpers embarcadero introduces in an update should disappear in the next major version, as those helpers were only used to avoid breaking dcu compatibility - so their methods will be rolled into the classes. At least that's the plan.
  17. Available for subscribers from https://my.embarcadero.com/#downloadsPage What's new: https://www.embarcadero.com/products/rad-studio/whats-new-in-11-alexandria Change log: https://docwiki.embarcadero.com/RADStudio/Alexandria/en/11_Alexandria_-_Release_2 Installed and upgraded smoothly in my test VM Well, except the GetIt plugins... so those needs to be manually reinstalled from the GetIt dialog.
  18. Der sch√∂ne G√ľnther

    Get call count with Delphi debugger

    I just noticed that if the breakpoint has a condition, the pass count reflects the number of times the condition was true. That's actually pretty nice. Now if only one line could have multiple breakpoints with different conditions... ūüėá PS: Fun fact: If you kill the process with [Ctrl]+[F2] rather than letting it terminate gracefully, the IDE will still show the last pass count for a breakpoint.
  19. David Champion

    Delphi or Lazarus/Free Pascal

    I can imagine a version of an IDE aimed at hobbyists that includes the Delphi ARM Linux compiler, Python 4 Delphi, FMX only, local database support for <=$99. I hope that EMB get more creative in going after markets that are there without the fear of reducing existing sales. In and of itself the ARM Linux compiler is really important perhaps not attracting a high unit price but creating value for the rest of the product range. In addition making it possible to think about low priced and targeted SKUs.
  20. That's another reason why precompiled binaries are bad - if I had to guess I would say they are compiled for CPUs that support AVX which Nehalem did not have.
  21. Many of us miss call stacks in Delphi and have to use heavy or commercial libs. Luckily Microsoft cares of us and provides necessary API's. Here's the unit // Stack tracing with WinAPI // (c) Fr0sT-Brutal // License MIT unit StackTrace; interface {$IFDEF MSWINDOWS} uses Windows, SysUtils; const DBG_STACK_LENGTH = 32; type TDbgInfoStack = array[0..DBG_STACK_LENGTH - 1] of Pointer; PDbgInfoStack = ^TDbgInfoStack; function RtlCaptureStackBackTrace(FramesToSkip: ULONG; FramesToCapture: ULONG; BackTrace: Pointer; BackTraceHash: PULONG): USHORT; stdcall; external 'kernel32.dll'; procedure GetCallStackOS(var Stack: TDbgInfoStack; FramesToSkip: Integer); function CallStackToStr(const Stack: TDbgInfoStack): string; procedure InstallExceptionCallStack; {$ENDIF} implementation {$IFDEF MSWINDOWS} procedure GetCallStackOS(var Stack: TDbgInfoStack; FramesToSkip: Integer); begin ZeroMemory(@Stack, SizeOf(Stack)); RtlCaptureStackBackTrace(FramesToSkip, Length(Stack), @Stack, nil); end; function CallStackToStr(const Stack: TDbgInfoStack): string; var Ptr: Pointer; begin Result := ''; for Ptr in Stack do if Ptr <> nil then Result := Result + sLineBreak + Format('$%p', [Ptr]) else Break; end; function GetExceptionStackInfo(P: PExceptionRecord): Pointer; begin Result := AllocMem(SizeOf(TDbgInfoStack)); GetCallStackOS(PDbgInfoStack(Result)^, 1); // excluding the very function GetCallStackOS end; function GetStackInfoStringProc(Info: Pointer): string; begin Result := CallStackToStr(PDbgInfoStack(Info)^); end; procedure CleanUpStackInfoProc(Info: Pointer); begin Dispose(PDbgInfoStack(Info)); end; procedure InstallExceptionCallStack; begin Exception.GetExceptionStackInfoProc := GetExceptionStackInfo; Exception.GetStackInfoStringProc := GetStackInfoStringProc; Exception.CleanUpStackInfoProc := CleanUpStackInfoProc; end; procedure UninstallExceptionCallStack; begin Exception.GetExceptionStackInfoProc := nil; Exception.GetStackInfoStringProc := nil; Exception.CleanUpStackInfoProc := nil; end; {$ENDIF} end. test project program Project2; {$APPTYPE CONSOLE} {$R *.res} uses Windows, SysUtils, StackTrace in 'StackTrace.pas'; // Demo subs procedure Nested2; begin Abort; end; procedure Nested1; begin Nested2; end; procedure Nested0; begin Nested1; end; begin try InstallExceptionCallStack; Nested0; except on E: Exception do Writeln(E.ClassName, ': ', E.Message, sLineBreak, E.StackTrace); end; Readln; end. and output
  22. Brian Evans

    Several F2084 Internal Error on Delphi 10.4.2

    As with any software without a reliable method to reproduce a bug it can be very hard to fix it. Some organizations severely limit how much effort can be put into non-reproducible bugs as they can consume large amounts of time and effort for little to no gain. It is frustrating for both users and developers but acting out on that frustration doesn't really help any. For F2084 Internal Error errors which are often due to the compiler having problems with some source code it is very hard to find the bug and create a way to reproduce it without access to some source that triggers it. Again frustrating for both - it is hard for developers to do much with "compiler chokes on my source" when they can't take a look at the source - but also for the user who has work interrupted when the hit the bug. At least when there is a way to reproduce a problem Embarcadero does work on fixing them. An example was for years I occasionally got a dangling scrollbar in the IDE but never reported it since I was not able to find a reliable way to reproduce it. A while back somebody did report it and after reading some comments others made I finally managed to reliably reproduce the issue and put it in a comment on the bug report. It was fixed in the next release. ([RSP-34111] Editor leaves dangling vertical scrollbar behind - Embarcadero Technologies).
  23. Uwe Raabe

    How to synchronize splitters?

    I have another approach: type TSplitter = class(Vcl.ExtCtrls.TSplitter) private FInMoveSplitter: Boolean; FSibling: TSplitter; protected procedure WndProc(var Message: TMessage); override; public procedure MoveSplitter(var aMsg: TMessage); property Sibling: TSplitter read FSibling write FSibling; end; procedure TSplitter.MoveSplitter(var aMsg: TMessage); begin FInMoveSplitter := True; try Perform(aMsg.Msg, aMsg.WParam, aMsg.LParam); finally FInMoveSplitter := False; end; end; procedure TSplitter.WndProc(var Message: TMessage); begin if (Message.Msg >= WM_MOUSEFIRST) and (Message.Msg <= WM_MOUSELAST) and not FInMoveSplitter and (Sibling <> nil) then Sibling.MoveSplitter(Message); inherited WndProc(Message); end; Linking is a two liner: Splitter2.Sibling := Splitter3; Splitter3.Sibling := Splitter2;
  24. Remy Lebeau

    How to synchronize splitters?

    Simply move the logic into another procedure that you can pass the Sender into, eg: procedure TForm1.MoveOtherSplitterImpl(Sender: TSplitter; var aMsg: TMessage); begin if (fMovingControl = nil) or (fMovingControl = Sender) then case aMsg.Msg of WM_MOUSEFIRST..WM_MOUSELAST: begin fMovingControl := Sender; try if Sender = Splitter1 then Splitter2.Perform(aMsg.Msg, aMsg.WParam, aMsg.LParam) else if Sender = Splitter2 then Splitter1.Perform(aMsg.Msg, aMsg.WParam, aMsg.LParam); finally fMovingControl := nil; end; end; end; end; end; procedure TForm1.MoveOtherSplitter(var aMsg: TMessage); begin MoveOtherSplitterImpl(Splitter1, aMsg); fOriginalWindowProc(aMsg); end; procedure TForm1.MoveOtherSplitter2(var aMsg: TMessage); begin MoveOtherSplitterImpl(Splitter2, aMsg); fOriginalWindowProc2(aMsg); end; If you really want something more generic, then you should link the two Splitters together, such as by their Tag properties, eg: procedure TForm1.FormCreate(Sender: TObject); begin Splitter1.Tag := NativeInt(Splitter2); fOriginalWindowProc := Splitter1.WindowProc; Splitter1.WindowProc := MoveOtherSplitter; Splitter2.Tag := NativeInt(Splitter1); fOriginalWindowProc2 := Splitter2.WindowProc; Splitter2.WindowProc := MoveOtherSplitter2; end; procedure TForm1.MoveOtherSplitterImpl(Sender: TSplitter; var aMsg: TMessage); begin if (fMovingControl = nil) or (fMovingControl = Sender) then case aMsg.Msg of WM_MOUSEFIRST..WM_MOUSELAST: begin fMovingControl := Sender; try TSplitter(Sender.Tag).Perform(aMsg.Msg, aMsg.WParam, aMsg.LParam); finally fMovingControl := nil; end; end; end; end; end; procedure TForm1.MoveOtherSplitter(var aMsg: TMessage); begin MoveOtherSplitterImpl(Splitter1, aMsg); fOriginalWindowProc(aMsg); end; procedure TForm1.MoveOtherSplitter2(var aMsg: TMessage); begin MoveOtherSplitterImpl(Splitter2, aMsg); fOriginalWindowProc2(aMsg); end;
  25. Attila Kovacs

    How to synchronize splitters?

    you should have a flag which describes if the message are coming from the mouse or from the window proc of the other splitter and if it's not the mouse, skip the feedback