Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1297
  • 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?
0
plumothy
Asked:
plumothy
  • 6
  • 3
  • 2
1 Solution
 
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
Industry Leaders: 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!

 
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 GruwezOracle 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
 
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 GruwezOracle 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

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

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