0

Compiling a rather large project (>750K lines) with delphi XE3 (upgrading from 2009)

Getting the following error

[dcc32 Fatal Error] MainForm.pas(3170): F2084 Internal Error: URW1147

Similar to this question, however nowhere in the code are generics used.

internal error with generic array

The error does not correspond to a line of code, but rather just the end of the file.

I.e. after the "end."

Following a google search I have also tried all settings for "Code inline control", but no joy.

Not sure where (else) to start looking and would appreciate any educated feedback (or maybe even a wild guess).

Have not yet put in a QC report pending hopefully usefully feedback from here.

Thanks

Community
  • 1
  • 1
Peter
  • 1,065
  • 6
  • 18
  • 5
    Absolutely impossible to help without code. You need to strip the code down to a small example the produces the internal error. Don't worry about keeping the code working. Just remove code until it compiles without internal error. It never has to actually run and do anything meaningful for purposes of producing test case. – David Heffernan Oct 22 '12 at 07:07
  • Thanks David, making a new project and stripping back was my next approach. Was hoping meanwhile that someone might have a lightbulb moment. – Peter Oct 22 '12 at 21:03

1 Answers1

1

Have resolved this issue by stripping back the code a section at a time as per David's suggestion above.

Solution is was follows in case this is helpful to anyone...

Turns out there was a 'left over' fragment of 'generics' code which was thought to have been removed several years ago and replaced using more traditional techniques.

There was single local variable which was not refactored, defined as follows.

var
  TestProc: TProc;

when assigned as per the following, the internal compiler error is triggered (however nowhere near the offending line of code).

TestProc := TestSuite.TestProcs[i].TestProc;

The array element TestProc above is of type procedure of object.

This compiles (and works perfectly) under 2009 which was why it wasn't picked up earlier, but gives an internal compiler error under XE3.

Correcting the local variable declaration (to procedure of object) fixes the problem.

Peter
  • 1,065
  • 6
  • 18