Monday, July 27, 2009

Delphi 2007: Internal Error URW5517

I encounter the following error while trying to compile my application in Delphi 2007 (11.0.2902.10471):

F2084 Internal Error: URW5517

After a thorough testing, I found out it should be a Delphi compiler error in the version of Delphi 2007.

To replay the problem, create a new console project in Delphi 2007 and add the following unit into project:

unit Test_URW5517;



procedure Test(const aObject: TObject);
var E: procedure(const aObject: TObject = nil);



Then compile the project by pressing Ctrl-F9 for few times and you will encounter the error eventually.  If you build the project (Shift-F9) instead of compile, no error will be prompted.

In above unit, the Test procedure has a procedural variable E with the following declaration:

var E: procedure(const aObject: TObject = nil);

The procedure has a default parameter aObject.  This is the cause of the URW5517 internal error.

To avoid the internal error, try not to use default parameter in procedural variable declaration:

var E: procedure(const aObject: TObject);

This problem should have reported in Quality Central (QC#58068: Internal error in procedural type declaration with default parameter).  However, the resolution was “can’t reproduce” or it resolve in Delphi 2009.  There is no patch for Delphi 2007 to resolve this problem.


Mauricio said...

Hi my friend. Codegear abandoned Delphi 2007. I have serious problems with Delphi 2007 (specially in .Net). I talk about the problems with a person inside ... and the answer is "We do not go further to support Delphi 2007. Move to Delphi 2009/Prism" . That is, take your money invested in the Delphi 2007 and throw in trash

Chau Chee Yang said...

The gear is moving forward. I always have confident with CodeGear team.

Anonymous said...

Good post and this enter helped me alot in my college assignement. Gratefulness you for your information.

Unknown said...

I'm from Russia, Novosibirsk.
Your post was useful for me.

Anonymous said...

you forgeth to finnaly freelibrary

Anonymous said...

You forget this


and ;

Anonymous said...

THANKS ! you save me with this post !