[Resolved] project raised exception class 'External: SIGSEGV' lazarus / 12-Debugger ---------------------------------------------------------------------- timmalos · 2011-02-14 17:16 Hi. First i want to apologize for my english. I hope you will understand my problem. My program seems to be ok, the compilation is successfull but i have an error msg which appears at the execution of the program. You can see a screenshot of the error here : http://usb-online.fr/usb-file-867.html It seems to be a memory error, but i dont understand . This is the code of my unit labyrinthe.pas: Code: [Select]unit ulabyrinthe; {$mode objfpc}{$H+} interface uses   Classes, SysUtils, UArray,Dialogs; Const dim_X_max = 200; // Dimension X Max de la matrice       dim_Y_max = 200; // Dimension Y Max de la matrice  dim_C_max = 500; // Dimension Max du NB de noeuds  E = Chr(16);  S = Chr(17);  M = Chr(219); //(177 et 219 pas mal du tout également)  L = Chr(1);         LF=chr(10); Type t_gen = array[0..100,0..100] of integer; // Type utilisé pour le générateur t_gen_final = array[1..201,1..201] of char; // Idem Type CLabyrinthe = Class   protected     table : array[1..dim_X_max,1..dim_Y_max] of char ;     dimension_X,dimension_Y : integer ;     pos_entree,pos_sortie : cpoint ;   public     Constructor Create (aOutPout:string);      Procedure OuvrirLab(aoutpout:string); End; //Type t_array = array[1..5] of cpoint;  // Type contenant les informations de chaque noeud trouvé (0,0 contient le nombre de chemins possibles, les autres sont les coordonnées des chemins à emprunter implementation Constructor CLabyrinthe.Create(aOutPout:string); Begin       ShowMessage('variable');      If   aOutPout <> '' Then   Begin           OuvrirLab(aOutPout);           End      Else Begin          aOutPout:= 'aleatoire';          GenererLab(aOutPout,30);          OuvrirLab(aOutPout);           ShowMessage('variable');      End; End;  Procedure CLabyrinthe.OuvrirLab(aoutpout:string); var sauv_j,i,j:integer; car:char; fichier:text; begin assign(fichier,aoutpout); reset(fichier); i:=1; j:=1; sauv_j := 1; while not eof(fichier) do begin read(fichier,car);                                 ShowMessage(aoutpout);                                 if car= LF then Begin i:=i+1; If j > 1 Then sauv_j := j-1; j:=1; End Else begin table[j,i] := car; j:=j+1; Case car  Of  'D','E':  pos_entree.Create(j-1,i);  'S':  pos_sortie.Create(j-1,i); End; End; end; dimension_X:=sauv_j; dimension_Y:=i; end; End. And the code of my window: Code: [Select]unit ufenetre; interface uses   LCLIntf, SysUtils, Classes, Graphics, Controls, Forms, Dialogs, Buttons, ExtCtrls, LResources, ulabyrinthe; // Perso type   { TFFenetre }   TFFenetre = class(TForm)     procedure FormCreate(Sender: TObject);   private     { Déclarations privées }   public     { Déclarations publiques }   end; var   FFenetre: TFFenetre;   laby : CLabyrinthe; implementation {------------ Utilitaires pour gestion affichage --------------------} procedure TFFenetre.FormCreate(Sender: TObject); begin     laby.GenererLab('aleatoire',30);     laby.OuvrirLab('aleatoire'); end; initialization   {$i ufenetre.lrs} end.         Thx for your help ! ---------------------------------------------------------------------- theo · 2011-02-14 17:25 Where are you creating the CLabyrinthe? Some line like:   laby : =CLabyrinthe.Create(AString); ---------------------------------------------------------------------- timmalos · 2011-02-14 19:43 It's a lot better with this im stupid  Thx you very much !