Jump to content

Attila Kovacs

Members
  • Content Count

    1977
  • Joined

  • Last visited

  • Days Won

    26

Everything posted by Attila Kovacs

  1. Attila Kovacs

    Range Check Error ERangeError

    @Stefan Glienke I can't reproduce the yellow one in Berlin. Strange. Edit: ahhhh, it was XE. Okay. Sorry.
  2. Attila Kovacs

    Range Check Error ERangeError

    This is the very same analogy as 10 billion flies can't be wrong. You should really go like @Remy Lebeau suggested. Optionally you could read up signed and unsigned data.
  3. Attila Kovacs

    Range Check Error ERangeError

    then why are you asking?
  4. Attila Kovacs

    QueryPerformanceCounter precision

    I thought all the time he is comparing Δt's. What is the point to measure it in seconds?
  5. Attila Kovacs

    QueryPerformanceCounter precision

    https://www.esaitech.com/symmetricom-pcie-1000-ocxo-syncpoint-ptp-ieee-1588-computer-precision-timing-card.html
  6. Attila Kovacs

    Target machine actively refused connection

    netstat -anob >netstat.txt look for ibserver.exe on which interfaces and ports is listening
  7. Attila Kovacs

    Delphi 10.4 Portable

    this is indeed annoying that you can't insert text before a quote if you did not add some text prior quoting/inserting code block is there a trick for that? Edit: aha, drag and drop the block with the arrows on the topleft. phew....
  8. Attila Kovacs

    Delphi 10.4 Portable

    where exactly is the control right mouse button on a cell phone?
  9. Attila Kovacs

    Target machine actively refused connection

    did you try with <yourip> instead of localhost? maybe it's not binding on lo by default?
  10. Attila Kovacs

    Determining why Delphi App Hangs

    I need some clarifications here too, as I'm not using timers anywhere, maybe my 3rd parties does, I don't know, but what is "wrong time" for a timer? I can't remember having seen a property like OnWrongTime or OnRightTime. Is it possible that you are referring here to "wrong code" instead?
  11. Attila Kovacs

    10.4.2: Refactor popup menu takes up to 5 min to display

    that many "C:\" 's are also suspicious but I have no idea why is it stickig at it something in the path? a recursive dir link?
  12. Attila Kovacs

    10.4.2: Refactor popup menu takes up to 5 min to display

    Do you have circular unit references?
  13. Attila Kovacs

    Determining why Delphi App Hangs

    You can't just pick a piece of code and put it in the background thread. You can do it with some code, but not every time. No, you can't do that. You can do it in some cases, but not every time. You know exactly what I meant with that. I'm not against threading but we should keep the things there where they are.
  14. Attila Kovacs

    Determining why Delphi App Hangs

    Oo yes, and if you giving status reports, you are the ProgressBar 😛
  15. Attila Kovacs

    Determining why Delphi App Hangs

    "Most obvious problem is that such code becomes re-entrant." Which code? The one starts the blocking loop or the one starts the thread? They have to backed up both. Don't they? "may respond to user input slowly" Yes. Just like a thread "reacts" slowly, when you want to cancel it and it just won't stop right away because it's too busy to check if there was a stop signal. "but all the calls to Application.ProcessMessages will make that long operation running even longer" You are right. 2 cores are more than 1. But no, because we have to move a lot of data between the threads. Many times. And this is not something to ignore. Putting a piece of blocking code into a thread just because the GUI, could be rocket science. "Imagine connecting to some web .. Application.ProcessMessages will not help you with that." Yeah, I can only agree with that, and I'm doing the same and yet I did not think of that. I can't tell anything to the android part.
  16. Attila Kovacs

    Determining why Delphi App Hangs

    well, you have to learn foreign languages then, or look for a native forum, you see me? friend 🙂
  17. Attila Kovacs

    Determining why Delphi App Hangs

    application repeat db-task while not dataset.eof do begin // main loop blocked dataset.next; end; form2.showmodal -> modal form repeat Application.ProcessMessages; <- modal form workaround, bites as hell until ModalResult <> 0 Application.ProcessMessages; until terminate
  18. Attila Kovacs

    Determining why Delphi App Hangs

    @Dalija Prasnikar Could you explain the difference between "putting a db task into a thread" (thread) vs. "application.processmessages" regarding to the GUI?
  19. Attila Kovacs

    Determining why Delphi App Hangs

    @Anders Melander Ahum, there was a line missing, the forum is glitching today;)
  20. Attila Kovacs

    Introducing Delphi Uses Helper

    I'm using this since you (pre-)released it back in the G+ era and I'm very grateful to you for creating it.
  21. Attila Kovacs

    Determining why Delphi App Hangs

    poor man's responsive GUI var FOldMessageEvent: TMessageEvent; FOldMessageEvent := Application.OnMessage; Application.OnMessage := MyOnMessage; try // Do your stuff here and call repetitively Application.ProcessMessages; finally Application.OnMessage := FOldMessageEvent; end; procedure TfrmXY.MyOnMessage(var Msg: TMsg; var Handled: boolean); begin if (Msg.hwnd = btnStart.Handle) and (Msg.Message = WM_MOUSELEAVE) then else if Msg.hwnd = btnAbort.Handle then // if you have an abort button else case Msg.Message of WM_PAINT, WM_TIMER: // handle messages ; else Handled := True; end; end;
  22. Attila Kovacs

    Delphi ignores path to unit in .dpr

    Well I'm not sure on that. Edit, so I've tested it: If the unit in the dpr is not found the compiler looks for the dcu's in this order: project root library path search path (but not in the "dcu out" path) explicit and relative paths are also working for the dpr (Berlin U2) if a unit is opened in the IDE and the path in the dpr matches, you can rename/remove the unit, the project will still compile.
  23. Attila Kovacs

    Delphi ignores path to unit in .dpr

    yeah we know that, is that new? try to make it relative to the project root, but I would explicitly define it in the search path from a dedicated directory like myrtlpatches/xyz the order is project root, library path, search path, so either comes into the project dir or with relative path into the dpr.
  24. Attila Kovacs

    Delphi ignores path to unit in .dpr

    @Vandrovnik there is the global library path, then there is a search path in the project options, and there is the project root dir where the IDE looks for the files. In reversed order as I wrote them. So either copy it to your project root or into a separate dir and add it to the project search path.
  25. Attila Kovacs

    Min & Max

    Am I the only one annoyed that these are in System.Math?
×