Recent

Author Topic: Remove From Project Dialogue: BUG  (Read 4052 times)

bangfauzan

  • New Member
  • *
  • Posts: 22
Remove From Project Dialogue: BUG
« on: May 02, 2015, 01:40:06 am »
I can't remove multiple units using "Remove From Project Dialogue", it just remove one unit at once, not all selected unit.

This should be a bug.

Regards.

Leledumbo

  • Hero Member
  • *****
  • Posts: 8757
  • Programming + Glam Metal + Tae Kwon Do = Me
Re: Remove From Project Dialogue: BUG
« Reply #1 on: May 02, 2015, 05:27:56 am »
Not reproducible in trunk

JuhaManninen

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 4467
  • I like bugs.
Re: Remove From Project Dialogue: BUG
« Reply #2 on: May 02, 2015, 09:32:18 am »
It works here, too.
Maybe you installed 1.4 on top of 1.2 and the installation is corrupted. That could explain also the Access Violation in DBEdit you reported.
You should do a clean install.
Mostly Lazarus trunk and FPC 3.2 on Manjaro Linux 64-bit.

bangfauzan

  • New Member
  • *
  • Posts: 22
Re: Remove From Project Dialogue: BUG
« Reply #3 on: May 02, 2015, 11:53:30 am »
It (not remove all selected unit) happen either on 1.2, 1.4 and 1.5 (trunk). I do clean and fresh install.
My platform ubuntu 15.04 64 bit, fpc 2.6.5 / 3.0/ 3.1 (trunk).

About Access violation, you can try to drop tsqlquery on the form, then drop datasourse, assign dataset to such sqlquery. then drop dbedit (or any other dbaware) and fill datasource and assign datafield. Error occurs here.

Leledumbo

  • Hero Member
  • *****
  • Posts: 8757
  • Programming + Glam Metal + Tae Kwon Do = Me
Re: Remove From Project Dialogue: BUG
« Reply #4 on: May 02, 2015, 01:20:35 pm »
It (not remove all selected unit) happen either on 1.2, 1.4 and 1.5 (trunk). I do clean and fresh install.
My platform ubuntu 15.04 64 bit, fpc 2.6.5 / 3.0/ 3.1 (trunk).
Doesn't happen here. Manjaro Linux 64-bit, lazarus trunk qt interface, fpc trunk. Try to convince us with something reproducible.
About Access violation, you can try to drop tsqlquery on the form, then drop datasourse, assign dataset to such sqlquery. then drop dbedit (or any other dbaware) and fill datasource and assign datafield. Error occurs here.
  • Doesn't happen here, I can perfectly connect to my local MySQL (after dropping TSQLTransaction and set it everywhere required) and displays whatever value I choose from my query result
  • SQLdb ALWAYS requires transaction, please read SQLdb tutorial and reference in the wiki
  • Even without transaction, setting TSQLQuery.Active to true in object inspector will result in "transaction not set" but that's it, no other errors, no crash whatsoever
« Last Edit: May 02, 2015, 01:24:25 pm by Leledumbo »

JuhaManninen

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 4467
  • I like bugs.
Re: Remove From Project Dialogue: BUG
« Reply #5 on: May 02, 2015, 01:43:28 pm »
It (not remove all selected unit) happen either on 1.2, 1.4 and 1.5 (trunk). I do clean and fresh install.
My platform ubuntu 15.04 64 bit, fpc 2.6.5 / 3.0/ 3.1 (trunk).

I remember there was such a bug a long time ago. Maybe it was in 1.2.x, too, I am not sure.
This smells very much like you are running an old binary for whatever reason.

Quote
About Access violation, you can try to drop tsqlquery on the form, then drop datasourse, assign dataset to such sqlquery. then drop dbedit (or any other dbaware) and fill datasource and assign datafield. Error occurs here.

I can safely say that Lazarus 1.4 does not have such a fundamental bug.
The DB components are used by many people, they would have noticed it during the RC period. Nobody else has reported it.
Mostly Lazarus trunk and FPC 3.2 on Manjaro Linux 64-bit.

Leledumbo

  • Hero Member
  • *****
  • Posts: 8757
  • Programming + Glam Metal + Tae Kwon Do = Me
Re: Remove From Project Dialogue: BUG
« Reply #6 on: May 02, 2015, 07:27:43 pm »
This smells very much like you are running an old binary for whatever reason.
Agreed, maybe he should try checking the about dialog first.

bangfauzan

  • New Member
  • *
  • Posts: 22
Re: Remove From Project Dialogue: BUG
« Reply #7 on: May 03, 2015, 02:55:37 am »
Quote
Doesn't happen here. Manjaro Linux 64-bit, lazarus trunk qt interface, fpc trunk. Try to convince us with something reproducible.

I'm not sure, but it happened here for many years. I installed OS and Lazarus-FPC for many many times, and it always happened consistently.
To start new project, I copied from another stable project, add something and also remove any unneeded units.
I do Remove from Project and select any unused units. no error message here. but if I do it (Remove from Project) again these units still remain. only one unit (the last selected) removed, but other selected unit not removed. I face this issue since the first time I use Lazarus, and remain until now.

Quote
  • Doesn't happen here, I can perfectly connect to my local MySQL (after dropping TSQLTransaction and set it everywhere required) and displays whatever value I choose from my query result
  • SQLdb ALWAYS requires transaction, please read SQLdb tutorial and reference in the wiki
  • Even without transaction, setting TSQLQuery.Active to true in object inspector will result in "transaction not set" but that's it, no other errors, no crash whatsoever

I see, but it's not about connecting and/or fetching data from database, I do connection and getting data at run time, even database (some times) also created at run time (and everything ok). It's about setting property (especially DataField) at desing time, and it only occurs on 1.4 and trunk (with different message), It not happen on 1.2.
And thanks to Lazarus-FPC teams, I got millions of something from commercial database projects using FPC-Lazarus (SQLDB as data connection).

Try this:
1. put SQLQuery1, leave Database and SQL blank.
2. Datasource1, set Dataset=SQLQuery1
3. DBEdit1, set DataSource=DataSource1, Fill or select DataField on ObjectInspector ==> AccessViolatio (1.4) or "Unable to retrieve fields definition from dataset" (trunk). This sould not prompt these message, very disturbing, becouse we can fill it using directinput, so list of fields should be as reference, not constraint. so ignore whatever user fill if some requirement not set. Dont we can assign thus all required property at run time?

The annoying message not showing only if :
- put dbconnection and set all required (databasename, host, user, password etc)
- put sqltransaction and set database to dataconnection
- put sqlquery, set database to dataconnection AND FILL SQL STATEMENT (if sql blank the message still arise).
- put datasource, set dataset to sqlquery
- DBEdit1, set DataSource=DataSource1, Fill or select DataField. everything ok
(About SQL statement, if we fill first, and do until the last step (setting Datafield succesfully) and then remove sql statement on sqlquery, error message dissappears. strange behavior.)

OR (message not show)
Fill list of fields of dataset using Edit Fields... (right click sqlquery /doubleclick), then create new field (or press Ins on keyboard)

Conclusion:
This message not happen only when we set all required component/property, or we create list of fields manually.
Why....? One more time, don't we can fill all of thats at run time? I think this not reasonable behavior.

For now, I am overriding TDataFieldProperty editor using my CustomeDataFieldProperty editor.
Please fallback this behavior like on 1.2.

Regards.

bill0287

  • Full Member
  • ***
  • Posts: 146
Re: Remove From Project Dialogue: BUG
« Reply #8 on: May 03, 2015, 04:28:39 pm »
I can safely say that Lazarus 1.4 does not have such a fundamental bug.
The DB components are used by many people, they would have noticed it during the RC period. Nobody else has reported it.

Whether this turns out to be a bug or not, I would take care in making such a statement. I found what appears to be a bug in DB components that apparently was not found in the RC cycle - or at least it was not reported. So just because no one reported it does not mean it is not there.

http://forum.lazarus.freepascal.org/index.php/topic,28144.0.html

« Last Edit: May 03, 2015, 04:43:37 pm by bill0287 »

Leledumbo

  • Hero Member
  • *****
  • Posts: 8757
  • Programming + Glam Metal + Tae Kwon Do = Me
Re: Remove From Project Dialogue: BUG
« Reply #9 on: May 04, 2015, 07:38:10 am »
I'm not sure, but it happened here for many years. I installed OS and Lazarus-FPC for many many times, and it always happened consistently.
To start new project, I copied from another stable project, add something and also remove any unneeded units.
I do Remove from Project and select any unused units. no error message here. but if I do it (Remove from Project) again these units still remain. only one unit (the last selected) removed, but other selected unit not removed. I face this issue since the first time I use Lazarus, and remain until now.
Try creating a screencast and upload to youtube or wherever easily accessible.
I see, but it's not about connecting and/or fetching data from database, I do connection and getting data at run time, even database (some times) also created at run time (and everything ok). It's about setting property (especially DataField) at desing time, and it only occurs on 1.4 and trunk (with different message), It not happen on 1.2.
It is not, I did all what I said at design time.
Try this:
1. put SQLQuery1, leave Database and SQL blank.
2. Datasource1, set Dataset=SQLQuery1
3. DBEdit1, set DataSource=DataSource1, Fill or select DataField on ObjectInspector ==> AccessViolatio (1.4) or "Unable to retrieve fields definition from dataset" (trunk).
No access violation, only "Unable to retrieve fields definition from dataset", and that's expected.
This sould not prompt these message, very disturbing, becouse we can fill it using directinput, so list of fields should be as reference, not constraint. so ignore whatever user fill if some requirement not set. Dont we can assign thus all required property at run time?

The annoying message not showing only if :
- put dbconnection and set all required (databasename, host, user, password etc)
- put sqltransaction and set database to dataconnection
- put sqlquery, set database to dataconnection AND FILL SQL STATEMENT (if sql blank the message still arise).
- put datasource, set dataset to sqlquery
- DBEdit1, set DataSource=DataSource1, Fill or select DataField. everything ok
(About SQL statement, if we fill first, and do until the last step (setting Datafield succesfully) and then remove sql statement on sqlquery, error message dissappears. strange behavior.)
OR (message not show)
Fill list of fields of dataset using Edit Fields... (right click sqlquery /doubleclick), then create new field (or press Ins on keyboard)

Conclusion:
This message not happen only when we set all required component/property, or we create list of fields manually.
Why....? One more time, don't we can fill all of thats at run time? I think this not reasonable behavior.
Why not? If it's designed that way, you can't call it a bug. SQLdb implements RAD feature, so you can manipulate data at design time, too. It's a design decision, not bug. Feel free to use another library (ZEOS?) that implements the style you want. You can fill the properties at either time, design or run is not a problem, both should be OK. But doing it at design time should do what it should do at runtime, too.

bangfauzan

  • New Member
  • *
  • Posts: 22
Re: Remove From Project Dialogue: BUG
« Reply #10 on: May 04, 2015, 09:51:02 am »
@Leledumbu, you don't get my point. That's why your unswer does not make sense.
« Last Edit: May 05, 2015, 04:08:00 am by bangfauzan »

 

TinyPortal © 2005-2018