Recent

Author Topic: Major problem with CSVDataset  (Read 831 times)

wmeyer

  • New Member
  • *
  • Posts: 26
Major problem with CSVDataset
« on: January 13, 2021, 07:56:17 pm »
I am new to Lazarus, but a long time Delphi dev. I have noticed a problem with the CSVDataset component, and have minimized the steps needed to reproduce.
  • Create a new GUI application
  • Put a CSVDataset on the form.
  • Select the CSVDataset
  • In the Object Inspector, select a csv file. Mine has 5 columns, and maybe a thousand rows.
  • Now set the CSVDataset.Active to true. Wait a few seconds for it to read the file.
  • Now set the CSVDataset.Active to False.
In a few seconds, the IDE will crash. Simple and repeatable.

If I add a TDataSource and a VirtualDBGrid, and set Active in the OnFormCreate event, it works fine, reads the file, presents the data.

So the file is fine (verified in other apps, as well as by inspection in Notepad++). And as the TDataSource and the VirtualDBGrid are not needed to illustrate the problem, it is clearly a defect of the component itself.

My OS is Windows 10 64-bit. I am using Lazarus 2.0.10, installed from a fresh download just a few days ago.

Thanks!

dseligo

  • Hero Member
  • *****
  • Posts: 1196
Re: Major problem with CSVDataset
« Reply #1 on: January 13, 2021, 09:50:38 pm »
Confirmed, same OS and same Lazarus version.

You should report bug I guess.
« Last Edit: January 13, 2021, 09:52:13 pm by dseligo »

wp

  • Hero Member
  • *****
  • Posts: 11858
Re: Major problem with CSVDataset
« Reply #2 on: January 13, 2021, 10:14:29 pm »
I had reported this two years ago (https://bugs.freepascal.org/view.php?id=34435), it was fixed, and the test project that I had added is working now (same Windows, same Laz). 

I can confirm, however, that the IDE crashes when Active is set to false. Yes, please file a bug report, and refer to my report.

[EDIT]
I tested also with fpc 3.3.1 and see the issue there, too.
« Last Edit: January 13, 2021, 10:21:40 pm by wp »

wmeyer

  • New Member
  • *
  • Posts: 26
Re: Major problem with CSVDataset
« Reply #3 on: January 13, 2021, 11:12:16 pm »
Reported in 38352.  Reference to yours has already been added.

 

TinyPortal © 2005-2018