How to cre8 Internal Error C11919 (for geeks and masochists)

Giganews Newsgroups
Subject: How to cre8 Internal Error C11919 (for geeks and masochists)
Posted by:  Clay Shannon (blac…@redgreen.com)
Date: Thu, 28 Sep 2006

I made a dumb mistake and, although my app compiled fine (passed the syntax
check gauntlet unmolested), it wouldn't run because I was getting:

[Pascal Fatal Error] JCPClientDM.pas(1748): F2084 Internal Error: C11919

On closer examination of the method where the compiler barfed, I saw I had
made a dumb boo-boo:

procedure TClientDM.Popul8MisfirePrinters(var ACombox: TComboBox);
begin
  cdsGenericQuery.Active := False;
  cdsGenericQuery.CommandText :=
    'SELECT PRINTER_NAME, PRINTER_ID '+
    'FROM PRINTERS_LU '+
    'ORDER BY PRINTER_NAME ';
  cdsGenericQuery.Open;
  while not Pred(cdsGenericQuery.Eof) do begin
    ACombox.Items.AddObject(cdsGenericQuery.Fields[0].AsString,
                            TObject(cdsGenericQuery.Fields[1].AsInteger));
    cdsGenericQuery.Next;
  end;
end;

Once I removed the Pred() -- something I always do with code like "for i :=
0 to Pred(Items.Count) do begin", the C11919 monster went away and I went on
my merry way.

--
Download my historical nonfiction and/or satirical (etc.) fiction books free
from here:
http://www.lulu.com/blackbirdcraven

Replies