Delphi F2084 Internal Error: AV07953449-R26D7474C-0

Priler picture Priler · Jul 26, 2013 · Viewed 7.7k times · Source


In my project, i'm trying to connect one more UNIT, named Lang_Unit.pas with some classes and procedures, but, while compiling the Project, Delphi gives unknown error called "[dcc32 Fatal Error] Lang_Unit.pas(5): F2084 Internal Error: AV07953449-R26D7474C-0".
And the point is that, what if i will close my project, or remove this connected UNIT, error is not getting away.
And if i will create clear default VCL Application, its still gives this error.
And only when i'm restarting my Delphi 2010, error is getting away.
But, if i will try to edit something in the code, this error is comes again...
What is problem ? Everything was works fine, im not touched nothing.
I've just turned off my PC, then after some time turned it ON and opened my Project and edited my code, then i see this error...

If Its will help, here is my Lang_Unit.pas code :

unit Languages_UNIT;

interface

Uses
  System.Generics.Collections, IniFiles;

Type
TLanguages_List = Class

  private
    LangType:string;
    LangDescription:string;
    LangFile:TIniFile;

  public
  Constructor Create(LType,LDes:string; LFile:TiniFile);
  Function GetLangType:string;
  Function GetDescription:string;
  Function GetStructure:TIniFile;

End;




TLanguages_Controller = Class

  public
  Function GetStructureByType(RequestedType:string; LangList:TObjectList<TLanguages_List>):TIniFile;
  Function TypeExists(RequestedType:string; LangList:TObjectList<TLanguages_List>):Boolean;
  Procedure LoadLanguage(RequestedType:string; LangList:TObjectList<TLanguages_List>);

End;

implementation

uses Unit1;

Constructor TLanguages_List.Create(LType,LDes:string; LFile:TiniFile);
  Begin
    LangType:=LType;
    LangDescription:=LDes;
    LangFile:=LFile;
  End;

Function TLanguages_List.GetLangType:string;
  Begin
    Result:=LangType;
  End;

Function TLanguages_List.GetDescription:string;
  Begin
    Result:=LangDescription;
  End;

Function TLanguages_List.GetStructure:TIniFile;
  Begin
    Result:=LangFile;
  End;







Function TLanguages_Controller.GetStructureByType(RequestedType:string; LangList:TObjectList<TLanguages_List>):TIniFile;
var
i:integer;
  Begin
    For i := 0 to LangList.Count-1 Do
      Begin
        IF(LangList[i].GetLangType=RequestedType) Then
          Begin
            Result:=LangList[i].GetStructure;
            Break;
          End;
      End;
  End;


Function TLanguages_Controller.TypeExists(RequestedType:string; LangList:TObjectList<TLanguages_List>):Boolean;
var
i:integer;
GOTYA:Boolean;
  Begin
    GOTYA:=False;
    For i := 0 to LangList.Count-1 Do
      Begin
        IF(LangList[i].GetLangType=RequestedType) Then
          Begin
            GOTYA:=True;
            Break;
          End;
      End;
      IF(GOTYA) Then
        Result:=True
      Else
        Result:=False;
  End;


Procedure TLanguages_Controller.LoadLanguage(RequestedType:string; LangList:TObjectList<TLanguages_List>);
var
i:integer;
SLS:TIniFile;//SELECTED LANGUAGE STRUCTURE
CS:string;//CURRENT SECTION
  Begin
    //GET SELECTED LANGUAGE STRUCTURE
    For i := 0 to LangList.Count-1 Do
      Begin
        IF(LangList[i].GetLangType=RequestedType) Then
          Begin
            SLS:=LangList[i].GetStructure;
            Break;
          End;
      End;

      //START LOADING SELECTED LANGUAGE
        //TABS SECTION LOAD
        CS:='TABS';
        SD_DEFNAME:=SLS.ReadString(CS,'Speed_Dials','Speed_Dials');
        Form1.goleft.Hint:=SLS.ReadString(CS,'Back','Back');
        Form1.goright.Hint:=SLS.ReadString(CS,'Forward','Forward');
        REFLESHBTN_TEXT:=SLS.ReadString(CS,'Reflesh','Reflesh');
        STOPBTN_TEXT:=SLS.ReadString(CS,'Stop','Stop');

        //PAGE_POPUP SECTION LOAD
        CS:='PAGE_POPUP';
        Form1.ChromiumPopup.Items[0].Caption:=SLS.ReadString(CS,'Forward','Forward');
        Form1.ChromiumPopup.Items[1].Caption:=SLS.ReadString(CS,'Back','Back');
        Form1.ChromiumPopup.Items[2].Caption:=SLS.ReadString(CS,'Reflesh','Reflesh');

        Form1.ChromiumPopup.Items[3].Caption:=SLS.ReadString(CS,'Copy_Link','Copy Link');
        Form1.ChromiumPopup.Items[4].Caption:=SLS.ReadString(CS,'Save','Save');
        Form1.ChromiumPopup.Items[5].Caption:=SLS.ReadString(CS,'Print','Print');
        Form1.ChromiumPopup.Items[6].Caption:=SLS.ReadString(CS,'view_source','View Source');
        Form1.ChromiumPopup.Items[7].Caption:=SLS.ReadString(CS,'code_debug','Code Debug');

  End;


end.

Answer

Johan picture Johan · Apr 25, 2014

Internal error means that the compiler itself is in a 'confused' state.
The way to get out of this is to:

Save your code in a safe location for later reference.
Restart Delphi
Revert the source code to the last known good state by undoing your last edits, or by loading a temp save file.

You can find the previous files in the _backup folder.

backup files

Make sure to set file type to any file.

In order to have Delphi generate a save file upon compilation you need to enable autosave

enable autosave

It's a good idea to have Delphi keep more than the default 10 saves. I like to set it to the max: 90.

enter image description here

Just keep restarting Delphi, and compile a previous version, until the internal error goes away.
Then you just recreate the code in a slightly different manner. (You did save the original code right?)