Solved

Delphi IDE Crashes When Adding a DataModule

Posted on 2013-12-13
11
1,233 Views
Last Modified: 2013-12-16
I have Delphi XE3 and XE4.

They have both recently started crashing whenever I try to add a new DataModule to a project or when I try to load an existing DataModule.

Researching this I have found that people sometimes blame IDE plug-ins for this problem. I have two plug-ins but have had them for a long time (TsiLang and GExperts). Just to be sure I uninstalled both of them and I still can't create a DataModule.

I have not installed any new components for quite a while.

Embarcadero have a ticket for this in XE4 and it is documented as "Fixed in XE5", which doesn't help XE3 & XE4 users!

Does anyone know why this would suddenly occur, or how to fix it?
0
Comment
Question by:plumothy
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 6
  • 3
  • 2
11 Comments
 
LVL 19

Expert Comment

by:MerijnB
ID: 39716938
What kind of crash? Access violation or an exception?
0
 

Author Comment

by:plumothy
ID: 39716997
Sometimes a "Stack Overflow" followed by Windows deciding to close Delphi.

Sometime it is straight to Windows:
"Embarcadero RAD Studio for Windows
Embarcadero RAD Studio for Windows has stopped working
A problem caused the program to stop working correctly. Windows will close the program and notify you if a solution is available.
[Close program]"
0
 
LVL 19

Expert Comment

by:MerijnB
ID: 39717008
Can you also reproduce this if you start with a new project?
0
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 

Author Comment

by:plumothy
ID: 39717126
Yes - that's how I discovered it.
0
 
LVL 19

Expert Comment

by:MerijnB
ID: 39717802
Hmm, that makes it quite hard :(

Did you try to reinstall?
0
 

Author Comment

by:plumothy
ID: 39718436
Not yet - that's something like a 2-day job because of all the 3rd party components I need.
0
 
LVL 37

Accepted Solution

by:
Geert Gruwez earned 500 total points
ID: 39720905
sometimes it 's a faulty dfm
this can be very troublesome to find

i ran into this too and it took me 2 days to find

do you have this same problem in new projects ?
> if so, check the initial directory when saving a new form
and see what's in that directory.
sometimes existing forms/datamodules from that directory are used as templates and if they are faulty they'll cause the ide to crash

if that's not the case
> list all your recently changed pas and dfms by date
> add them all to a new directory up to the time you're sure it still compiled
> compile the project and each time add the unit it asks
> it should fail again when adding the faulty pas/dfm
1: if you can open the form separately, copy paste all items using the ide to then newly created form, then copy the code
2: if you can't open the form in the ide ... you'll have to add all the components manually and then add the code

it could also help to delete the .dsk files in the project directory

install madshi's madExcept.
It allows for a debug stack when delphi crashes
> this could allow for finding the faulty unit or procedure or identifying whatever causes the crash
www.madshi.net
he's number 12 in the overal top delphi experts at the moment
0
 

Author Comment

by:plumothy
ID: 39720963
Yes, I have this problem with new projects. My initial directory for saving forms does not contain any forms or datamodules (just folders).

As for the second suggestion, I don't have any recently saved .pas or .dfm files because it is a new (ie empty) project. So there are no files to list by date. So, no .dsk files either.

I already have madExcept. For crashes where Windows decides to stop RAD Studio there is no opportunity to use it. For crashes that give a Stack Overflow first, I still cannot use it because Windows again stops RAD Studio before I get the chance to click on the Details button in the error message.


Update:
The project that I work on the most has two datamodules - I can open both of those now (when I initially reported this problem, I couldn't open them!). So, it is just creating a new datamodule, either on its own or within the scope of a project, that causes a crash.

This happens with both XE3 and XE4.
0
 
LVL 37

Expert Comment

by:Geert Gruwez
ID: 39721083
it's starting to look like your delphi has gotten corrupt
> that would indicate reinstall

or create a service request with embarcadero and see what they say

it's not nice when something like that happens :(
0
 

Author Comment

by:plumothy
ID: 39721112
Yes, I think you are right.

I have installed XE3 onto a new machine.

I may ditch the corrupt one completely as it could be quicker than trying to fix it.
0
 

Author Comment

by:plumothy
ID: 39722235
Update: XE3 on a brand new laptop was OK adding a datamodule to a new project, but it could not open the datamodules in my main project.

But, it did load them individually (ie not a part of a project). So, I edited them slightly and saved them. Now they DO open OK from within the project.

The inspiration for that came from Geert_Gruwez's suggestion, so they get the points - many thanks.
0

Featured Post

On Demand Webinar: Networking for the Cloud Era

Did you know SD-WANs can improve network connectivity? Check out this webinar to learn how an SD-WAN simplified, one-click tool can help you migrate and manage data in the cloud.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article explains how to create forms/units independent of other forms/units object names in a delphi project. Have you ever created a form for user input in a Delphi project and then had the need to have that same form in a other Delphi proj…
Introduction I have seen many questions in this Delphi topic area where queries in threads are needed or suggested. I know bumped into a similar need. This article will address some of the concepts when dealing with a multithreaded delphi database…
The viewer will learn how to use NetBeans IDE 8.0 for Windows to connect to a MySQL database. Open Services Panel: Create a new connection using New Connection Wizard: Create a test database called eetutorial: Create a new test tabel called ee…
The viewer will learn how to use and create new code templates in NetBeans IDE 8.0 for Windows.

717 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question