View Issue Details

IDProjectCategoryView StatusLast Update
0038946LazarusCompilerpublic2021-05-30 13:54
ReporterGovindraja Puthraya Assigned ToMichl  
Status resolvedResolutionfixed 
Product Version2.0.12 
Fixed in Version2.1 (SVN) 
Summary0038946: Data Module Creation
DescriptionWhen 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.
TagsNo tags attached.
Fixed in Revision65153
Attached Files


related to 0026493 resolvedJuha Manninen Adding an inherited TFrame to a project adds incorrect CreateForm to project source 



2021-05-30 07:38

developer   ~0131084

I can't reproduce any SIGSEGV here. Please add the exact steps, what you are doing.


2021-05-30 09:58

reporter   ~0131085

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.

Govindraja Puthraya

2021-05-30 10:04

reporter   ~0131086

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.


2021-05-30 11:19

developer   ~0131088

Last edited: 2021-05-30 11:49

View 3 revisions

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.


2021-05-30 12:00

developer   ~0131089

Fixed in Trunk revision 65153. Please test and close if OK.

jamie philbrook

2021-05-30 13:54

reporter   ~0131092

it works here,. Thanks.

Issue History

Date Modified Username Field Change
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