View Issue Details
|ID||Project||Category||View Status||Date Submitted||Last Update|
|0038946||Lazarus||Compiler||public||2021-05-30 06:54||2021-05-30 13:54|
|Reporter||Govindraja Puthraya||Assigned To||Michl|
|Fixed in Version||2.1 (SVN)|
|Summary||0038946: Data Module Creation|
|Description||When you add a data module to your project, the line of code for creating the data module is not added to the '.lpr' file. This leads to run time SIGSEV error while accessing the components from the Data Module.|
|Tags||No tags attached.|
|Fixed in Revision||65153|
||I can't reproduce any SIGSEGV here. Please add the exact steps, what you are doing.|
More precisely, a new DataModule is not added to the "Automatically Created Forms" list.
If you do that manually, it works.
It is quite unexpected (ie. the designer lets you set up component links that then don't work) and I always forget to do it until the program crashes during startup.
Delphi does this automatically, which I think is the better approach.
Assume that we are working on a project whose project source is in file 'Project1.lpr'. I have observed that whenever you add a form to the project, a corresponding line of code is added automatically to project source 'Project1.lpr' to create the form. I have also observed that when you add a data module to your project no code is added to your project source 'Project1.lpr' for creating the data module, which means that the data module and other components which are added to the data module are not available in memory and will give run time error when invoked. For eg. effort to connect your database, open your table etc. will throw run time errors.
I have faced this problem multiple times. I solved this problem by manually adding a line of code in 'Project1.lpr' for creating the data module every time.
Run time error is secondary. Issue of absence of code for creating data modules is primary. This issue will lead to a situation where people avoid using data modules completely and add database components to their forms directly.
MainMenu -> Project -> Project Options -> Forms you can add the Datamodule to the Auto-create forms.
But I think you are right, it would be better to create it per default.
It is a regression and it comes with revision 63005.
||Fixed in Trunk revision 65153. Please test and close if OK.|
||it works here,. Thanks.|
|2021-05-30 06:54||Govindraja Puthraya||New Issue|
|2021-05-30 07:38||Michl||Note Added: 0131084|
|2021-05-30 09:58||Martok||Note Added: 0131085|
|2021-05-30 10:04||Govindraja Puthraya||Note Added: 0131086|
|2021-05-30 11:19||Michl||Note Added: 0131088|
|2021-05-30 11:20||Michl||Note Edited: 0131088||View Revisions|
|2021-05-30 11:49||Michl||Assigned To||=> Michl|
|2021-05-30 11:49||Michl||Status||new => assigned|
|2021-05-30 11:49||Michl||Note Edited: 0131088||View Revisions|
|2021-05-30 11:50||Michl||Relationship added||related to 0026493|
|2021-05-30 12:00||Michl||Status||assigned => resolved|
|2021-05-30 12:00||Michl||Resolution||open => fixed|
|2021-05-30 12:00||Michl||Fixed in Version||=> 2.1 (SVN)|
|2021-05-30 12:00||Michl||Fixed in Revision||=> 65153|
|2021-05-30 12:00||Michl||LazTarget||=> -|
|2021-05-30 12:00||Michl||Note Added: 0131089|
|2021-05-30 13:54||jamie philbrook||Note Added: 0131092|