Jump to content

SwiftExpat

Members
  • Content Count

    222
  • Joined

  • Last visited

  • Days Won

    9

Posts posted by SwiftExpat


  1. Thanks for the great solution, after a first review here is what I found:

     

    It would not compile, ambiguous over load error.  I changed the if statement to be more generic than the {$IFNDEF RAD_XE3_UP}

      {$IF  CompilerVersion < 24.0} // System.Pos with offset starting from XE3
      function Pos(const SubStr, Str: string; Offset: Integer): Integer; overload;
      {$ENDIF}

     

    I fails to print method name in 11.1, but works in 10.4 & 10.2.

     

    I debugged it a little and the map file is loaded, but the lookup seems to fail in GetAddrInfo. line 322 fails the test :   if (laIdx = -1) and (paIdx = -1) then Exit(False);

     

    Do you have any guess as to the difference in 11.1?


  2. The Deputy 2.6 series separates features in to Process Manager and Instance Manager and integrates configuration options with the standard IDE options interface.

    Deputy 2.6 is available in Getit or on Github with a GPL license or purchase a named user license for $9 USD.

     

    image.thumb.png.5da958db27d7735a79c904cf9b98f0a2.png

     

     

    If you use the plugin, please give it a star on Github. As always feedback is appreciated on GitHub, email or here in the thread.

     

    Process manager now has:
    - Ability to abort Process Manager
    - Ability to force terminate managed process
    - Settings moved to Options in the IDE
    - Poll and loop settings exposed

     

     

     

    Instance manager is a solution to this thread and several related defects in QP

     

     

     


  3. First note Dalija's response above about the TMemo.

     

    Your memory leak will be solved by calling finalize on modDBFiredac before you call free.

     

    If you are going to use python on a thread replace TPythonGUIInputOutput with TPythonInputOutput and consider using DEB to send messages to the main thread, it handles the sync.


  4. 4 hours ago, Anders Melander said:

    Have you read the section

    I skimmed it only and thought it relevant to the original question, at least in theory.

    4 hours ago, Anders Melander said:

    O.M.<expletive>G.

    Every time I have tried to save time with this, I end up with the infamous dcu built with version x dcu error, along with all the random errors in the IDE with things out of sync.  I ended up purchasing the fastest clock CPU I could get and am happy enough. I just let it build the DCU's when necessary (TMS also does this so I figure if they did not come up with a more reliable solution, I would not either.)


  5. 1 hour ago, timfrost said:

    But it is not clear from your website or Github page exactly what I would need to download or purchase to get just this IDE functionality

    I appreciate the feedback, I updated the Github site to make the license options more clear.

    image.thumb.png.3eebf881f858b5e7ca0e4f2970633eef.png

     

    The purchase link here: https://swiftexpat.com/deputy.html is a license with support for $9 USD for a term of 1 year. (Currently the download and install of the licensed code is performed in Caddie, but you do not need to purchase a license. I re-use most of the IDE version logic built into Caddie to be able to register the expert in the IDE.)

     

    Does this make it clear?

     


  6. Since the OS is force closing your application, my mind goes to ALSR or DEP and the implementation on Server. Possibly the way the SSL is compiled in relation to these.

     

    There is a lot of reading, but maybe you could just compile your exe with these options and see if it fixes before you spend too much time reading the detail.

    https://www.ideasawakened.com/post/enabling-dep-and-aslr-to-reduce-the-attack-vector-of-your-delphi-applications-on-windows

    11 hours ago, Angus Robertson said:

    OpenSSL DLLs, win32 or Win64, if I build it with YuOpenSSL which links the C code into the app, it does not fail.  

    This makes me think the flags used in compile of SSL is where your problem really is.  Maybe dump those PE headers and see if you can spot the problem : https://github.com/changeofpace/PE-Header-Dump-Utilities

     


  7. Process monitor from Sysinternals is your friend here. Trace the startup and see where the file is not found.

     

    Python at the command prompt is built with vcruntime, and Delphi does not. Put a copy of msvcp140.dll and vcruntime140_1.dll in the directory that has your EXE and then see if works correctly.


  8. 5 minutes ago, PeterPanettone said:

    But I need it for custom third-party classes.

    Components or classes? Components will be TPersistent and they should be registered in the IDE, so more is possible with those.

    The class tree will look something like this for TButton:

    image.png.cbc1ab003607091c9dd6ece66ab95f35.png

    4 hours ago, PeterPanettone said:

    I need to get e.g. Vcl.StdCtrls.TButton from TButton. How can I do that?

    You can get the defining class from the component, Marco's Object Debugger does it with the following lines using RTTI.

    var
      ptd: PTypeData;
      
      //this starts at line 280 in ObjectDebuggerForm.pas
      
      // get a pointer to the TTypeData structure
      ptd := GetTypeData (pti);
    
      // access the TTypeInfo structure
      sList.Add ('Type Name: ' + string(pti.Name));
      sList.Add ('Type Kind: ' + GetEnumName (
        TypeInfo (TTypeKind),
        Integer (pti.Kind)));
    
      // access the TTypeData structure
      {omitted: the same information of pti^.Name...
      sList.Add ('ClassType: ' + ptd^.ClassType.ClassName);}
      sList.Add ('Size: ' + IntToStr (
        ptd.ClassType.InstanceSize) + ' bytes');
      sList.Add ('Defined in: ' + string(ptd.UnitName) + '.pas');
    
      // add the list of parent classes (if any)
      ParentClass := ptd.ClassType.ClassParent;
      if ParentClass <> nil then
      begin
        sList.Add ('');
        sList.Add ('=== Parent classes ===');
        while ParentClass <> nil do
        begin
          sList.Add (ParentClass.ClassName);
          ParentClass := ParentClass.ClassParent;
        end;
      end;

     


  9. This is just a followup for reference to staying at the HTTP level for checking server file details.  It is related to this thread but applies more to large files or binaries.
    I was exploring this and went a slightly different direction using another HTTP header, If-Modified-Since.

     

    Working implementation can be found here, I am using in my Deputy expert update code.

    https://github.com/SwiftExpat/Deputy/blob/main/Source/SE.UpdateManager.pas

     

    Add your header, the supplied value had to be a valid date for my server was the only catch, so I defaulted it with a constant.

    const
    	dt_lastmod_default = 'Fri, 01 Apr 2010 23:15:56 GMT';
    	hdr_ifmodmatch = 'If-Modified-Since';
    ...
      FHTTPRequest.CustomHeaders[hdr_ifmodmatch] := LastModified; // date must be a valid value;
      FHTTPRequest.Get(URL);
    ...

     

    Handling the response is easy, just switch on the status code.

    if AResponse.StatusCode = 200 then
      begin
        LastModified := AResponse.HeaderValue[hdr_lastmodified];
      end
    else if AResponse.StatusCode = 304 then
      begin
        RefreshDts := now;
        LogMessage('File not modified Http result = ' + AResponse.StatusCode.ToString);
      end
    else
        LogMessage('URL Cache Http result = ' + AResponse.StatusCode.ToString);
      

     


  10. The Deputy 2.5 series contains enhancements based on user feedback and GitHub Issues . Many thanks to all of your suggestions.

    • New functionality - the ability to close your application, which allows your application to correctly shutdown, display a memory leak report and capture the leak report for later review.
    • Messages are now much cleaner so the build messages stay in focus.
    • Deputy is available under an individual license for $9 USD.  Details on the product page

    Video highlights are here:

     

    Version 2.5 Highlights

     

    Release Notes

     

    Product Page

     

    As always feedback is appreciated, Email, messages here, or GitHub issues all help determine where this product goes.

     


  11. 10 hours ago, stacker_liew said:

    Sometimes the IDE won't close probably event user had select exit or click the windows close button, still we have to use task manager to force close it.

    This could be implemented in an expert by displaying a screen on startup which allows you to terminate the old instance. Not technically a prevention of multiple instances, but cleaner than having to start task manager.
    I can see this as a common frustration that can be solved, I add it to my list to explore as an enhancement.

     

    On 7/10/2022 at 2:26 AM, Uwe Raabe said:

    I would probably never use this option as long as it doesn't take the IDE version and the given registry option (-r) into account

    One more requirement check the username, I have a separate demo user account that I often switch to.


  12. 1 hour ago, Stano said:

    There are enough funds for my work there.

    My laptop is similar age and memory, but Delphi runs good enough. Startup is about 10 seconds.

    If it was my machine I would be starting with a clean OS install & clean Delphi.  These symptoms are going to take you longer to troubleshoot and keep you crying.

×