[Solved] Project project1 raised exception class 'External: SIGSEGV'. lazarus / 31-LCL ---------------------------------------------------------------------- Avishai · 2011-04-30 10:53 I'm trying to add BiDiMode to TLabeledEdit and it works fine until I close the form.  But when I close the form, I'm getting "Project project1 raised exception class 'External: SIGSEGV'". I've added the code that follows in ExtCtrls.pp:   TLabeledEdit = class(TCustomLabeledEdit)   published     ...     property BiDiMode;     property ParentBiDiMode;     ... and in customlabelededit.inc I added code to TCustomLabeledEdit.DoPositionLabel: procedure TCustomLabeledEdit.DoPositionLabel; begin   if FEditLabel = nil then exit;   if Parent<>nil then     Parent.DisableAlign;   //DebugLn(['TCustomLabeledEdit.DoPositionLabel ']);   FEditLabel.Parent := Parent;   FEditLabel.Visible := Visible;   case FLabelPosition of     lpAbove:       begin         // Avishai's Code         if Parent.BiDiMode=bdLeftToRight then begin  <-- IT FAILS HERE           FEditLabel.Anchors:=[akLeft,akBottom];      <-- THIS IS ORIGINAL CODE           FEditLabel.AnchorParallel(akLeft,0,Self);      <-- THIS IS ORIGINAL CODE         end else begin           FEditLabel.Anchors:=[akRight,akBottom];     <-- I ADDED THIS           FEditLabel.AnchorParallel(akRight,0,Self);     <-- I ADDED THIS         end;         // End of Avishai's Code         FEditLabel.AnchorToNeighbour(akBottom,FLabelSpacing,Self);       end;     lpBelow:       begin         // Avishai's Code         if Parent.BiDiMode=bdLeftToRight then begin           FEditLabel.Anchors:=[akLeft,akTop];          <-- THIS IS ORIGINAL CODE           FEditLabel.AnchorParallel(akLeft,0,Self);      <-- THIS IS ORIGINAL CODE         end else begin           FEditLabel.Anchors:=[akRight,akTop];         <-- I ADDED THIS           FEditLabel.AnchorParallel(akRight,0,Self);     <-- I ADDED THIS         end;         // End of Avishai's Code         ...         ... ---------------------------------------------------------------------- Blaazen · 2011-04-30 18:14 Code: [Select]if Parent.BiDiMode=bdLeftToRight then begin  <-- IT FAILS HERE Then Parent is not defined (i.e. Parent=nil) ---------------------------------------------------------------------- Avishai · 2011-04-30 19:43 Thanks Blaazen.  That took care of the problem.