Debbugingproblem? lazarus / 12-Debugger ---------------------------------------------------------------------- T-bear · 2010-11-13 15:25 Hi, When i try to run my program, it compiles the program and starts debbuging. Then after a while the errormessage "Project project1.exe raised exeption class 'External: SIGSEGV'." When i try to run the executable file this message is shown: "Access violation. Press OK to ignore and risk data corruption. Press Cancel to kill the program." Anyone who knows why this happens? ---------------------------------------------------------------------- typo · 2010-11-13 15:35 Because something in your code is causing an Acess Violation, for example accessing a character on a string which does not exist or a variable of a class which was not created. ---------------------------------------------------------------------- T-bear · 2010-11-13 15:53 OK, Everything was OK until i added this code: Code: [Select]TKosten = Class (TObject)     private       PHoltz: integer;       PKorn : integer;       PBrot : integer;       PGold : integer;     public and this: Code: [Select]var   PreisFeller: TKosten; and this to set the variables: Code: [Select]      PreisFeller.PHoltz:=3;       PreisFeller.PGold :=0;       PreisFeller.PKorn :=0;       PreisFeller.PBrot :=0; Anyone who knows whats wrong with that????! ---------------------------------------------------------------------- typo · 2010-11-13 15:56 You need to create the instance of the class TKosten before using it. And Free it after using it. ---------------------------------------------------------------------- T-bear · 2010-11-13 15:58 Instance??? ---------------------------------------------------------------------- typo · 2010-11-13 16:00 Code: [Select]PreisFeller := TKosten.Create; PreisFeller.PHoltz:=3; PreisFeller.PGold :=0; PreisFeller.PKorn :=0; PreisFeller.PBrot :=0; (...) PreisFeller.Free; ---------------------------------------------------------------------- typo · 2010-11-13 16:03 Code: [Select]procedure TForm1.FormCreate(Sender: TObject); begin   PreisFeller := TKosten.Create; end; procedure TForm1.FormClose(Sender: TObject; var CloseAction: TCloseAction); begin   PreisFeller.Free; end; ---------------------------------------------------------------------- T-bear · 2010-11-13 16:08 Thanks  Now it works!