Reputation: 12898
Do anybody know what this error means?
It comes and goes in one of my units. Adding a space or a lineshift will sometime solve it, sometime not...
I'm using Delphi 2007.
Upvotes: 5
Views: 8068
Reputation: 49739
Here is a Delphi internal error guide that will perhaps help you. Internal error often can be resolved by deleting DCU files, restarting the IDE or not using a tool that speeds up Delphi start (like DelphiSpeedUp).
But in most cases, this is some weird bug in the Delphi compiler and if you know to work around it and this won't be to costy, do this and be happy. I once had the console version dcc32 crashing (IDE compiled fine) when I increased a variable with Inc and using addition instead of Inc solved the problem...
Upvotes: 12
Reputation: 13421
I had another case today (D2010), everything perfectly legal syntax since good ol' Turbo Pascal days:
type
TValueRec = record
selector : (int,str,unk);
intVal : Integer;
strVal : WideString;
unkVal : IUnknown;
end;
Using this record in a method of a generics-based class brought me an "F2084 internal error: AV0661CFEF-R0000000C-0" somewhere in the middle of another unit.
Changing it this way did the trick for me:
type
TValueRecSelector = (int,str,unk);
TValueRec = record
selector : TValueRecSelector;
intVal : Integer;
strVal : WideString;
unkVal : IUnknown;
end;
However, very annoying that such things produce such errors at completely unrelated places in the code.
Upvotes: 2
Reputation: 740
One simple way to get an internal error is to use cut&paste to create a new routine. I moved all code within an IF block to a new procedure and got internal error T2335 at the End of the new proc (in Delphi 7).
The error was caused by the line "If (Something) then Break;". The problem was, this code was no longer within a loop, so there was nothing to break from. Changing 'Break' to 'Exit' fixed the problem.
So look for Break and Continue statements.
Upvotes: 4
Reputation: 21
I've had this problem too, and i've tested many solutions, but non of them helped me. then i've found this cause of error: in error occurring function, i had an Inc() func that was trying to inc a String Variable!! so i've fixed that bug and everything turned to normal :)
Upvotes: 2
Reputation: 11
I got this error in one instance:
procedure TDMData.SetValue(AValue: Word);
var
prevValue: Word;
method: TMethod;
begin
if FValue = AValue then
Exit;
prevValue := FValue;
FValue := AValue;
for method in FValueChangeEvent.Notifications do
TDMDataValueChangeNotification(method)(Self, AValue, prevValue);
end; // <--- Fatal: F2084 Internal Error: T2575
Both the GetNotifications Notifications property and the GetEnumerator method of the record returned by GetNotifications had an inline directive. Only by removing the inline from GetEnumerator the problem went away.
Note: similar functions were not causing this internal error!
Upvotes: 1
Reputation: 38723
All internal errors are things that shouldn't have happened, but did. Check QC and if it isn't there report it. If you can provide a way to reproduce it that will make it more likely they can fix it.
Usually for internal erros I do a full build or restart Delphi.
Upvotes: 2
Reputation: 84650
Best thing to do is report this to CodeGear. It really helps if you can find a way to consistently cause the bug on purpose, so they can track it down more easily.
Upvotes: 5