Recent

Author Topic: Internal Error 200402171  (Read 3072 times)

mark.chambers

  • New member
  • *
  • Posts: 9
Internal Error 200402171
« on: October 01, 2017, 01:52:52 pm »
Hi Guys,

I got an internal error 200402171 and Google was no help!

Windows 10
CodeTyphon 6.1
FPC 3.1.1

I found where 200402171 was being generated:

ncgrtti.pas: 657

                       
Code: Pascal  [Select][+][-]
  1. sl_subscript :
  2.    begin
  3.       if not(assigned(def) and
  4.          ((def.typ=recorddef) or
  5.          is_object(def))) then
  6.        internalerror(200402171);
  7.      inc(address,tfieldvarsym(hp^.sym).fieldoffset);
  8.      def:=tfieldvarsym(hp^.sym).vardef;
  9.    end;

It seems that the error is raised if 'def' is not an object or a record.

Can anyone give me any hints as to what code might be causing this error to trigger. It looks like something to do with a property declaration with a subscript. I have some of these in the code but they aren't doing anything particularly tricky so I don't see why they would cause a problem.

I haven't been able to duplicate the issue with a small program but I can provide the whole program if it helps. ( 3 units, ~3000 lines).

Thanks in advance,
Mark


mark.chambers

  • New member
  • *
  • Posts: 9
Re: Internal Error 200402171
« Reply #1 on: October 01, 2017, 03:56:03 pm »
Is this the right forum to ask this question?
Mark

mark.chambers

  • New member
  • *
  • Posts: 9
Re: Internal Error 200402171
« Reply #2 on: October 01, 2017, 04:04:15 pm »
OK. Found the evil line of code:

Code: Pascal  [Select][+][-]
  1. property FromX: ValReal read Line.Point1.X write SetFromX;

Line is a record, Point1 is a record, x is a ValReal.
Replacing this with a Getter stops the error.

marcov

  • Administrator
  • Hero Member
  • *
  • Posts: 11383
  • FPC developer.
Re: Internal Error 200402171
« Reply #3 on: October 01, 2017, 04:14:26 pm »
Please make a minimal program triggering the IE and submit it to the bugtracker at https//bugs.freepascal.org

bytebites

  • Hero Member
  • *****
  • Posts: 633
Re: Internal Error 200402171
« Reply #4 on: October 01, 2017, 07:14:58 pm »
Code: Pascal  [Select][+][-]
  1. published
  2.   property fromx:valreal read line.point1.x write Setfromx;

Can't reproduce with small piece of code. The property fromx needs to be in published section to get above mentioned internal error.

 

TinyPortal © 2005-2018