Jump to content

Der schöne Günther

Members
  • Content Count

    693
  • Joined

  • Last visited

  • Days Won

    12

Everything posted by Der schöne Günther

  1. Der schöne Günther

    Installing Community Edition (error 500)

    What do you mean by "chosing"? It's RAD Studio 10.3. It does not ship with previous compilers and runtime libraries. If your code does not compile anymore, you will have to make it compile again 🤨
  2. For your reference, his original article was In Which I Argue That Embarcadero Should Open Source Their Unit Tests By Nick at July 27, 2013 04:27 which is no longer online, but archived at http://web.archive.org/web/20200109055953/https://www.nickhodges.com/post/In-Which-I-Argue-That-Embarcadero-Should-Open-Source-Their-Unit-Tests.aspx
  3. Der schöne Günther

    Compute nearest color

    I'm not sure if the RGB space the right choice for an approach to subjective perception which colour is the closest. Have you considered HSL/HSV? HSL and HSV - Wikipedia
  4. Der schöne Günther

    Security - How freaky can you get!

    Delphi itself made it relatively easy for 3rd party tools to modify the UI as the DFM files were readable plain text resources within the .exe file. One rather popular "hack" was to entirely remove the "Please consider buying" screen from the WinRAR interface. Sounds like this "screen" was removed from your tampered executable as well. This form probably checked the credentials and indicated success by the according TModalResult (mrOk, mrAbort, ...) instead of passing back the credentials so they can be used by the software backend.
  5. Der schöne Günther

    Range Check Error - what actually happens

    As far as I understand the documentation Range checking - RAD Studio (embarcadero.com), enabling range checks adds additional code around every array access. If that is not the case, then a write beyond the arrays end can silently succeed, but corrupt memory. People Wizards who understand assembly code can probably identify the additional code added by the compiler.
  6. Der schöne Günther

    TTask running twice?

    I find it a bit sad that none of these fixes get backported to earlier versions. They had something like this around 2016, but somehow stopped doing so. Or never really started, I don't know. I think this especially important when everything (editor, debugger, runtime, ...) is so tightly coupled together.
  7. Der schöne Günther

    Lookup for "localhost" takes 2 seconds

    Adding a ipv6 binding causes Indy to call socket like this: socket(AF_INET6, SOCK_STREAM, 0 {no protocol specified}) which is apparently fine with Windows as it returns a valid socket descriptor, although ipv6 is disabled. Maybe this is just a problem when UDP is used? For me, everything seems fine. It doesn't seem I need to handle the "ipv6 was manually disabled" case. 😎
  8. Der schöne Günther

    Lookup for "localhost" takes 2 seconds

    Thank you. Do you have a suggestion on how to properly check that? I am only using Indy, no other libraries like ICS.
  9. Der schöne Günther

    TTask running twice?

    It sounds like this could be the cause: [RSP-16377] TTask.WaitForAll crashes if timeout is INFINITE - Embarcadero Technologies Rio 10.3.2 is still affected, it was fixed in 10.4 Sydney. Can you check what happens if you add an explicit timeout to your WaitForAll(..)
  10. Der schöne Günther

    Lookup for "localhost" takes 2 seconds

    That did the trick, thank you! Time taken for http://127.0.0.1: 28 ms Time taken for http://localhost/: 6 ms Time taken for http://localhost/: 5 ms I hope I did that binding stuff correctly: constructor TServerClientTest.Create(); var binding: TIdSocketHandle; begin inherited Create(); server := TIdHTTPServer.Create(nil); binding := server.Bindings.Add(); binding.Port := 80; binding.IPVersion := TIdIpVersion.Id_IPv4; binding.IP := '127.0.0.1'; binding := server.Bindings.Add(); binding.Port := 80; binding.IPVersion := TIdIPVersion.Id_IPv6; binding.IP := '::1'; server.OnCommandGet := handleServer; client := THTTPClient.Create(); end;
  11. Der schöne Günther

    TTask running twice?

    What is the second column with the hexadecimal numbers? A thread ID? If yes, it doesn't make sense for "WaitForAll" and "Run Task 1" to be run in the very same thread. There must be something wrong with your code. Can you provide a code example that is reproducable?
  12. Der schöne Günther

    Application does not close

    Not necessarily a thread (the application will close anyway), but a task: procedure TForm1.Button1Click(Sender: TObject); begin TThread.CreateAnonymousThread( procedure() begin while true do; end ).Start(); end; procedure TForm1.Button2Click(Sender: TObject); begin TTask.Run( procedure() begin while true do; end ); end; The application will close fine after Button1 has been clicked. The executable, however, will never terminate after closing the main form if Button2 was pressed.
  13. Der schöne Günther

    Delphi Code-Insight problems

    There is. [RSP-30238] Code Completion don't work in class function - Embarcadero Technologies
  14. Der schöne Günther

    Is XML Documentation in Delphi 10.4 is 105% broken?

    The "express edition" of Documentation Insight was only bundled with RAD Studio until XE5. After that, it was removed. Source: DevJet Software » Documentation Insight Express has been released with RAD Studio XE2 As far as I can remember, you should be able to copy some files from your XE5 installation over to a new RAD studio version and the mouseover will still display as it did in previous versions.
  15. Der schöne Günther

    Unfixed bug in Sydney

    Can you link us where that was proposed? I don't see a workaround suggestion. Looking at the three required conditions for memory to leak: Can't parsers like FixInsight help here? I think (2) should be a rare enough occasion and still easy to find.
  16. Der schöne Günther

    stream object to / from INI file using latest RTTI stuff

    An .ini file has no hierarchy. How are you going to serialize nested objects like TMyObject = class someData: TBytes; someReference: TMyObject; // can be nil end; Formats like XML or JSON can properly deal with this, not sure how INI could be a good choice here.
  17. Der schöne Günther

    Embarcadero Toaster - Notification Window Caption in Win10

    I don't have a full solution for you. The "Embarcadero.DesktopToasts." plus some hash value at the end is hardcoded into System.Win.Notification.pas You need to take a look at the constructor above and probably class function TNotificationCenterWinRT.CreateShortcut(): Boolean; I would assume (not tested) that you can either Create your own subclass of TNotificationCenterWinRT that does not have this weird behaviour Modify System.Win.Notification.pas Also, you might want to post this at quality.embarcadero.com Altough the last time it was brought up (2016), it was closed as "Cannot reproduce" https://quality.embarcadero.com/browse/RSP-14776
  18. Der schöne Günther

    Embarcadero Toaster - Notification Window Caption in Win10

    Which Delphi version are you using? When I check in 10.0 Seattle, the following code from System.Win.Notification makes it pretty obvious: constructor TNotificationCenterWinRT.Create; var LWSAppID: TWindowsString; begin inherited; FNotifications := TDictionary<string, IToastNotification>.Create; LWSAppID := TWindowsString.Create(AppId + THashBobJenkins.GetHashString(ParamStr(0))); FToastNotifier := TToastNotificationManager.Statics.CreateToastNotifier(LWSAppID); end; private const AppId = 'Embarcadero.DesktopToasts.'; I would not expect it is still like this in current Delphi versions.
  19. Der schöne Günther

    Backing Up Delphi Install

    Not a problem, because as I said, I have the VM on several computers. Backups can be made with 2 mouse clicks.
  20. Der schöne Günther

    Backing Up Delphi Install

    I'm happy with different Delphi installations living in their virtual machines (Hyper-V). That also allows me to transfer the exact same Delphi installation to different PCs with no need to activate again.
  21. For months. It works flawlessly. Keep in mind that you don't get anything from installing Edge on the target computer. You must either install the runtime, ship the needed binaries or install a beta/dev version. Explained here: https://docs.microsoft.com/en-us/microsoft-edge/webview2/concepts/distribution
  22. Der schöne Günther

    Can you restart the LSP or do you have to restart the whole IDE?

    Then I wonder what the point of outsourcing them into separate processes was. Maybe a cheap way of prolonging running out of memory for the 32 bit IDE process 😀 Oh well...
  23. Der schöne Günther

    git and Delphi tooling?

    Same. I'm mainly using Mercurial as I somehow get things done twice as fast as in Git, but when I use git, VS Code and its plugins (like Git Graph) do everything I could ask for.
  24. Or another library, like paolo-rossi/delphi-neon: JSON Serialization library for Delphi (github.com)
  25. Der schöne Günther

    Resetting TIdHTTP before reuse

    This doesn't answer your question, but ... ... this screams for unit tests like "Ensure requests are still properly going out after the previous server disconnected right in the middle of the transfer, sent garbage or timed out". Not only would you not have to constantly re-recreate clients, you can also sleep easier, knowing (instead of hoping) it works.
×