Indy's FTP Component crashes the IDE lazarus / 38-Networking and Web Programming ---------------------------------------------------------------------- Flomo · 2017-12-30 08:44 I am very new to Lazarus and wanted to start with porting a little program originally developed with Delphi7. Using the OPM I installed Indy 10.6.2.5440, installation and recompiling the IDE worked w/o a problem. When I now put an FTP client component onto the form, the objectinspector does not show any properties of the component, switching between the form and the FTP component crashes the IDE. Can anyone confirm this or offer some advise how to fix this. Florian ---------------------------------------------------------------------- balazsszekely · 2017-12-30 09:14 Hi Flomo, Welcome to the forum. Can you please specify your Lazarus/FPC version? Operating system? I will take a look later. Until then, as a workaround, you can add in Project Inspector, package indy_laz to your project "Required Packages"(if not already there), unit IdFTP.pas to the uses clauses, then create FTP component dynamically, like this: 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 var  IdFTP1: TIdFTP;  //...  IdFTP1 := TIdFTP.Create(Self);  with IdFTP1 do  begin    Name := 'IdFTP1';    //...  end;  PS: Don't forget to free IdFTP1 when you no longer need it. regards, GetMem ---------------------------------------------------------------------- Flomo · 2017-12-30 10:42 Hi GetMem, thanks for your help. I am using a fresh installation of Lazarus 1.8.0, FPC-Version 3.0.4, SVN -Version 56594 on Win7-64. Meanwhile, I have tried some of the other Indy Components available, those do NOT show the effect described. Florian ---------------------------------------------------------------------- WooBean · 2017-12-30 17:24 Hi Flomo, I have an observation that component TIdFTP from Indy10 package 10.6.2.5440 crashes when used in 64 bit environment (tested in win 7/64, lazarus 1.8.0, FPC 3.0.4 win64/win64 and linux mint 18.3 64 bit, lazarus 1.8.0, FPC 3.0.4, x86_64, gtk2). What is (not) strange this component works as expected when used in 32 bit version (win 7/64, lazarus 1.8.0, FPC 3.0.4 win32-win32/64). I tried also Indy10 package updated version 10.6.2.5444 from the global repository - it has the same crippled component TIdFTP. ---------------------------------------------------------------------- balazsszekely · 2017-12-30 21:23 @Flomo I did a little debugging. The crash is caused by the property DefStringEncoding. Just open IdFTP.pas, go to line 1042, comment out: 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 // property DefStringEncoding : IIdTextEncoding read FDefStringEncoding write SetDefStringEncoding;Compile/Install indy_laz again. This is just a temporary solution until an official fix is available. If you want to use DefStringEncoding in your code, then move it to the public section. PS: I also updated indy in the central repository. The current version is: 10.6.2.5444 ---------------------------------------------------------------------- Flomo · 2018-01-03 19:45 Hi GetMem, thank you very much for looking into this and providing a solution which does solve the problem. @WooBean I am working with a 32 bit installation of Lazarus with the 64 bit extension, so my enviroment must be different from yours Florian ---------------------------------------------------------------------- balazsszekely · 2018-01-03 20:15 @Flomo The bug has nothing to do with Indy, hopefully a fix will soon be available in trunk: https://bugs.freepascal.org/view.php?id=32919 ---------------------------------------------------------------------- reyncla · 2018-01-03 20:56 I have an error with the TIdSimpleServer component (Indy 10.6.2), which belongs to the tab: "Indy Servers - Core". When I select that component and place it on the lazarus form, appears the next message: "Unable to stream selected components There was an error during writing the selected component IdSimpleServer1:TIdSimpleServer: Access violation" Using, Lazarus 1.8 fpc 3.04 for Win32 and also the same error occurs with Lazarus fixes (1.8.1) and fpc fixes (3.0.5) for Win32. ---------------------------------------------------------------------- balazsszekely · 2018-01-03 21:13 @reyncla Again it has nothing to do with Indy, there is a regression with published properties. Just move property "Binding" from published to public section. You won't be able to see it in the Object Inspector, but it's accessible via code. PS: IdSimpleServer.pas, TIdSimpleServer class. ---------------------------------------------------------------------- reyncla · 2018-01-03 21:38 @Getmem Thanks for your help. Then I will try. You who have more experience, it is good to say to the administrators of these small bugs. Because several users can believe, it is the fault of the component; and you've already shown that it's not like that. ---------------------------------------------------------------------- Remy Lebeau · 2018-01-04 19:11 Quote from: GetMem on January 03, 2018, 09:15:12 pm@Flomo The bug has nothing to do with Indy, hopefully a fix will soon be available in trunk: https://bugs.freepascal.org/view.php?id=32919 Good to know.  But, on the other hand, TIdFTP.DefStringEncoding should not have been declared as published to begin with, so I have changed it to public now. ---------------------------------------------------------------------- Remy Lebeau · 2018-01-04 19:13 Quote from: GetMem on January 03, 2018, 10:13:37 pmAgain it has nothing to do with Indy, there is a regression with published properties. Just move property "Binding" from published to public section. You won't be able to see it in the Object Inspector, but it's accessible via code. What regression exactly?  And is it being fixed?  The Bindings property is just a simple TCollection, it needs to be accessible at design-time.  So officially, I have to keep it published in Indy's official releases. ---------------------------------------------------------------------- Thaddy · 2018-01-04 20:45 Quote from: GetMem on January 03, 2018, 10:13:37 pmAgain it has nothing to do with Indy, there is a regression with published properties. Just move property "Binding" from published to public section. You won't be able to see it in the Object Inspector, but it's accessible via code. I am not aware of this? It is not in FPC? Enlighten us? ---------------------------------------------------------------------- balazsszekely · 2018-01-04 21:34 @Remy, @Thaddy This is for interfaces: https://bugs.freepascal.org/view.php?id=32919, the same is true for TCollectionItem. Both worked in Lazarus 1.6, so it's a regression. ---------------------------------------------------------------------- reyncla · 2018-01-05 13:08 According to this: http://lists.lazarus.freepascal.org/pipermail/lazarus/2016- January/096906.html The error of the TIdSimpleServer Component, also happened with the previous version FPC 3.0.0 and Lazarus 1.6RC2 ---------------------------------------------------------------------- Remy Lebeau · 2018-01-09 22:21 Quote from: GetMem on January 04, 2018, 10:34:46 pmThis is for interfaces: https://bugs.freepascal.org/view.php?id=32919, the same is true for TCollectionItem. Why is TCollectionItem broken? ---------------------------------------------------------------------- balazsszekely · 2018-01-10 06:56 QuoteWhy is TCollectionItem broken?I don't know. I did not study the issue myself, but I will in the near future. ---------------------------------------------------------------------- Thaddy · 2018-01-10 07:07 Quote from: GetMem on January 10, 2018, 07:56:09 amQuoteWhy is TCollectionItem broken?I don't know. I did not study the issue myself, but I will in the near future. It ain't broken. Otherwise half the fcl and classes based rtl would not work. The editors are broken. ---------------------------------------------------------------------- balazsszekely · 2018-01-10 07:19 QuoteThaddy It ain't broken. Otherwise half the fcl and classes based rtl would not work. The editors are broken.Did you study the issue? Then please provide a patch.