Jump to content


  • Content Count

  • Joined

  • Last visited

  • Days Won


aehimself last won the day on February 17

aehimself had the most liked content!

Community Reputation

386 Excellent


Technical Information

  • Delphi-Version
    Delphi 12 Athens

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. aehimself

    Virtual Serial Port on USB, not working.

    I think we used this, before getting rid of COM altogether: https://github.com/CWBudde/ComPort-Library
  2. One issue what already stands out: for i := 0 to Length(strArray) do This should be Length - 1. This can give you a range check error.
  3. aehimself

    DCPCRYPTO blowfish

    The only “issue” I personally experienced with DCPCrypt was string encoding. While a PHP library was working on UTF8, using the built-in functions of DCPCrypt used Unicode - there’s why the end result didn’t match. Once I converted my string to UTF8 TBytes and encoded that everything started to work perfectly.
  4. So you use a program to even write the question for you and when we don’t get what you wanted at the first place you get frustrated; am I getting this right? Don’t forget that this forum is to discuss, share and help one another; not to do what you don’t/can’t even state clearly. I wish the best of luck with your project. I spent way too much time figuring out what you want.
  5. aehimself

    Monitor Windows application and restart if needed

    Sure; this is why I added that the same can be implemented between applications. You have a watchdog application which queries your main application via TCP, window messages, mapped files, etc. The logic is the same, but instead of a watchdog thread you have a separate executable, and instead of a Boolean / TEvent the signaling channel is different. I personally would go with a window message which your main program has to reply to. Easy to implement on both sides: use SendMessageTimeout in the watchdog and one extra method in the main program.
  6. From this: It probable that AI didn't exactly say what you wanted to, but reading what you wrote tells me you want an IDE within an IDE as component and that makes no sense to me.
  7. Like... through a COM port. With an IDE within an IDE? I'm still not convinced.
  8. It seems to me you are attempting to reinvent the wheel. The criterias you listed are basically equal to an IDE... and why do you want to write an IDE as a Delphi component if there is an official one already? Afaik interaction with microcontrollers are still through serial ports (whether native or over USB) and there are even free components for Delphi to talk to a COM port. If you are sure you want to go through with this, I'd start there.
  9. aehimself

    Monitor Windows application and restart if needed

    When I had an error which caused my threads to lock up, until the issue was actually found and fixed I simply created a watchdog thread. It’s only job was to query the other threads and if they are found unresponsive, dump their remaining work queue, force-close, restart them and reload the work queue. The signal was a simple boolean called “alive”. The watchdog set this to false at each thread, and each thread set it to true within processing the queue. If the variable is false after 5 seconds (processing an item was < 1 s) it was considered hanging. You can implement the same logic within applications too, using window messages, TCP or memory mapped files as your signal.
  10. So the process of finding these is not that easy but not that hard either, I'll put it here so future visitors don't have to research / experiment. - Download @Anders Melander's Map2pdb, compile it and run it against your applications .map file. You'll get a .pdb file. - Download WinDbg and install it. Once done, go to File -> Settings -> Debugging settings and add the folder where your .pdb file is to the Symbol path list - Launch your application and when it's in the state you want to examine, go to File -> Attach to process and select your application. - In the lower-right pane select the "Threads" tab and double-click the offending one (TID = ThreadID in HEX) - Now go to the Stack tab and if everything is good, you get readable stack traces In my case @Stefan Glienke was absolutely right: As I am not using thread pools, I need to find out what does... and get rid of it, somehow...
  11. @mvanrijnen Did you find an effective way to debug this? My application started to do the same, with a similar call stack in the offending thread: It's important to note that this thread is not a worker of mine, I don't know what or when it was created. It also safely can be killed and won't cause any (noticable) disturbances. I also couldn't find a way to reproduce the issue, one time it just thinks it's time and then it locks up.
  12. In my experience when timing can cause errors it always can be tracked back to incorrect thread data / UI access. - Instead of just one critical section have one for each of your properties and enter / leave in every getter and setter. - Make sure none of your thread accesses any UI elements directly (e.g. Form1.Memo1.Text) - Make sure that every callback what your thread has is properly synchronized - A dialog IS a part of the VCL thread. Do not show any dialog boxes in any threads!
  13. Like we all never said “it works on my machine” 😄
  14. aehimself

    Delphi 12 is available

    Because Win7 is the upgrade of XP on kiosks and built-in devices. If even say ATMs.
  15. <Sarcasm> Considering the pricetag on Delphi they might still be saving for it xD </Sarcasm>