Recent

Author Topic: Indy's FTP Component crashes the IDE  (Read 7355 times)

Flomo

  • New Member
  • *
  • Posts: 10
Indy's FTP Component crashes the IDE
« on: December 30, 2017, 09:44:41 am »
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

  • Guest
Re: Indy's FTP Component crashes the IDE
« Reply #1 on: December 30, 2017, 10:14:45 am »
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][+][-]
  1. var
  2.   IdFTP1: TIdFTP;
  3.   //...
  4.   IdFTP1 := TIdFTP.Create(Self);
  5.   with IdFTP1 do
  6.   begin
  7.     Name := 'IdFTP1';
  8.     //...
  9.   end;
  10.  

PS: Don't forget to free IdFTP1 when you no longer need it.

regards,
GetMem

Flomo

  • New Member
  • *
  • Posts: 10
Re: Indy's FTP Component crashes the IDE
« Reply #2 on: December 30, 2017, 11:42:06 am »
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

  • Full Member
  • ***
  • Posts: 229
Re: Indy's FTP Component crashes the IDE
« Reply #3 on: December 30, 2017, 06:24:50 pm »
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.   
« Last Edit: December 30, 2017, 08:45:33 pm by WooBean »
Platforms: Win7/64, Linux Mint Ulyssa/64

balazsszekely

  • Guest
Re: Indy's FTP Component crashes the IDE
« Reply #4 on: December 30, 2017, 10:23:14 pm »
@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][+][-]
  1. // 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
« Last Edit: December 30, 2017, 10:29:23 pm by GetMem »

Flomo

  • New Member
  • *
  • Posts: 10
Re: Indy's FTP Component crashes the IDE
« Reply #5 on: January 03, 2018, 08:45:58 pm »
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

  • Guest
Re: Indy's FTP Component crashes the IDE
« Reply #6 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

reyncla

  • Newbie
  • Posts: 6
Re: Indy's FTP Component crashes the IDE
« Reply #7 on: January 03, 2018, 09:56:27 pm »
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

  • Guest
Re: Indy's FTP Component crashes the IDE
« Reply #8 on: January 03, 2018, 10:13:37 pm »
@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

  • Newbie
  • Posts: 6
Re: Indy's FTP Component crashes the IDE
« Reply #9 on: January 03, 2018, 10:38:15 pm »
@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

  • Hero Member
  • *****
  • Posts: 1312
    • Lebeau Software
Re: Indy's FTP Component crashes the IDE
« Reply #10 on: January 04, 2018, 08:11:38 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
Lebeau Software - Owner, Developer
Internet Direct (Indy) - Admin, Developer (Support forum)

Remy Lebeau

  • Hero Member
  • *****
  • Posts: 1312
    • Lebeau Software
Re: Indy's FTP Component crashes the IDE
« Reply #11 on: January 04, 2018, 08:13:40 pm »
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.

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.
Remy Lebeau
Lebeau Software - Owner, Developer
Internet Direct (Indy) - Admin, Developer (Support forum)

Thaddy

  • Hero Member
  • *****
  • Posts: 14205
  • Probably until I exterminate Putin.
Re: Indy's FTP Component crashes the IDE
« Reply #12 on: January 04, 2018, 09:45:43 pm »
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.

I am not aware of this? It is not in FPC? Enlighten us?
Specialize a type, not a var.

balazsszekely

  • Guest
Re: Indy's FTP Component crashes the IDE
« Reply #13 on: January 04, 2018, 10:34:46 pm »
@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

  • Newbie
  • Posts: 6
Re: Indy's FTP Component crashes the IDE
« Reply #14 on: January 05, 2018, 02:08:10 pm »
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

 

TinyPortal © 2005-2018