Solved

Delphi IDE Crashes When Adding a DataModule

Posted on 2013-12-13
11
1,168 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
  • 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
 

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
What Should I Do With This Threat Intelligence?

Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

 

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 36

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 36

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

Top 6 Sources for Identifying Threat Actor TTPs

Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

Join & Write a Comment

Hello everybody This Article will show you how to validate number with TEdit control, What's the TEdit control? TEdit is a standard Windows edit control on a form, it allows to user to write, read and copy/paste single line of text. Usua…
Introduction Raise your hands if you were as upset with FireMonkey as I was when I discovered that there was no TListview.  I use TListView in almost all of my applications I've written, and I was not going to compromise by resorting to TStringGrid…
The viewer will learn how to use and create keystrokes in Netbeans IDE 8.0 for Windows.
The viewer will learn how to synchronize PHP projects with a remote server in NetBeans IDE 8.0 for Windows.

707 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

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now