Jump to content


  • Content Count

  • Joined

  • Last visited

  • Days Won


Clément last won the day on August 26 2019

Clément had the most liked content!

Community Reputation

102 Excellent

Technical Information

  • Delphi-Version
    Delphi 10.4 Sydney

Recent Profile Visitors

1110 profile views
  1. I've been testing Delphi 11 with small projects, just because their are simply to migrate and test. Although most features are working fine, some bug are very annoying and counter productive. 1) Code refactor: Is not working fine. There are methods (or classes) that kept the old name. For example, I'm renaming a class with several methods. Only part of them gets renamed in the same unit. Nothing happens with external references. I have to check manually or "Compile and Fix" the bad refactored code. 2) LSP: It's hard to describe. There's clearly an improvement but something got broken in the way. Lot's of curly lines are shown where code is fine. I have to close/reopen the IDE. If I refactor a method name for example, The new name will get red curly lines. After adding units or refactorying code, there are so many curly line is hard to pin point what is correct and what's not. Once the project compiles, I have to restart the IDE for those curly lines to disappear. 3) Delphi 11 Help need some help.. again 😞 4) When debugging Inline var the wrong value is displayed but the routine works as expected, i.e, the value is correct. 5) Incremental searching components (component palette) is very slow. Someone forget to use BeginUpdate/EndUpdate? 6) When closing the IDE there's this error that pop's once in a while. The projects I'm working are very simple, and I'm using valina components from the IDE ( TControlList, TControlListButton, SVG Images from ethea, ICS ), in fact the same components/source code are shared with 10.4.2 (which is working fine) On the other way... 1) Delphi 11 generates faster and smaller code. 2) The IDE design is the best, snappier, no more flicking, and very fast! I really enjoy working with it 3) The class helpers for TDatetime and currency are great! 4) the debugger improved a lot and displays correctly (most of the time) generics and complex structures, both in 32 and 64 bits. 5) Getit is great! I will continue migrating my small projects to Delphi 11, but I will wait for a patch before considering Delphi 11 as my main IDE.
  2. Clément

    TFDQuery Async execution aborts with out of memory

    Good news! I'm calling TFDConnection.AbortJob from an instance in the main thread, and it is aborting the query running in another thread! How cool is that! Also I manage to catch the out of memory error in my default Query execution flow! The application remains stable even after the out of memory
  3. Clément

    TFDQuery Async execution aborts with out of memory

    I will try to call AbortJob from the main thread. My TFDConnection is in another thread, so it should work.
  4. Clément

    TFDQuery Async execution aborts with out of memory

    This is my "cKwel" query tool available for free in 32bit and 64bits. The user downloaded the 32bit version because he is using 32bit library to connect to his database.🤨 The SQL Query is already running in it's background thread. FireDAC accepts the following Execution modes: amBlocking The calling thread and GUI are blocked until an action is finished. amNonBlocking The calling thread is blocked until an action is finished. The GUI is not blocked. amCancelDialog The calling thread and GUI are blocked until an action is finished. FireDAC shows a dialog, allowing to cancel an action. amAsync The calling thread and GUI are not blocked. The called method returns immediately. TFDQuery is created using amBlocking. In this mode, just placing TFDquery.Open in an exception block solves the problem. But, in this mode the user have to wait until the end of the execution and there's no way to Cancel the query (calling abortJob) Since I'm already in a background thread, amNonBlocking and amCancelDialog are not an option. Which leaves me with amAsync. The "Cancel Query" button is working. But I can't catch the out of memory error, and who knows what other exceptions?
  5. Clément

    TFDQuery Async execution aborts with out of memory

    Hello Lajos, The application in question is a query tool, so the user can test or write queries against several SQL Engines. If the user wrote is doing "something wrong" , I must catch the error and display it nicely. This uncatched out of memory is making the application unstable. When using "amAsync", Firedac spawns a thread to fetch the data, and returns immediately the control to the app. That's fine. The issue of retrieving such volume of records is to trigger the out of memory inside that thread and not surfacing it. At least, so far, I couldn't find a way to catch it. I'm working on plan B and monitoring the memory used. If the memory gets close enough to the limit, I will abort the job. At least the application will remain stable.
  6. Hello, I'm using Delphi 10.4.2 with Firedac against SQL Server northwind database. I setup the components to execute asynchronously and assigned the OnError event. But the out of memory is not cached and I don't have a clue on how/where to catch it I'm running this query "select * from categories, orders, employees" to simulate the error a user is reporting. The application (32 bit version) memory goes to 1.7Gb and raises the out or memory. The problem is not the query per se, I'm just trying to catch the out of memory error. Here's some code: function TSQLTaskWorker.DoCreateQry(const aSQL: String; aFDConnection: TFDConnection): TFDQuery; begin Result := TFDQuery.Create(nil); if Assigned(aFDConnection) then Result.Connection := aFDConnection else Result.Connection := fFDConnection; Result.FetchOptions.Mode := fmAll; Result.FetchOptions.Items :=[fiBlobs]; Result.FetchOptions.Cache :=[fiBlobs]; Result.FetchOptions.AutoFetchAll := afAll; Result.FetchOptions.RecsMax := 100000; Result.SQL.Text := aSQL; end; procedure TSQLTaskWorker.DoSetConnection(aTaskConnection: TSQLTaskConnection); begin { ... Setting up fFDConnection ... } fQryAsync:= DoCreateQry('', fFDConnection ); fQryAsync.ResourceOptions.CmdExecMode := amAsync; fQryAsync.AfterOpen := event_QueryAsyncAfterOpen; fQryAsync.AfterExecute := event_QueryAsyncAfterExecute; fQryAsync.OnError := event_QueryAsyncError; end; procedure TSQLTaskWorker.DoRunSQLAsync(aSQLTaskRequest: TSQLTaskQueryRequest); begin fQryAsync.SQL.Text := aSQLTaskRequest.SQL; fQryAsync.Tag := NativeUInt( lTaskAsyncQueryResponse ); fQryAsync.OpenOrExecute; end; When DoRunSQLAsync is called, fQryAsync.OpenOrExecute is called and returns immediately as expected. I can follow the memory building up until the out of memory is raised. The error is raise before calling any events, and afterward no event is called either. I can't find a way to trap such error. Here's the call stack: Since I'm not able to handle properly this error, my application becomes unstable and must be closed. Any ideas? Clément
  7. Done: https://quality.embarcadero.com/browse/RSP-35770
  8. Hi, I managed to duplicate this small bug in Delphi 11 and Delphi 10.4.2. 1) Drop TControlList and Inside the Item area drop a TControlListButton. 2) Drop a ImageCollection and assign some images. 3) Drop a TVirtualImageList, link it to ImageCollection and Add some images. 4) Link TVirtualImagelist to TControlListButton.Images Notice that it's not possible to View the icons either in ImageIndex nor ImageName properties. You can set then manually, for example, if you assign ImageIndex := 0 and ImageName will reflect the correct image. Should I report it? Or is it already known?
  9. Just to end this thread, I finally got my digital certificate, and I'm signing my applications. I kept a false positive version of the product to test signing it. Well it did work. That version wasn't compiled with DEP or SEH, and signing solved the false positive too. Hopefully this thread will help others
  10. Clément

    RAD Studio 11.0 Support

    Salut, I downloaded v8.67 from svn and it is complaining of a missing file ( under Delphi Alexandria ) [dcc32 Fatal Error] OverbyteIcsD110Run.dpk(169): F1026 File not found: '..\Source\OverbyteIcsLibeayEx.pas' Under Delphi Sydney it is compiling Ok. (That file is not in the project)
  11. @Kas Ob. Great news!!! I try all your suggestions, either alone and combine in the 32 bit release only. Here are the results. 1) Including DEP directive. ( Did NOT trigger Windows defender ) I included {$DYNAMICBASE ON} in my DPR as follows: {$R *.res} {$R 'D:\Projetos2k10\Projects V\DHS\SQL explorer II\src\resource\cKwel_versioninfo.RES'} {$DYNAMICBASE ON} // Enable DEP, works also when using {$SetPEOptFlags $40} begin // try {$IFDEF DEBUG}ReportMemoryLeaksOnShutdown:= true;{$ENDIF} Application.Initialize; Application.MainFormOnTaskbar := True; Application.Title := 'cKwel - Query Tool'; Application.CreateForm(TdmSkinController, dmSkinController); Application.CreateForm(TdmImages, dmImages); Application.CreateForm(TdmLookAndFeel, dmLookAndFeel); Application.CreateForm(TdmEditRepository, dmEditRepository); Application.CreateForm(TfrmMain, frmMain); Application.Run; // except // end; end. 2) Changing /modifying icon TRIGGERS Windows defender 3) Encapsulate all the content of the main in dpr with try..except did NOT trigger Windows defender: {$R *.res} {$R 'D:\Projetos2k10\Projects V\DHS\SQL explorer II\src\resource\cKwel_versioninfo.RES'} {.DYNAMICBASE ON} begin // Enable SEH by setting all code between try..except. try {$IFDEF DEBUG}ReportMemoryLeaksOnShutdown:= true;{$ENDIF} Application.Initialize; Application.MainFormOnTaskbar := True; Application.Title := 'cKwel - Query Tool'; Application.CreateForm(TdmSkinController, dmSkinController); Application.CreateForm(TdmImages, dmImages); Application.CreateForm(TdmLookAndFeel, dmLookAndFeel); Application.CreateForm(TdmEditRepository, dmEditRepository); Application.CreateForm(TfrmMain, frmMain); Application.Run; except // No code is required here end; end. 4) Fill the EXE description, version name copyright TRIGGERS windows defender. I don't know if the combination should produce some valid results, but any combination that includes 1 or 3 works. For example 2 and 4 will TRIGGER windows defender while 1, 2 and 4 WON'T trigger it. Cool! Hope this thread will help others! This link is also usefull: https://security.stackexchange.com/questions/18556/how-do-aslr-and-dep-work It might be a good idea to set DEP and ASLR by default.
  12. I uploaded several compilations to VirusTotal. All of them were clean, including the one that triggered windows defender. When copying the file to my friends computer, the moment I run the application windows popped up a notification windows stating it has detected a malware. The program didn't executed any file or port or protocol scanning. It's just a basic initialization of classes and starting threads. It closed "normally", without any runtime error. When restarting windows displays a "showmessage" like window stating the application wasn't safe and cannot run. Clicking OK close that windows a few seconds later the program disappeared. I copied the "32-bit release" version with all default settings to his computer. And all of the above happened. Then I compiled the 64-bit release it worked without triggering windows defender. That's what I meant when I said it ran as expected. Then I tried the "32-bit debug" version, the very same I used in my machine to debug the app. It also executed without triggering windows defender. It's only then that I experimented changing some release configuration option. After switching I/O checking to false, the 32 bit version ran without triggering windows defender. All the other Release options I toggled triggered windows defender. This application doesn't use Registry or directory scanning. It saves two configuration files: One with connection data for each and every database one can work with, and another with Data Definition Settings so files can be imported/exported according to some rules. For example, you can specify the output date format like YYYYMMDD or YYYY-MM-DD. To illustrate: At this point no actual connection is made to any server, at startup the configuration is read and loaded to the treeview. When the user expands a node, a connection is made to retrieve the database metadata: There's only one action done without user interaction which is checking for updates which is triggered 5 minutes after starting up. Windows Defender notification window is triggered way before that if compiled with IOChecking true in 32bit. I will comment out some initialization routines to see which one is triggering windows defender. I will try other tools to see if there's a silent access violation or any other error that I missed and maybe is triggering too... I can't sleep anyway
  13. I purchased my certificate and I'm waiting for the validation process to end. Hopefully next week I'll be up and running. Now I'm worried. I was hopping to solve this false positive issue. I don't know if this helps, but I'm able to duplicate this virus detection in my machine too. Just by setting the "I/O Checking" to true or false makes Windows defender act. I set my project file as an exclusion folder to avoid having conflicts between the AV and the IDE. Once I copied my application to another folder and ran it, windows defender quarantined it. The detail here is "ran it". There's nothing detected in the application upon copying it. When it is executed the I/O checking code triggers something that Windows Defender don't like. Would it do any good to send this application to Microsoft "as is" before I make some changes and Defender stops detecting it? (Or send it to Emb? They might be able to check the code generated by I/O Checking in this case, and who knows make some changes in RTL or the Compiler? (One can dream, right?) ) This application, cKwel - Query tool, is a SQL helper meant for developers and will be freeware. I'm just waiting to sign it before uploading and make it publicly available. (Although it would be really nice to let people download a program that's not detected as a malware )
  14. Thanks.. I will see what I can do. Hopefully signing will help.