Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Delphi XE8 and Fatal Error F2039

With XE8 update 1, Win 7 64 bit and a single component added to an otherwise empty folder I get: error: [dcc32 Fatal Error] F2039 could not create output file .\Win32\Debug\MountTest.

The test will compile and run fine the first time but XE8 has to be shut down and restarted to compile again. The component is a gauge from Mitov Software. The component vendor say's that this is a known bug with no fix. If so its a showstopper and project end'r for me. Is it really the end of the line for Delphi?

I hope some one can pull this rabbit out of a hat somehow.

This is what I have done to isolate the problem.

  1. Started with a failing application (will not compile a 2ed time)
  2. Remove all external units used
  3. Remove al references to those units
  4. Remove all references in the 'Uses' clause
  5. Comment code until it compiles

It should compile every time you hit run (no problem).Now add a blank form to the project. Don't do anything to the form just add it. Add it to your uses clause.

Its should compile every time you hit Run. Now open the blank form and simply touch it so that it needs to be recompiled.

When you run the application its back to failing when you run it a second time.

Notice that happens when you simply add a form and 'touch' it. No code needed.

This problem is not something wrong with my code - it can't be. Its a bug in the UI - must be.

like image 612
Seti Net Avatar asked Jul 29 '15 19:07

Seti Net


3 Answers

Coincidentally, I just fought with this issue yesterday testing some components I ported to XE8. The output file in my case is the project executable.

After spending several hours trying to figure out what was going on (including efforts to reconfigure my AV software, disabling it entirely, moving the project to a different location, etc.), I was able to solve the problem by disabling Castalia. If I run the IDE without Castalia, the problem does not occur. If I enable Castalia again, it starts happening again.

You can find instructions for disabling/enabling Castalia in How can I disable Castalia in XE8?

I'm removing the above content because the issue has reappeared (with Castalia disabled). Further investigation shows a couple of things:

  1. The problem seems to be related to any sort of exception being raised in the debugger (even those that are handled in the code). Clicking either Break or Continue in the debugger exception dialog works as always. However, the next attempt to compile or build the application fails with the F2039 error. Deleting the executable in Windows Explorer allows compilation and running once, and then the error recurs.

  2. Restarting the IDE fixes the issue, until the next debugger exception occurs.

  3. Neither taskkill or a batch file with del worked in either a pre- or post-build event.

  4. There is an open QC entry for it at Embarcadero which indicates that it was reported in XE7, XE7.1, and XE8, and is currently an open internal ticket. I can't find a way to add the information in the two points above to that open ticket in the new JIRA-based Quality Portal. Perhaps someone who has access and can do so will on my behalf (or at least add a link to this post).

  5. It's not linked to a specific project. The original answer (as mentioned above) was related to a test app while porting some components to XE8 from an earlier version. When the problem reappeared for me, it was in a brand new project, totally unrelated, that does not use any non-standard components.

(I previously had access to EMBT QC, and had a few open tickets. The accounts appear to have not migrated to the new QP, and I can't locate any tickets there under my account.)

like image 181
Ken White Avatar answered Nov 13 '22 10:11

Ken White


Found It. I decided to start from scratch on my development system and uncovered the problem.

I installed Windows 10 on a virgin disk

Installed XE8 update 1

Installed MITIOV Instruments for XE 8 and tested them. All working find

Installed AsyncPro - Still working

Installed the JEDI Jcl - Fails

Remove JEDI Jcl - now works

Trash JEDI completly - Everything works fine

Something in the JEDI Jcl version 3.48 is causing the problem. I can code around the JEDI components I was using without to much trouble but its a shame.

like image 21
Seti Net Avatar answered Nov 13 '22 12:11

Seti Net


How about automatically kill your "hang-up" application before build?

enter image description here

like image 1
Zam Avatar answered Nov 13 '22 10:11

Zam