The Delphi Bug List

Entry No.
641
Compiler - Error during compile
resourcestring can cause Internal Error DBG2499 or DBG2439 when TD32 Debug Info is enabled
1.02 2.01 3.0 3.01 3.02 4.0 4.01 4.02 4.03 5.0 5.01 6.0 6.01 6.02 Kylix 1.0
N/AN/AAbsentAbsentAbsentUnknownUnknownUnknownExistsExistsExistsUnknownUnknownFixedFixed
Description
Reported by Keith Procter; checked by Jordan Russell
Note that once you get a DBG2499 error, it will occur in all subsequent compiles, until Delphi is restarted. The error occurs when you have a resource string after the first sub procedure, regardless if it is in another sub-procedure, or just within the body of the procedure (but you have to have a second sub-procedure). It can be boiled down to a program that doesn't use objects, so it looks like it's a sub-procedure bug. The solution is to move your ResourceString declarations to before the first sub-procedure. Following program will generate the error, restart Delphi and move the resource string to just under "procedure Foo;" to make it go away
program _;
 
procedure Foo;
 
  procedure n;
  begin
  end;
 
  resourcestring
    d='';
 
  procedure C;
  begin
  end;
 
begin
  C;
  n;
end;
 
begin
  Foo;
end.
User-contributed comments
JWB
26 Apr 2002  02:55 PM GMT
Seems to be fixed in Delphi 6.02, I've put the code in a project file, and compiling that file didn't cause any errors popping up.
Latest update of this entry: 2002-05-01

Post a comment on this bug


Index page
Delphi Bug List home page
The Delphi Bug Lists are presently maintained by Jordan Russell, who has taken over this task from Reinier Sterkenburg since August 2000.
All feedback is appreciated. See also the feedback section of the Delphi Bug List home page.