3

I have a DPK project which sometimes shows errors ("out of memory") while compiling (into Delphi IDE), and sometime it compiles with success. But, when I try compile it through the MSBUILD, it always throws this error message:

error F2084: Internal Error: AV004A784A-WFFFD3764-1

Someone have an idea to solve it?

3 Answers 3

3

An internal error like that is a compiler error. We cannot solve them, only the compiler developer can do so. You need to submit a bug report to Embarcadero. Given the antiquity of XE3 you are unlikely to ever receive a fix.

Modern versions of Delphi are less prone to out of memory failures so if upgrading is an option then doing so will likely side-step the problem.

If upgrading is not an option then you are probably going to have to keep muddling along and cursing every time you encounter one of these errors.

Sign up to request clarification or add additional context in comments.

Comments

2

This is actual very common (at least i experienced these kind of errors very often). I did go with the approach to remove source code files step by step from the DPK until compiling works. This way you also see which file is causing these errors, then go ahead and outcomment source code parts in this file step by step until you find the offending line, then rewrite it (in what way you need to find out yourself).

Comments

2

As David Heffernan already said, there is no way you can really solve it, because the error is internal to the compiler or linker, and only the developers of these can remove that bug.

But often, there are some workarounds.

In my experience, such internal errors are often related to generics and anonymous methods, or to inlined code, especially if two or all of these are combined.

So find out what code change you made before the internal error occurred. If you use a versioning system, or Delphi's internal _history system, restore to a previous version until the error goes away. Then you can do a difference with your "offending" code and see which code caused the internal error.

Often, too complex expressions (especially for the types I mentioned above) cause internal errors. If that is the case, try to simplify the expressions by calculating subexpressions first. Also, instead of using ad-hoc generic declarations like

x := TList<SomeType<Integer>>.Create;

you should try to use pre-defined types:

type
  SomeTypeInteger = SomeType<Integer>;
  SometypeList = TList<SomeTypeInteger>;

  ...

  x := SometypeList.Create;

In other words,

  • try to find the "offending" code by going back in your history until it goes away
  • once you have found it, try to simplify that piece of code. Disentangle expressions and predefine types
  • experiment with different ways to express the code until the error goes away

If you do that, you may be successful in avoiding the internal error. It has often taken me some time, but I have always found a way to achieve what I wanted. If you couldn't, ask about specific errors here (by posting the offending code, the exact error and if possible a Minimal, Complete, and Verifiable example).

Fortunately, these errors have become very rare in the newest compilers.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.