Improve company productivity with a Business Account.Sign Up

  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1325
  • Last Modified:

Delphi IDE Crashes When Adding a DataModule

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?
  • 6
  • 3
  • 2
1 Solution
MerijnBSr. Software EngineerCommented:
What kind of crash? Access violation or an exception?
plumothyAuthor Commented:
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]"
MerijnBSr. Software EngineerCommented:
Can you also reproduce this if you start with a new project?
Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

plumothyAuthor Commented:
Yes - that's how I discovered it.
MerijnBSr. Software EngineerCommented:
Hmm, that makes it quite hard :(

Did you try to reinstall?
plumothyAuthor Commented:
Not yet - that's something like a 2-day job because of all the 3rd party components I need.
Geert GOracle dbaCommented:
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
he's number 12 in the overal top delphi experts at the moment
plumothyAuthor Commented:
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.

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.
Geert GOracle dbaCommented:
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 :(
plumothyAuthor Commented:
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.
plumothyAuthor Commented:
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.
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

  • 6
  • 3
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now