Recent

Author Topic: SIGSEGV when trying to execute "Application.Run"  (Read 658 times)

Weitentaaal

  • Hero Member
  • *****
  • Posts: 516
  • Weitental is a very beautiful garbage depot.
SIGSEGV when trying to execute "Application.Run"
« on: May 31, 2021, 02:53:05 pm »
Hello guys,

so today i did my daily pull to see my co workers work. Worked like always but after i tryed to Run the programm i got the Exception (See Atachement).

Its Strange because we did this already for a like a year and never had any Problems. The Form he implemented was created
(Application.CreateForm(TForm1, Form1)) and did not have any Procedures like Form.create.

Here is where i get my Error:

Code: Pascal  [Select][+][-]
  1. procedure TControl.SetWidth(Value: Integer);
  2.  
  3.   procedure CheckDesignBounds;
  4.   begin
  5.     // the user changed the width
  6.     if Value<0 then
  7.       raise EInvalidOperation.Create(
  8.         'TWinControl.SetBounds ('+DbgSName(Self)+'): Negative width '
  9.           +dbgs(Value)+' not allowed.');
  10.     if Value>=10000 then
  11.       raise EInvalidOperation.Create(
  12.         'TWinControl.SetBounds ('+DbgSName(Self)+'): Width '
  13.           +dbgs(Value)+' not allowed.');
  14.   end;
  15.  
  16. begin
  17.  
  18.   {$IFDEF CHECK_POSITION}
  19.   if CheckPosition(Self) then
  20.   DebugLn('[TControl.SetWidth] ',Name,':',ClassName,' ',dbgs(Value));
  21.   {$ENDIF}
  22.   if csLoading in ComponentState then  //<<<<<<< Error
  23.   begin
  24.     FReadBounds.Right := FReadBounds.Left+Value;
  25.     Include(FControlFlags, cfWidthLoaded);
  26.   end;
  27.   if [csDesigning, csDestroying, csLoading] * ComponentState = [csDesigning] then
  28.     CheckDesignBounds;
  29.   SetBounds(FLeft, FTop, Max(0, Value), FHeight);
  30. end;
  31.  
  32.  

Every Reply is appreciated :)

engkin

  • Hero Member
  • *****
  • Posts: 3112
Re: SIGSEGV when trying to execute "Application.Run"
« Reply #1 on: May 31, 2021, 03:13:04 pm »
Maybe a year ago you guys were using a different version of Lazarus/OS. Try the older version first and see if it works.

You did not tell us much here, like what OS, FPC, Laz.. etc? and most imporant the code this form is running.

You would work on this logically. Remove events one after the other, like OnCreate.. and see when the problem disappears, then you check the causing event procedure.

 

TinyPortal © 2005-2018