Rpi 2 - External: SIGILL lazarus / 16-Databases ---------------------------------------------------------------------- kecupak · 2015-08-19 06:56 Hello everyone, I looked everywhere to find what this error means, but I couldn't find it. So I have an application, that connects to PostgreSQL database, where it reads data, which are then shown onto a screen. I created it on windows, where everything runs smooth. My code looks like this: Code: [Select]procedure ReadData; begin   Quit:=False;   while Quit=False do   begin   Con:=True;   try     Form1.SQLQuery1.Close;     SQLCommand:='select "ABC","lastupdate" from "" order by id desc limit 1';     Insert(DBTable,SQLCommand,Pos('""',SQLCommand)+1);     Form1.SQLQuery1.SQL.Text:=SQLCommand;     Form1.PostgreSQL.Open;     except       Con:=False;     end;     if Con=True then     begin     Form1.SQLTransaction1.Active:= True;     Form1.SQLQuery1.Open;     Form1.Time.Caption:=Form1.SQLQuery1.FieldByName('lastupdate').AsSt ring;     Form1.SQLQuery1.Next;     SQLTime:=Form1.SQLQuery1.FieldByName('lastupdate').AsDateTime;     if CompareDateTime(IncSecond(SQLTime,10),IncHour(Now(),2))<0 then              begin                   Form1.Status.Caption:='Offline';                   Form1.Status.Color:=clRed;                   Form1.ABC.Caption:='---';              end     else       begin       Form1.Status.Caption:='Online';       Form1.Status.Color:=clLime;       Form1.ABC.Caption:=FloatToStrF(Form1.SQLQuery1.FieldByName('ABC' ).AsFloat,ffNumber,5,1,NumberForm);       end;       Application.ProcessMessages;       Sleep(800)      end     else     begin          Form1.Status.Caption:='Offline';                   Form1.Status.Color:=clRed;                   Form1.ABC.Caption:='---';                   Sleep(500)     end;   end;   Form1.PostgreSQL.Free;   Form1.SQLQuery1.Free; end;                    When I try to debug it lazarus raises exception: Project ABC raised exception class 'External: SIGILL', At adress 7572B608. When I look at the assembler this adress shows: mrc But once I execute it from the compiled executable, it runs correctly... And then a second problem- Imagine the LAN cable gets ripped off. On windows the try-except will handle it, however, on Rpi whole app freezes until the LAN cable isn't reconnected... Did anyone solve a problem like this one? Thank you very much ---------------------------------------------------------------------- kecupak · 2015-08-19 08:49 Ok, so I solved my second problem by creating a thread....