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?
plumothyAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

MerijnBSr. Software EngineerCommented:
What kind of crash? Access violation or an exception?
0
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]"
0
MerijnBSr. Software EngineerCommented:
Can you also reproduce this if you start with a new project?
0
Cloud Class® Course: Microsoft Exchange Server

The MCTS: Microsoft Exchange Server 2010 certification validates your skills in supporting the maintenance and administration of the Exchange servers in an enterprise environment. Learn everything you need to know with this course.

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

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

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
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.


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
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 :(
0
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.
0
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.
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Delphi

From novice to tech pro — start learning today.