Jump to content

SwiftExpat

Members
  • Content Count

    222
  • Joined

  • Last visited

  • Days Won

    9

Everything posted by SwiftExpat

  1. SwiftExpat

    Exception call stacks on Windows with only a few LOCs

    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. SwiftExpat

    Conditional Define for Packages

    It is what you need, consider how you are building the package, specifically the run time and design time flags you are setting, use the above: Test the mix of $DESIGNONLY and $RUNONLY that fits your usage.
  3. SwiftExpat

    Restore old SDK macOS

    From what I know, you add a second SDK in SDK manager, then right click on the platform select properties and choose which SDK it is using in Delphi: This window controls what you compile with in Delphi.
  4. SwiftExpat

    Restore old SDK macOS

    During the boot camp, Holger Flick pointed out this tool to let you switch versions on the MAC, https://github.com/RobotsAndPencils/xcodes , I have not tried it myself. He briefly gave an explanation about why they had to match but I can not quote it. It seems they must match to do the compile and PAServer only uses the active version of XCode / SDK on the MAC. Hope it helps
  5. SwiftExpat

    Exception call stacks on Windows with only a few LOCs

    I would be interested for sure, any approach to reading the map file is worth posting to save others time and learn the tricky aspects.
  6. 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. 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
  7. SwiftExpat

    Anyone using an open-source ORM?

    I used this a few months ago, was simple enough for SQLite https://github.com/davidlastrucci/Trysil
  8. SwiftExpat

    How to free PythonEngine in background thread?

    My Bad, DEB is Delphi Event Bus, from your thread you just call : https://github.com/spinettaro/delphi-event-bus GlobalEventBus.Post(lEsa, 'Processed'); On the form you can subscribe and handle the sync by choosing the thread mode: [Subscribe(TThreadMode.Main, 'HostUpdated')] procedure OnEventHostAdminUpdate(AEvent: IDEBEvent<TSERTCCollectionHostSSH>);
  9. SwiftExpat

    How to free PythonEngine in background thread?

    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.
  10. SwiftExpat

    Creating my own .bpl

    I skimmed it only and thought it relevant to the original question, at least in theory. 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.)
  11. SwiftExpat

    Creating my own .bpl

    I found this today and I think it is what you are trying to achieve or at least might help you in the right direction. https://blog.grijjy.com/2021/04/05/build-speed/
  12. Looks like the answer is no with android https://quality.embarcadero.com/browse/RSP-37933
  13. SwiftExpat

    Prevent Delphi IDE Multiple Instance

    I appreciate the feedback, I updated the Github site to make the license options more clear. 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?
  14. SwiftExpat

    No exception handling with server crash

    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 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
  15. Wow, I learned something new. I verified with a VCL and FMX app at the same time, the debugger attaches to both. Just curious, do you do this often and is it stable (as stable as the IDE ever is and not counting application crashes) attached to 2 processes?
  16. SwiftExpat

    Prevent Delphi IDE Multiple Instance

    Here is my first round solution, see if it would work for you. https://github.com/SwiftExpat/Deputy
  17. You can start multiple instance(s) of the IDE, that seems like a logical way to debug your applications. Instance 1 you would select phone 1 and Instance 2, select phone 2. I am more curious about the behavior of Android, does the OS ever kill your application? Or does it seem stable?
  18. SwiftExpat

    GPU

    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.
  19. SwiftExpat

    Prevent Delphi IDE Multiple Instance

    If anyone is still interested, here is a prototype, would there be any other items to put on a wish list? Original instance is on the left, Second instance is on the right with the notification and option to close either IDE or ignore. It respects the -r option. Code is here: https://github.com/SwiftExpat/Deputy/tree/SingleInstance
  20. SwiftExpat

    Auto Readonly mode for files on search path

    Thank you for the example, I think this will keep me busy on my next plane ride. Almost everything on the browse, library and search path could be read only for me.
  21. SwiftExpat

    Show the ancestors for a class?

    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: 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;
  22. SwiftExpat

    Update framework question

    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);
  23. 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.
  24. SwiftExpat

    Prevent Delphi IDE Multiple Instance

    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. One more requirement check the username, I have a separate demo user account that I often switch to.
  25. SwiftExpat

    Prevent Delphi IDE Multiple Instance

    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.
×