Recent

Author Topic: [Solved] Help with SIGSEGV Error  (Read 3724 times)

magleft

  • Full Member
  • ***
  • Posts: 108
[Solved] Help with SIGSEGV Error
« on: October 23, 2018, 08:46:35 pm »
In my project when compile project with Lazarus for 63 bit all is ok. When i try to compile with Lazarus 32 Bit the application stopped and display the SIGSEGV Error. what am I doing wrong?
« Last Edit: October 28, 2018, 03:27:48 pm by magleft »
windows 10 64

howardpc

  • Hero Member
  • *****
  • Posts: 4144
Re: Help with SIGSEGV Error
« Reply #1 on: October 23, 2018, 09:00:59 pm »
Without the code that produces the access violation it is not possible to do more than guess.

440bx

  • Hero Member
  • *****
  • Posts: 3944
Re: Help with SIGSEGV Error
« Reply #2 on: October 23, 2018, 09:02:41 pm »
Without the code that produces the access violation it is not possible to do more than guess.
I completely agree with that.  My guess at this time is that the SIGDEV is caused by his using 63 bits instead of 64. ;)
(FPC v3.0.4 and Lazarus 1.8.2) or (FPC v3.2.2 and Lazarus v3.2) on Windows 7 SP1 64bit.

jamie

  • Hero Member
  • *****
  • Posts: 6090
Re: Help with SIGSEGV Error
« Reply #3 on: October 24, 2018, 01:08:18 am »
Its always that 1 bit that holds the rest of the bits up!

 >:(
The only true wisdom is knowing you know nothing

magleft

  • Full Member
  • ***
  • Posts: 108
Re: Help with SIGSEGV Error
« Reply #4 on: October 24, 2018, 07:17:01 am »
The code is :

procedure TFSamples.KatDtDataMasterDataChange(Sender: TObject; Field: TField);
begin
     QDataDet.close ;
     QDataDet.sql.text:='Select * from salesDetail where idpelati=113';
     try
        QDataDet.Open ;
     Except
     On Exception Do
        Showmessage('Error');
     end;
end;

The Error displayed when i tried to open the QDatadet Query with Lazarus 32 Bit. On Lazarus 64Bit all is ok.
« Last Edit: October 24, 2018, 07:18:58 am by magleft »
windows 10 64

jamie

  • Hero Member
  • *****
  • Posts: 6090
Re: Help with SIGSEGV Error
« Reply #5 on: October 24, 2018, 03:22:32 pm »
A lot of things have changed and been corrected since 1.2.6 Laz and 2.6.4

Have you tried to install the most recent release and then compile that code for 32 bit target?
The only true wisdom is knowing you know nothing

magleft

  • Full Member
  • ***
  • Posts: 108
Re: Help with SIGSEGV Error
« Reply #6 on: October 25, 2018, 09:33:17 am »
i 've update the lazatus but the problem excisting.
windows 10 64

Thaddy

  • Hero Member
  • *****
  • Posts: 14200
  • Probably until I exterminate Putin.
Re: Help with SIGSEGV Error
« Reply #7 on: October 25, 2018, 11:14:58 am »
Quote
Code: Pascal  [Select][+][-]
  1.      Except
  2.      On Exception Do
  3.         Showmessage('Error');
  4.      end;

Can you replace that by:

Code: Pascal  [Select][+][-]
  1.      Except
  2.      On E:Exception Do
  3.         Showmessage(E.Message);
  4.      end;
Because then you have a high probability to know what the exception actually is.....

« Last Edit: October 25, 2018, 11:17:56 am by Thaddy »
Specialize a type, not a var.

nouzi

  • Sr. Member
  • ****
  • Posts: 296
Re: Help with SIGSEGV Error
« Reply #8 on: October 25, 2018, 11:42:35 am »
Code: Pascal  [Select][+][-]
  1. procedure TFSamples.KatDtDataMasterDataChange(Sender: TObject; Field: TField);
  2. begin
  3.      QDataDet.close ;
  4.      QDataDet.sql.text:='Select * from salesDetail where idpelati=113'; // edit this line try this 'selec * from salesDetail ' only
  5.      try
  6.         QDataDet.Open ;
  7.      Except
  8.      On Exception Do
  9.         Showmessage('Error');
  10.      end;
  11. end;
  12.  
« Last Edit: October 25, 2018, 11:58:54 am by nouzi »
My English is  bad
Lazarus last version free pascal last version
Lazarus trunk  free pascal trunk 
System : Linux mint  64bit  Windows 7 64bit

Thaddy

  • Hero Member
  • *****
  • Posts: 14200
  • Probably until I exterminate Putin.
Re: Help with SIGSEGV Error
« Reply #9 on: October 25, 2018, 12:16:57 pm »
First change your code to:
Code: Pascal  [Select][+][-]
  1. procedure TFSamples.KatDtDataMasterDataChange(Sender: TObject; Field: TField);
  2. begin
  3.      QDataDet.close ;
  4.      QDataDet.sql.text:='Select * from salesDetail where idpelati=113'; // edit this line try this 'selec * from salesDetail ' only
  5.      try
  6.         QDataDet.Open ;
  7.      Except
  8.      On E:Exception Do
  9.         Showmessage(E.message);
  10.      end;
  11. end;
Then we know the error that you just call "error".
« Last Edit: October 25, 2018, 12:39:18 pm by Thaddy »
Specialize a type, not a var.

magleft

  • Full Member
  • ***
  • Posts: 108
Re: Help with SIGSEGV Error
« Reply #10 on: October 27, 2018, 07:11:53 am »
i replace the code with this :

  QDataDet.close ;
  QDataDet.sql.text:='Select * from salesDetail';// where idpelati='+inttostr(QDataMaster.FieldByName('id_SalesMaster').AsInteger)  ;
  try
      QDataDet.Open ;
   Except
   On E:Exception Do
      Showmessage(E.message);
   end;

But the problem excisting when i try to compile  with lazarus 32 bit
windows 10 64

jamie

  • Hero Member
  • *****
  • Posts: 6090
Re: Help with SIGSEGV Error
« Reply #11 on: October 27, 2018, 03:46:26 pm »
is it possible you don't have the correct DLL installed for the SQL or an outdated one for 32 bit mode?


The only true wisdom is knowing you know nothing

magleft

  • Full Member
  • ***
  • Posts: 108
Re: [Solved] Help with SIGSEGV Error
« Reply #12 on: October 28, 2018, 03:29:27 pm »
The problem was  in table. When recreated the table all it' s ok.
windows 10 64

 

TinyPortal © 2005-2018