Jump to content

Angus Robertson

Members
  • Content Count

    2047
  • Joined

  • Last visited

  • Days Won

    38

Everything posted by Angus Robertson

  1. Angus Robertson

    Virtual Serial Port on USB, not working.

    Why not just use one of several open source serial port components for your communication? No-one will want to debug your code. I've been using Async Pro for 20 years, you can install it from GetIt. Angus
  2. STM32 seems to be an ARM based microcontroller, which is not a supported platform for Delphi. So no Delphi applications will run on it. The STM32 should be running an OS of some sort, probably several available, which may run an IP stack to support Ethernet or Bluetooth, in which case numerous Delphi components can be used to communicate with it remotely from Windows or other supported Delphi platforms. Angus
  3. Is it just me, or do the posts by techdesk seem to be written by an AI? I've never seen a developer write such prose. Lots of words, but says very little. Angus
  4. Angus Robertson

    OverbyteIcsMimeDec bugs

    I told you before that the ICS MIME sample does not display file content. Exactly which ICS functions are you using to decode this file> What size is it supposed to be? Which online decoder is able to decode this MIME correctly, without editing? Just telling me it does not work is not helpful. Angus
  5. Angus Robertson

    GetIt installation does not work

    Only if you installed 12 from GetIt/online originally. I always install from the ISO, and yesterday updated with patch 1 (it is not 12.1) and several component updates using GetIt. Angus
  6. Can not recall what I said in my previous posts here, but can only reiterate that for serving files, threads are not necessary, there is minimal blocking activity. There is a limit to how many new SSL/TLS connections can be accepted each second due to the processing, but once the connection is open, hundreds of connections can run in a single thread. Threads are necessary to make use of more than one CPU. ICS does have a threaded server component, but it does not support SSL/TLS or the web server and has not been tested for 10 years. If you use threads in ICS, each thread has its own message queue and handler, so you can not send from a different thread. Angus
  7. Angus Robertson

    OverbyteIcsMimeDec bugs

    As I wrote, ICS decodes your file correctly into two parts, how your application is supposed to understand such an encoded attachment is a different issue. Angus
  8. Angus Robertson

    Assign socket to HttpCli

    The ICS components are event driven, so have various state variables for control, they will need careful manipulation if opening a connection is skipped. Basically, test, fix, repeat. Angus
  9. Angus Robertson

    Assign socket to HttpCli

    It would be possible to assign a socket to THttpCli and then call SocketSessionConnected that triggers the first request, perhaps in a descended component. But testing it without your clever device would be painful, it would need a modified web server that made the original connection instead of accepting it, which is where we cross over into proxies. Angus
  10. Angus Robertson

    Assign socket to HttpCli

    If you are listening for a connection on port 80, that is a web server, not sure why you then respond with a web command. Or is the embedded device trying to connect to a proxy server? ICS has a proxy component, also TSimpleWebServer and TIcsIpStrmLog that will listen for connections. But none will pass a connection to THttpCli. Angus
  11. Angus Robertson

    OverbyteIcsMimeDec bugs

    I used the OverbyteIcsMimeDemo sample for your EML file, Decode File Extended button which uses TMimeDecodeEx.DecodeFileEx, it seems to work OK: MIME-Version: 1.0 Content-Type: application/octet-stream; name="image.jpg" Content-Transfer-Encoding: base64 Content-Disposition: attachment; filename="image.jpg" Part 0, Content: application/octet-stream, Size: 0, Name: image.jpg, FileName: image.jpg, Encoding: base64, Charset: us-ascii, ApplType: , Content Id: , Reg Extn: Part 1, Content: text/plain, Size: 41, Name: , FileName: , Encoding: , Charset: UTF-8, ApplType: , Content Id: , Reg Extn: .txt Part 2, Content: image/jpeg, Size: 32563, Name: image.jpg, FileName: image.jpg, Encoding: base64, Charset: , ApplType: , Content Id: , Reg Extn: .jpg That sample does not write parts to files, so I can not view the image easily. I tried the same EML file on two online web sites,, and both failed to decode the file, one created an 46K image file containing the raw MIME content. If you want me to look at the other issues, I'll need similar files to run through the MimeDemo sample to reproduce the errors. Angus
  12. Angus Robertson

    [MidWare] MidWare, Delphi 12

    I appreciate that, but some of the low level components like TAppSrvClient could be massively simplified if descended from newer ICS components, rather than being complicated to add SSL/TLS. Angus
  13. Angus Robertson

    [MidWare] MidWare, Delphi 12

    Looking at the Midware client code, it is very similar to the ICS TIcsIpStrmLog component that can be configured as a client or server, to send textual or binary information between instances, look at the OverbyteIcsIpStmLogTst sample. Midware has some special processing escaping binary that would need adding, but TIcsIpStrmLog could replace much of the low level stuff while adding SSL/TLS. Angus
  14. Angus Robertson

    OverbyteIcsMimeDec bugs

    I will test your file with the MIME sample application next week. Not looked at the code for a long time, it just works, tested with 40GB files last year. Angus
  15. Angus Robertson

    OverbyteIcsMimeDec bugs

    The first question is are all your examples correctly encoded according to the RFCs, and decoded correctly by other MIME implementations. ICS can not be expected to handle non-compliant MIME. Looking at your test file, the MIME has 995 long lines which is allowed in the 30 year old RFC, but 76 is rather more common and recommended. Not sure if long lines are supported. Angus
  16. Angus Robertson

    404 Statuscode in THttpCli

    The StatusCode is a web server response, although sometimes it is generated by the client if the server can not be reached for any reason, there is no official code for DNS failure. You should also be checking LastResponse, ReasonPhase, RequestDoneError and RequestDoneErrorStr for more information after a request. Angus
  17. ICS V9.1 has major structural changes, hundreds of files are disappearing. You should read the svn log in the zip for full details. The release is almost finished and the readme will be done then. The relevant SVN comment: If you are using Delphi 10.4 or later, all existing version specific install groups and packages have gone, since that version of Delphi added a new package $auto suffix allowing the same packages to be used for future Delphi versions. So uninstall all ICS packages, and use one of the new install groups, IcsInstallFmx, IcsInstallVcl, IcsInstallVclFmx or CBIcsInstallVclFmx. These use packages IcsCommonNewRun/Design, IcsVclNewRun/Design and IcsFmxNewRun/Design, and build with the compiler version instead of a Delphi version, i.e. IcsCommonNewRun290.bpl. Angus
  18. Because you installed from an ISO image or before the servers went down, GetIt servers provide much of the platform installation, Delphi, C++. etc. Had the same problem myself. Angus
  19. https://www.theregister.com/2024/01/29/japan_government_floppy_disks/ https://www.floppydisk.com/ has bought up large stocks of floppies for those really in need. I used to carry boxes of 8in and 5in floppies around the world. Angus
  20. I've been using an ICS FTP server on several of my servers for 15 years or so, compiled using Delphi 2007, although the server component is compatible with all compilers. I'm now trying to convert more of my applications to D11. But when built with D11, the FTP server application crashes with a Windows heap corruption exception upon completion of any SSL FTP session, irrespective of what commands were processed during the session. The crash only happens when the application uses OpenSSL DLLs, win32 or Win64, if I build it with YuOpenSSL which links the C code into the app, it does not fail. Despite all my error handling efforts including Madexcept, the application is unable to catch the error, just got lots of Windows Error Reporting and Application Error events. The application itself logs activity, but the last thing logged is the FTP QUIT command, the application crashes before the log writes anything more to disk. What is strange, this crash only happens on server operating systems, specifically Windows Server 2012 and 2022, and only when accessing the server from another computer, not locally. The same problem has been reproduced in two different server applications, running interactively or as a Windows service. The SSL code is well tested and widely used, it's strange the crash only happens on Windows servers in such rare conditions, and that Madexcept can not catch the error, although it is not reported as being in the DLL. Faulting application name: magfserver.exe, version: 2.0.0.7, time stamp: 0x62f69268 Faulting module name: ntdll.dll, version: 10.0.20348.803, time stamp: 0xbee6f04c Exception code: 0xc0000374 Fault offset: 0x00000000001044a9 Faulting process ID: 0xe00 Faulting application start time: 0x01d8ae7494fc7fe2 Faulting application path: C:\magenta\fileserver\magfserver.exe Faulting module path: C:\Windows\SYSTEM32\ntdll.dll Any thoughts on why an application can fail in such rare but very specific circumstances? Angus
  21. Angus Robertson

    No exception handling with server crash

    I maintain and use DDService, but not Eurekalog. I've been using madExecept for many years, but only for logging errors, none of the restart stuff or emails. Strangely, my main web server has crashed twice during the last two nights, restarted within a few seconds, not happened since November and that was development bugs in ICS. Error was C0000005 buffer overrun. Using YUOpenSSL. But it could be hackers trying to exploit several low priority exploits in OpenSSL due to be fixed this week. Angus
  22. Angus Robertson

    No exception handling with server crash

    Thanks, I'll look at Application Recovery and Restart, if it applies to Windows Services. Mine are all set to restart if the application stops, and my services go to a lot of trouble to try and save logs and terminate cleanly on any unexpected errors, including emailing me, although I've delayed that now until the service restarts, since corruption sometimes meant the service locked solid instead of stopping and restarting meaning manual intervention. Keep meaning to write a second monitoring application, but these problems are so rare I never get around to it. Angus
  23. Angus Robertson

    No exception handling with server crash

    To be honest, I've not really thought about this problem in a long time, my original comment was about the FTP server, but I transfer thousands of files daily to and from my servers, so it's not an issue that needs much of my time. I do get a web server crash maybe once every couple of months, but I also get continual attacks on those servers, there are usually 100 or more IPs blocked for attacks. Sometimes they can be so heavy that even the firewall gives up, had to replace that. So hard to say if the problems are Delphi or OpenSSL related. All my servers have heavy logging, but only flushed to disk every few seconds, so usually lost during a crash. These are live, not experimental servers, if they stop my phone rings within a few minutes. Angus
  24. Angus Robertson

    No exception handling with server crash

    I've not seen the heap corruption error for a long time, but the four ICS servers applications (web, rest, ftp, proxy) installed on my public servers are all built with YuOpenSSL Win64. All my servers are single thread, although some FTP commands use a thread for lengthy commands. My Windows Server 2018 in particular has one Win64 server that won't start with the OpenSSL DLLs, yet other servers work, and it works on Server 2022, but I've not looked at that for 18 months since YuOpenSSL works fine. There are major OpenSSL changes in V9.1 that are almost ready for release, once that is out I'll do some more testing with the OpenSSL DLLs. And long term I do plan a new threaded web server, to allow more than one CPU to be used. Angus
  25. I always install Delphi from ISOs, I have DVDs and CDs in a box going back to Delphi 1. The version I need today does not have an ISO... Angus
×