views:

260

answers:

3

Hello,

I am upgrading a project from Delphi 2009 to D2010 and came across the following Internal Error

[DCC Fatal Error] frm_Test.pas(381): F2084 Internal Error: C15700

when calling

(ILocalizable(TMyProgram.MainForm.AbilitiesForm)).Localize('c:\test.txt');

Here are the definitions:

ILocalizable = interface
  ['{4DF36053-2651-45DE-ADF7-AEC033937A02}']
  procedure Localize(const FileName: TFileName);
end;

TMyProgram is a helper class similar to the C#'s class Program. It has aproperty MainForm which points to the main form of the application. The main form itself has a property poiting to another form which is created and emedded within a panel in the main form. I am calling the Localize method of the subform.

This source has been compilable with Delphi 2005-9.

Any idea is welcome.

+2  A: 

These are bugs in the compiler/linker. You can find many references of these bugs on the internet in different Delphi versions, but they are not always the same bugs. That makes it difficult to give one solution for all those different kind of problems.

General solutions that might fix it are

  • Remove *.dcp *.dcpil *.dcu *.dcuil *.bpl *.dll
  • Rewrite your code in another way
  • Tinker with compiler options
  • Get the latest Delphi version

More information can be found here.

Lars Truijens
A: 

Remove *.dcp *.dcpil *.dcu *.dcuil *.bpl *.dll

Done. No effect.

  • Rewrite your code in another way

Done. I managed to resolve the issue by rewritting it as

var Form: TfrmAbilities; begin
Form := TMyProgram.MainForm.AbilitiesForm;
Form.Localize('c:\test.txt'); end;

  • Tinker with compiler options

Done. No effect.

  • Get the latest Delphi version

Done. It is failing on Delphi 2010. The 2005-2009 are working just fine.

Gad D Lord
+1  A: 

I've tried to create a test case with your information, but don't get an internal error. The only ICE with D2010 at C15700 that I know is QC 65594.

http://qc.embarcadero.com/wc/qcmain.aspx?d=65594

Well you've modified your code and fixed the problem for you, but it would be good if you could try to create a test case and file a QC report with it. That's the best way to make sure that it gets fixed.

Uwe Schuster
+1 for suggesting that the reproducible case should be reported in QC.
Jeroen Pluimers