Recent

Author Topic: Funny compiler bug?  (Read 2344 times)

Dibo

  • Hero Member
  • *****
  • Posts: 1046
Funny compiler bug?
« on: September 23, 2012, 07:33:32 pm »
Hi,

I have this code in paint method:
Code: Text  [Select]
  1.   fiLight := TFillBorderRoundRectInfo.Create(
  2.     r.Left, r.Top, r.Right-1, r.Bottom-1, 2, 2, 2,[]);
  3.  
  4.   if fiLight.InnerBorder <> nil then
  5.   begin
  6.     b.RoundRectAntialias(
  7.       fiLight.InnerBorder.TopLeft.x,
  8.       fiLight.InnerBorder.TopLeft.y,
  9.       fiLight.InnerBorder.BottomRight.x,
  10.       fiLight.InnerBorder.BottomRight.y,
  11.       fiLight.InnerBorder.RadiusX,
  12.       fiLight.InnerBorder.RadiusY,
  13.       FBorderLight, 1);
  14.   end;
  15.  
  16.   fiLight.Free;
  17.  

I get this error:
Quote
Project project1 raised exception class 'External: SIGSEGV'.

 In file 'chpdrawer.pas' at line 101:
fiLight.InnerBorder.BottomRight.x,
But if I only declare some variable of single type in paint method:
Code: Pascal  [Select]
  1. var
  2.     fiLight: TFillBorderRoundRectInfo;
  3.     x: Single;
  4.  
Then everything works fine :D
Maybe FPC 2.7.1 from svn in codetyphon is a reason of this bug.

Regards

circular

  • Hero Member
  • *****
  • Posts: 3082
    • Personal webpage
Re: Funny compiler bug?
« Reply #1 on: September 24, 2012, 04:52:28 pm »
Strange. I would also say it's a compile issue.
Conscience is the debugger of the mind