[fpc-pascal] FPC Compiler Internal Error: 200410231 (To Whom it may Concern)

Jason P Sage jasonpsage at jegas.org
Sat Sep 16 05:53:57 CEST 2006


u01g_jcore.pp(14304,3) Fatal: Internal error 200410231
u01g_jcore.pp(14304,3) Fatal: Compilation aborted

The following Construct caused an Error I haven't seen before but the
workaround was simple enough so I'm just writing this for the record.

Offending construct:  AnsiString(JFC_DL(CPL.lpItem).Item_lpPTR):=p_sa;
//This version generates FPC Compiler Error-Internal: 200410231

Workaround: AnsiString(JFC_DLITEM(JFC_DL(CPL.lpItem).lpItem).lpPTR):=p_sa;

To Summarize - I think type casting across properties may in some cases be a
bit much for the compiler. I could be way off, all I know is that by
eliminating the properties "part" by accessing the fields directly via
typecasting and dereferenced pointers.... all is well in the world.

JFC_DLITEM is a CLASS that is nothing more than an element in a homemade
"double-linked-list" class named JFC_DL.

Item_lpPTR is a Property of JFC_DL and is of type pointer. It basically sets
the CURRENT "ITEM"'s field in JFC_DLITEM, or lets you read it.


Here is JFC_DLITEM
-------------
//==========================================================================
===
Type JFC_DLITEM = Class
  //protected
  Public
  lpPrev: pointer;// private 
  lpNext: pointer;// private
//  public
  lpPtr: pointer; // Most Basic Field
  saClassName: AnsiString;  
  Constructor create; // OVERRIDE - INHERIT - Initializes pointers as NIL
  // nil.
End;
//==========================================================================
===
-------------

Here is the Definition of the JFC_DL.Item_lpPTR Property (Which sets and
returns the lpPTR field in JFC_DLITEM)
---------
{start class declaration snippet}
 
//--------------------------------------------------------------------------
-
  // make properties work
 
//--------------------------------------------------------------------------
-
  Function read_item_lpPtr: pointer;
  Procedure write_item_lpptr(p_lp:pointer);
 
//--------------------------------------------------------------------------
-
  Property Item_lpPtr: pointer read read_item_lpPtr Write write_item_lpptr;
{end class declaration snippet}


//==========================================================================
===
Function JFC_DL.read_item_lpPtr: pointer;
//==========================================================================
===
Begin
  Result:=JFC_DLITEM(lpItem).lpPtr;
End;
//==========================================================================
===

//==========================================================================
===
Procedure JFC_DL.write_item_lpptr(p_lp:pointer);
//==========================================================================
===
Begin
  JFC_DLITEM(lpItem).lpPtr:=p_lp;
End;
//==========================================================================
===


Have a great Day.
Jason P Sage




More information about the fpc-pascal mailing list