Code Completion does not work after first compilation lazarus / 21-General ---------------------------------------------------------------------- teco · 2024-08-22 13:15 Hi to all, We are using ElevateDB as Database and have the following issue: The code complete function shows all available properties before we do a compilation. After compilation it shows only "templates". Additional we got the message that the unit edbtype is not found. To continue working/compiling we need to restart Lazarus. Samples on the attachments. This has happen after adding some more code lines to the source code. This happens only with functions from the ElevateDB Source code. Anything else is not affected by this. Any idea where I check if some settings are wrong? ---------------------------------------------------------------------- Zvoni · 2024-08-22 13:23 As long as you have an (Syntax-) Error in your code, code-completion won't work. That said: Your last screenshot says it can't find the unit "edbtype" (which causes code-completion not to work). is this a fpc/Lazarus-Unit? If from a package, have you installed the packed resp. added the package to your project? ---------------------------------------------------------------------- teco · 2024-08-22 14:27 Quote from: Zvoni on August 22, 2024, 03:23:31 pmAs long as you have an (Syntax-) Error in your code, code-completion won't work. That said: Your last screenshot says it can't find the unit "edbtype" (which causes code-completion not to work). is this a fpc/Lazarus-Unit? If from a package, have you installed the packed resp. added the package to your project? No, this is a paid third party unit from the ElevateDB Database. Information from Elevatesoft: Unknown issue. They have not found any issues. I don't think it is a syntax error because the software works on the first compilation without errors. After the first compilation it fails on compilation, but sometimes it compiles again without errormessage. At the moment I try to compile it after the first compilaton until I get another compilation without error - or I restart Lazarus. Then it works again for one compilation. This has start happen after adding the following lines: Code: Pascal  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i if (Questiondlg('Question: Irgnore or not to be ignore. Will you keep the result or trash it.',mtCustom,[mrOK,'Keep', mrNo, 'Trash'], '') = mrNo) then  begin;    showmessage('Greetings from the trashcan...');  result := -1;    exit;  end; When I remove the lines, than the issue is gone. ---------------------------------------------------------------------- ASBzone · 2024-08-22 14:41 Remove that ; after the begin and see what happens. ---------------------------------------------------------------------- teco · 2024-08-22 14:48 Quote from: ASBzone on August 22, 2024, 04:41:41 pmRemove that ; after the begin and see what happens. Nothing changed. Code: Pascal  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i     if (Questiondlg('Question: Irgnore or not to be ignore. Will you keep the result or trash it.',mtCustom,[mrOK,'Keep', mrNo, 'Trash'], '') = mrNo) then      begin        showmessage('Greetings from the trashcan...');        result := -1;        exit;      end; ---------------------------------------------------------------------- ASBzone · 2024-08-22 14:52 Okay, when it occasionally fails on compilation, what is that error message? ---------------------------------------------------------------------- teco · 2024-08-22 15:02 Only the errormessage as above on the first post. The software itself shows no Content from the Database, but no error messages or crashs. Simply it shows nothing from the database. When I restart Lazarus and compile it again, the software works without issues. Checking the complete unit with all procedures, etc. I am currently working on will take some time. This unit has around 5300 lines. If there is any faster way to find out what causes this would safe me some time. ---------------------------------------------------------------------- paweld · 2024-08-22 16:17 Does rebuilding the project using the Run > Clean an biild menu solve the problem? ---------------------------------------------------------------------- teco · 2024-08-23 06:28 Clean a build does not change it. What I have found out: Before compilation When I select "Find Declaration of edbtype" it shows the unit edbtype After compilation When I select "Find Declaration of edbtype" it does not show the unit edbtype and the error from the first post "Codetools, Errors: 1  databasehandler.pas(9,23) Error: unit not found: edbtype" is shown under messages. Same happens when I first work with functions, etc. from this unit. I have checked the source files I have purchased. All files are there. Nothing is missing. ---------------------------------------------------------------------- Lutz Mändle · 2024-08-23 06:56 What is your operating system? If you are on Linux make sure that the setting for the path to the gcclib in the fpc.cfg (located in /etc [but that is maybe varying]) matches your system. This path can requested with the command: Code: Text  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i gcc -print- libgcc-file-name  On my system it gives the following answer: Code: Text  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i /usr/lib64/gcc/x86_64-suse-linux/13/libgcc.a  Therefore the matching setting in my fpc.cfg is: Code: Text  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i # path to the gcclib#ifdef cpui386-Fl/usr/lib64/gcc/x86_64-suse- linux/13/32#endif#ifdef cpux86_64-Fl/usr/lib64/gcc/x86_64-suse- linux/13#endif ---------------------------------------------------------------------- teco · 2024-08-23 07:24 Sorry, but I am on Windows. ---------------------------------------------------------------------- Seenkao · 2024-08-23 08:49 Большая вероятность что теряется путь до данного модуля, по непонятной причине. Попробуйте дополнительно прописать путь до данного модуля. С подобной ситуацией я сталкивался когда переносил проект Delphi на Lazarus. Если это так (вы переносили проект), то *.lfm файлы могут содержать данные которые Lazarus не использует. Это может вызывать проблемы при сборке проекта. Google translate: There is a high probability that the path to this module is lost for some unknown reason. Try to additionally specify the path to this module. I encountered a similar situation when I transferred a Delphi project to Lazarus. If this is the case (you transferred the project), then *.lfm files may contain data that Lazarus does not use. This may cause problems when building the project. ---------------------------------------------------------------------- teco · 2024-08-23 09:36 Quote from: Seenkao on August 23, 2024, 10:49:18 am Google translate: There is a high probability that the path to this module is lost for some unknown reason. Try to additionally specify the path to this module. I encountered a similar situation when I transferred a Delphi project to Lazarus. If this is the case (you transferred the project), then *.lfm files may contain data that Lazarus does not use. This may cause problems when building the project. The complete software was directly developed with Lazarus. Oldest Version was 2.2.4. The ElevateDB is originaly developed for Delphi and is maintained for Delphi and Lazarus by the manufacturer. It has .lpk files for installing as package to Lazarus. I have add the path to the project settings at "Other unit files (-Fu)" and "Libraries (-Fi)". I am not sure if this are the right places because this was never needed before. Compiling works, but I can not start the Software. I get an error message. At the Message windows I get also some errors. Please see Attachements for details. Is the size of my sourcecode a reason why this can happen? ---------------------------------------------------------------------- paweld · 2024-08-23 09:53 And do you have an edbtype file added in the edbdesign package inspector? ---------------------------------------------------------------------- teco · 2024-08-23 10:10 Quote from: paweld on August 23, 2024, 11:53:38 amAnd do you have an edbtype file added in the edbdesign package inspector? Yes. I have attached some information from the packages. Same settings as in my other projects. The ElevateDB works without problem in my other projects and has worked in this project until I have added some lines, which are not related with database functions. Lines are listed in the third post. ---------------------------------------------------------------------- Seenkao · 2024-08-23 12:03 Запустите программу с включенной отладкой. По большей части программа остановится в месте где произошла ошибка и возможно это вам поможет найти ошибку. В другом случае, если вы не знаете где искать ошибку, вам больше ни кто ни чем не сможет помочь. В таких ситуациях надо либо воспроизвести ошибку каким-либо подобным методом, либо выложить исходный код и надеяться что ваш код просмотрят и найдут ошибку. Всё остальное: гадание на кофейной гуще. Google translate: Run the program with debugging enabled. Most of the time, the program will stop at the point where the error occurred, and perhaps this will help you find the error. Otherwise, if you don't know where to look for the error, no one else will be able to help you. In such situations, you either need to reproduce the error using some similar method, or post the source code and hope that your code will be reviewed and the error will be found. Everything else is guesswork. ---------------------------------------------------------------------- teco · 2024-08-23 12:33 Debugger has shown no errors. I will check the whole unit. I do not publish the unit, because reading approx. 5300 lines of code makes some work. ---------------------------------------------------------------------- teco · 2024-08-27 13:07 Maybe I have found the reason of this issue Project Settings - Compiler Options - Veerbosity - Show Line Numbers (-vl) -- activated Issue as described above Project Settings - Compiler Options - Veerbosity - Show Line Numbers (-vl) -- deactivated No issues. btw. in Lazarus 2.2.6 the .lpi file shows the following setting, if "Show Line Numbers" is activated - just in case somebody is still using 2.2.6 Code: Pascal  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i                     The   w   is missing for ShowLineNum ---------------------------------------------------------------------- n7800 · 2024-08-28 01:04 In which version of the IDE does the error occur? 2.2.6 or newer? Quote from: teco on August 22, 2024, 04:27:28 pmThis has start happen after adding the following lines: Code: Pascal  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i if (Questiondlg('Question: Irgnore or not to be ignore. Will you keep the result or trash it.',mtCustom,[mrOK,'Keep', mrNo, 'Trash'], '') = mrNo) then  begin;    showmessage('Greetings from the trashcan...');  result := -1;    exit;  end; When I remove the lines, than the issue is gone. I can't compile your example - the function is missing one parameter. After adding second "string" everything is fine. Do these strings compile in your new project? Quote from: teco on August 27, 2024, 03:07:01 pmbtw. in Lazarus 2.2.6 the .lpi file shows the following setting, if "Show Line Numbers" is activated - just in case somebody is still using 2.2.6 ... The   w   is missing for ShowLineNum There is a commit ea2c8a0a that changed this option (#40827). But I don't know how this could be related. Maybe it is related to the option itself, but it just controls the compiler flag responsible for the verbosity of the output. ---------------------------------------------------------------------- Packs · 2024-08-28 03:39 @teco Are you using Elevate db past how many years. What purpose you are using. And performance. ---------------------------------------------------------------------- Packs · 2024-08-28 05:22 Code complition not working for third party component. In my project also I am facing same issue ---------------------------------------------------------------------- teco · 2024-08-28 06:50 Hi, QuoteI can't compile your example - the function is missing one parameter. After adding second "string" everything is fine. Do these strings compile in your new project? Maybe a typo from my side. The text in the question windows is original in German. I have changed it and maybe made a typo here. Sorry and yes the original code works in the project .  QuoteIn which version of the IDE does the error occur? 2.2.6 or newer?Only in 2.2.6, but when you does not change project settings it moves to 3.4 with the same issue. Removing the setting from the project settings repairs it. QuoteThere is a commit ea2c8a0a that changed this option (#40827). But I don't know how this could be related. Maybe it is related to the option itself, but it just controls the compiler flag responsible for the verbosity of the output. Maybe something else is also change in the lpi, but I have checked only about the missing w or deactivate the complete setting. QuoteAre you using Elevate db past how many years. What purpose you are using. And performance. Using as encrypted database with low overhead and low memory requirement. Mostly for chash box software, Production Management and Statistics, etc. All are in House projects. Performance is good with an average of 250,000 records per table and around 8-10 tables in the database. I am using for some other projects the RAD Studio and use the full Client/Server version. Performance is suitable up to approx. 150 concurrent sessions/clients. ---------------------------------------------------------------------- Packs · 2024-08-28 07:57 Thanks ---------------------------------------------------------------------- Packs · 2024-08-28 08:03 I am using SDAC from devart component . When I click on query component . I am getting error [Window Title] Error [Content] Unable to create new method. Please fix the error shown in the message window which is normally below the source editor. [OK] ---------------------------------------------------------------------- paweld · 2024-08-28 08:09 @Prakash: I have been using SDAC in my projects for many years and have never had the error you describe with it. ---------------------------------------------------------------------- Packs · 2024-08-28 08:14 how to identify this issue . it is Lazarus ide issue or SDAC issue . Where I should go now . ---------------------------------------------------------------------- Packs · 2024-08-28 09:18 is is because of trail version . I have downloaded Unidac trail version created new project same error it is showing . ---------------------------------------------------------------------- Packs · 2024-08-28 09:19 error : D:\xxx\yyy\app2\database.pas : error unit not found uni