Jump to content

Clément

Members
  • Content Count

    380
  • Joined

  • Last visited

  • Days Won

    4

Everything posted by Clément

  1. Clément

    RansomWare blues

    I got very lucky! Even my backup server got infected
  2. Well, my last options option is Windows Service with microservice, but it is so close to another HTTP server that it might be better to just get it done.
  3. Hi, I just upgraded to 10.3.3 and start compiling my applications. By chance I spotted some strange things with the debugger. When I tested the debugger... well... I'm posting here before taking action ! I took some pictures to help with the context. The first picture is what caught my attention. Notice the method "DoInvoke<T>" with an invalid break point ( It is perfectly valid under 10.3.2). Well, DoBuildURI is called from DoInvoke (See picture 2 when I comment out DoBuildURI). If I comment out DoBuildURI, the expected behaviour is to remove all the lines from DoBuildURI as it is called only from DoInvoke. (Under 10.3.2 they are.) But notice that there's still a blue dot in DoBuildURI (That's the entry point of DoInvoke<T>!!!!). The third picture shows the call stack. We can clearly see that DoInvoke is called. And the fourth picture is terrifying: In the Call Stack windows, I double click the DoInvoke and a line from DoBuildURI is highlighted! (Remember that blue dotted "end" from picture 2). DoInvoke is compiled and called but is undebuggable. There are other parts in my application with the same behavior. I cleared , build and compiled my project against 10.3.3 under VCL Win32, VCL Win64, FMX Win32, FMX Win64 and in a new dproj (Those pictures are from a brand new project using the same units). The application seems to be working fine. Just had some more info. I changed the declaration of DoInvoke from function DoInvoke<T>( const aMethodName : String; const aParams : Array of TValue) : T; to function DoInvoke( const aMethodName : String; const aParams : Array of TValue) : String; And now the debugger sees the method. Good Job E! Have you seen such behavior before? Do I have to try reinstalling 10.3.3 or should I go back to 10.3.2 and wait for 10.4? This is the class declaration type TWebAPIClientConnector<I : IInvokable> = Class( TInterfacedObject ) private fRTC : TRttiContext; fRttiType : TRttiType; fBaseRoute : String; private fConnector : I; function ConvertToString( const aValue : TValue ) : String; procedure DoExtractAttributes( const aAttributesArray : TArray<TCustomAttribute>; var aHttpMethodType, aHttpMethodRoute : String ); function DoBuildURI( const aMethodName : String; const aParams : Array of TValue ) : String; function DoConvertWebAPIResponse<T>(aWebAPIResponse : TJSONValue ) : T; protected function DoInvoke<T>( const aMethodName : String; const aParams : Array of TValue) : T; public constructor Create; End; Clément
  4. The users are remote. Most request (99.5% 🙄 ) will be handled by the HTTP Server and it's modules. But there's always that customer that requires some special attention. In this case I must complement the request with a call to a "microservice" Everyone will request the same action, but, for this customer, I must execute an extra call. This extra call is very customer specific, so I don't want to include it in the main service, I want to execute it either by simple EXE, or by DLL, or by another service.... But from what I saw, I'll have to write another server to call those microservices. That arquitecture gave me some ideas I will use CreateProcess. Since this process will not required any interaction, I see no reason it can't run in the same service session.
  5. Hi Arnaud. The HTTP server is compiled with some functionalities that are common for the customers that will access that server. Customers can be are either small companies or individuals. Each company can have many employee and each will have to a "user" to log in the client app and make requests. The "common" functionalities can group Companies in the same segment for example. Those companies will access the same HTTP Server compiled with modules, so if you wish, monolithic. What I need is to address specific needs from some customers. And for those I wish to execute an "app". And this app will be called from this HTTP server.
  6. Hi, I manage to reproduce the following AV with very simple steps. As the AV happens in coreide270, it's impossible to save the project, unit, close Delphi. "End Task" is the only way to close the IDE and loose any unsaved work. Here are the steps: Start an empty VCL Project. Drop a ImageCollection component Add a few PNG images (Click add and select 3 or 4 PNG images) Click Apply, then OK to get back to the form Left click the form to call the context menu Select "View as Text" (The AV might happen here) Left Click the dfm to call the context menu, and select "View as Form" (The AV might happen here) Try to save the project (The AV might happen here) The AV will happen either on step 7, or 9 or 11. The only work around is to save the form (returning from step 4). If you don't save, you will see the AV I attached below (Image and details). Can someone please try to duplicate? Clément Details>> [208CCA97]{coreide270.bpl} DocModul.TCodeIDocModule.GetFileName (Line 2248, "DocModul.pas" + 1) + $5 [0A3287FD]{IDELSP270.bpl} Baselspserver.TLSPServer.DoSendString + $51 [0A36CCDD]{IDELSP270.bpl} Lspmgr.CreateLSPMgr + $5041 [0A36C9A4]{IDELSP270.bpl} Lspmgr.CreateLSPMgr + $4D08 [0A36C88D]{IDELSP270.bpl} Lspmgr.CreateLSPMgr + $4BF1 [0A36DF37]{IDELSP270.bpl} Lspmgr.CreateLSPMgr + $629B [0A369851]{IDELSP270.bpl} Lspmgr.CreateLSPMgr + $1BB5 [0A3699E8]{IDELSP270.bpl} Lspmgr.CreateLSPMgr + $1D4C [208BCAB9]{coreide270.bpl} IDEServices.TIDEServices.SendFileNotification (Line 5041, "IDEServices.pas" + 😎 + $10 [208BD16A]{coreide270.bpl} IDEServices.FileNotification (Line 5301, "IDEServices.pas" + 1) + $9 [208B72A6]{coreide270.bpl} IDEServices.TIDEServices.BeginProjectGroupClose (Line 2794, "IDEServices.pas" + 2) + $F [2101ABC5]{designide270.bpl} Events.TEvent.Send (Line 165, "Events.pas" + 2) + $11 [20559EEC]{coreide270.bpl} ProjectGroup.TProjectGroup.BeforeDestruction (Line 924, "ProjectGroup.pas" + 10) + $8 [5006025D]{rtl270.bpl } System.@BeforeDestruction (Line 19087, "System.pas" + 10) + $0 [20559E56]{coreide270.bpl} ProjectGroup.TProjectGroup.Destroy (Line 899, "ProjectGroup.pas" + 0) + $2 [5005FA2C]{rtl270.bpl } System.TObject.Free (Line 17683, "System.pas" + 1) + $4 [205606B6]{coreide270.bpl} ProjectGroup.TProjectGroupWrapper.Close (Line 2834, "ProjectGroup.pas" + 2) + $5 [004ABE8F]{bds.exe } AppMain.TAppBuilder.DestroyProjectGroup (Line 2664, "AppMain.pas" + 15) + $9 [004AF26C]{bds.exe } AppMain.TAppBuilder.WindowCloseQuery (Line 3918, "AppMain.pas" + 19) + $3 [50E554D1]{vcl270.bpl } Vcl.Forms.TCustomForm.CloseQuery (Line 7459, "Vcl.Forms.pas" + 😎 + $14 [50E553F9]{vcl270.bpl } Vcl.Forms.TCustomForm.Close (Line 7431, "Vcl.Forms.pas" + 4) + $4 [01734013]{vclwinx270.bpl} Vcl.TitleBarCtrls.TCustomTitleBarPanel.TitleButtonCloseClick (Line 1414, "Vcl.TitleBarCtrls.pas" + 2) + $7 [50CF731F]{vcl270.bpl } Vcl.Controls.TControl.Click (Line 7596, "Vcl.Controls.pas" + 9) + $8 [50EA6CAC]{vcl270.bpl } Vcl.Buttons.TCustomSpeedButton.Click (Line 1918, "Vcl.Buttons.pas" + 0) + $4 [50EA6C96]{vcl270.bpl } Vcl.Buttons.TCustomSpeedButton.MouseUp (Line 1911, "Vcl.Buttons.pas" + 25) + $10 [50CF7750]{vcl270.bpl } Vcl.Controls.TControl.DoMouseUp (Line 7724, "Vcl.Controls.pas" + 2) + $25 [50CF77DE]{vcl270.bpl } Vcl.Controls.TControl.WMLButtonUp (Line 7737, "Vcl.Controls.pas" + 9) + $6 [50CF6DC6]{vcl270.bpl } Vcl.Controls.TControl.WndProc (Line 7480, "Vcl.Controls.pas" + 91) + $6 [50F4C99F]{vcl270.bpl } Vcl.Styles.TCustomStyle.SourceLoaded (Line 3310, "Vcl.Styles.pas" + 1) + $13 [50F4C8E0]{vcl270.bpl } Vcl.Styles.TCustomStyle.GetEnabled (Line 3290, "Vcl.Styles.pas" + 0) + $4 [50DF394F]{vcl270.bpl } Vcl.Themes.TStyleManager.GetIsCustomStyleActive (Line 5646, "Vcl.Themes.pas" + 0) + $7 [50DF7615]{vcl270.bpl } Vcl.Themes.TCustomStyleEngine.HookCBProc (Line 7563, "Vcl.Themes.pas" + 3) + $0 [50DF77C6]{vcl270.bpl } Vcl.Themes.TCustomStyleEngine.HookCBProc (Line 7614, "Vcl.Themes.pas" + 54) + $18 [50CF6A00]{vcl270.bpl } Vcl.Controls.TControl.Perform (Line 7258, "Vcl.Controls.pas" + 10) + $8 [50CFB4BC]{vcl270.bpl } Vcl.Controls.TWinControl.IsControlMouseMsg (Line 10190, "Vcl.Controls.pas" + 15) + $29 [50CFBB02]{vcl270.bpl } Vcl.Controls.TWinControl.WndProc (Line 10367, "Vcl.Controls.pas" + 112) + $6 [1D085DB9]{cxLibraryRS27.bpl} Cxcontainer. + $0 [50CFB230]{vcl270.bpl } Vcl.Controls.TWinControl.MainWndProc (Line 10120, "Vcl.Controls.pas" + 3) + $6 [50181184]{rtl270.bpl } System.Classes.StdWndProc (Line 17989, "System.Classes.pas" + 😎 + $0 [50E5A71F]{vcl270.bpl } Vcl.Forms.TApplication.ProcessMessage (Line 11002, "Vcl.Forms.pas" + 23) + $1 [50E5A762]{vcl270.bpl } Vcl.Forms.TApplication.HandleMessage (Line 11032, "Vcl.Forms.pas" + 1) + $4 [50E5AA95]{vcl270.bpl } Vcl.Forms.TApplication.Run (Line 11170, "Vcl.Forms.pas" + 26) + $3 [0051E104]{bds.exe } bds.bds (Line 222, "" + 13) + $2
  7. Clément

    Reproducible AV in Sydney

    Let's hope E. can fixed it on the next patch. Very annoying!
  8. Clément

    Reproducible AV in Sydney

    @Lars Fosdal Thanks for confirming it! QP Issue : https://quality.embarcadero.com/browse/RSP-29845
  9. Clément

    Reproducible AV in Sydney

    Before reporting I wanted to be sure others could duplicate the problem.
  10. It's a fact that one could always download previous licenses. There was always an upgrade path to a newer version. And occasionally some discounts to force users to get a newer version. Emb is the only who can tell if that worked at all. And of course, you could always request a reload if you made several installations. I would not call that "extremely", thought. I understand this statement differently. You can still use your Delphi 7 or Delphi XE version today. (license without time limit), but you still have the bump dependency problem. Previous versions of delphi where a lot more popular I guess. It's a fact that some still keep Delphi 7 or Delphi XE because the produced executable is very small compared to newer versions. It wouldn't surprise me that people still need small executable to run in limited devices. Again, only Emb can tell how demanding older IDE version can get. They could event let Delphi 7 download for free... why not? (One can always dream) Not directly. I'm always using the newest version, although it's getting harder and harder to keep it up, Delphi Sydney most probably will be my last subscribed version. The forcing upgrade is not an issue, but the cost/benefit. I have no way to downgrade my Enterprise subscription and for the price/quality there's a LOT to complain about. I'm not using Datasnap, I'm not using RAD Server, I'm not using WSDL wizard (I wrote my own), there are components that took so long to be available that I was had to buy, or write my own) . If you are using those technologies, it's ok to pay for them, but if you're not? This is what makes Delphi extremely expensive, and new managers just won't pay for a product they are not 100% sure is able too solve their problem. (Technical, documentation, developer availablilty, SDK integration ( lot's of C#, C++, Java etc, but no Delphi) ) Emb itself is not sure who it's target is, and nothing is done to help find it out. One solution would be to have several SKUs: RAD Studio Small Business, RAD Studio Standard Business, RAD Studio Large Business and a combination with Bronze, Silver, Gold, Platinum Licenses that would allow us to get access to the products we need. Moving to a different platform is getting real every day.
  11. I like my constructors to construct No loading, no process, no fancy stuff inside the constructor other than parameter assignment, variable initialization or other class creation.
  12. Clément

    language updates in 10.4?

    I'm not the only one who runs out of coffee! .
  13. ARC! I need coffee for my memory management
  14. I was not using FMX for serious development, so for me nothing will change at all. Except, maybe I will give FMX another try. Hopefully FMX will improve faster without ARM. There's a lot to catch either to match VCL counter part or Android Studio! What I really want to see: Bug Fixes RTL Improvement / optimization Debugger Stability Win32 AND Win64 IDE Quality Language Server Protocol for Delphi Language Enhancements: Managed Records Unified memory management across all platforms VCL High DPI Styles Support VCL Per Control Styling New VCL Components Updated VCL styles for HighDPI Windows API Updates
  15. Hi, I'm using our beloved Delphi to capture fingerprints from a device and send them to another device. Usually, small Biometric Desktop USB device is used to capture fingerprints, and I send the data to controller (Door, etc). I specifically asked the controller manufacturer to have his device compatible with ANSI378-2004, as the biometric Desktop USB supposably captured in that format. The Controller manufacturer is saying that ANSI378-2004 template should begin with 46 4D, but of course none of the templates I capture begins with those bytes. And the desktop manufacturer says the format of his device is ANSI378-2004. Is there any library (or application) that can help me identify the biometric template format? I was ask to find something, but as it seems there's a strong copyright over those modules, there's no much information. Anyway, maybe someone can shed some light. Thanks
  16. Clément

    Biometric Template type

    That was fast! I past so many times over those pages but I guess I needed an extra pair of eyes! Thank you
  17. TStringList has a Direct access of O(1), if you are accessing it unsorted, and this is as fast as it gets. But, when used as a dictionary, TStringlist must be sorted, and that's another ball game! When you add an element to a sorted list it goes through binary search ( O log n ) , same happens if you delete. When you need a lookup structure, TDictionary is the way to go as it's always O(1).
  18. Actually both. I needed to write a small interface between SAP (text files with a +/- ten thousand records) and another system that needed to check if a RFID card number was in a list. Depending on some card property (returned by the associated class, I had to call a certain REST API). I was using a simple sorted StringList, when I switched to TDictionary the performance boost was noticeable. Routines dropped from minutes to seconds. I replaced: idx := fCardList.indexof( aCardNumber ); if idx>-1 then lObj := TMyObject( fCardList.Objects[idx] ) with if fCardlist.TryGetValue( aCardNumber, lObj ) then case lObj.RoleType of [..] end; Faster and more readable! It depends. When performance is the key, I usually write a lot of comment to compensate the lack of readability. In those cases I know the routine must be lean and mean I will use the fastest data structure. When the routine is simpler, not called very much, or performance is not an issue then I move to a "more readable" coding approach.
  19. Have you compared your results with: https://github.com/maximmasiutin/FastMM4-AVX ?
  20. Hi, I'm using Delphi Rio to read some rather large log files ( some might have 5Gb). The encoding might be Ansi or UTF8. The log files are created from different systems and each encodes differently. I would like to use TFileStream ( or TBufferedFileStream) to read the file in chunks of 32k, but how can I be sure that an UTF8 character split between chunks will be decoded correctly?
  21. I'm still working on that reading routine . I can't read all 5Gb in memory (even in chunks). That particular file have lines over 64Kb of data without finding a CRLF. And of course my buffer was set to 64Kb! I'd go straight to 1Mb of data to walk back to the last CRLF. I'm not walking back the stream position per se. I'm using the buffer I just read to count the number of chars I need to go back, and set the stream back that amount of bytes. For other large files it works just fine, but there's always "that file" that messes everything.
  22. Hi, You can test with a tool I wrote. The community edition is free: http://www.dhs.com.br/dhsPinger.html
  23. Clément

    Best way to refresh static data

    Hi, Have you measure what is taking a long time? Is it the retrieval time from the SQL Server: Make sure the SQL optimizer is using the expected index. Is it downloading data to local store: Try compress , or is it the local loading time? using IN ( long list ) is not a good option in ANY database. As other suggested, use a proper table to insert the IDs and join with that table. if some SQL server don't support session table you can simulate one by creating physically the table with two columns, one with some user identification ( user name, user login, machine name or machine IP ) and another an ID. But do use a join to retrieve those rows.
×