Friday, May 29, 2020

Please DO NOT use the Jedi JVCL JvCsvDataSet component. I wrote it and it's not safe.

Once upon a time I was a Jedi JVCL developer. I contributed JvCsvDataSet, to the Jedi JVCL project.

Unfortunately, I believe it has several internal design flaws and needs a total rewrite, and also may be incompatible with modern delphi Dataset field management.

I do not have time to go debug the horrible memory and pointer bugs that are lurking deep inside it, but I believe the component should be deprecated.

I wrote some of this code, some of it is based on very old code from a book written in 1998, and it's also been altered, both by me, and by other people, over its long history.   I think it should be moved into a legacy folder and removed from a future JVCL version if no longer maintained.

Like I am saying above, and I'm saying again, I don't have time to fix it, and I believe it's broken in Delphi 10.0, 10.1, 10.2, 10.3, and 10.4.

If it's being used in a little utility program fine, but if you're building your app around this component, please rethink that.  Please rip it out and use FireDac TFDMemData and write some other CSV import and export functions.

Thanks.

7 comments:

  1. As comma separated values - how bad can it actually be? You have me curious - might be worth downloading just to see!

    ReplyDelete
    Replies
    1. It's fine to use in demo code, and utilities that don't matter if they trash your heap.

      It's not fine to use in your 2 million line codebase that your whole company is built on top of.

      Delete
  2. Note that I am not saying not to use other things in JVCL. The JVCL is good and is well maintained but this one component has serious bugs.

    ReplyDelete
  3. For CSV reader, try https://www.codeproject.com/Tips/783493/Delphi-CSV-File-and-String-Reader-Classes

    ReplyDelete
  4. My JvChart component is pretty cool. Try it if you want a free open source chart component for delphi. :-)

    ReplyDelete
  5. Hi Warren, how are you? I wrote you about Deleaker, a profiler for Delphi I wrote some time ago (email and linkedin). Any chances for a reply? :) Thank you in advance!

    ReplyDelete
  6. Hey man, been quite busy at work.

    ReplyDelete