* * *

Author Topic: Sigsegv error at 9c087  (Read 540 times)

talorigomat

  • Jr. Member
  • **
  • Posts: 82
Sigsegv error at 9c087
« on: March 16, 2017, 01:14:27 pm »
When the review button is clicked (the one under the assig button) and then the former that is displayed closed I get the sigsegv error.  If I click any of the other review buttons the error doesn't occur.  All the buttons call the same procedure to display the same format

I've tracked the error down to the following procedure:

Code: Pascal  [Select]
  1. procedure TfrmGuidance.btnSpecReviewClick(Sender: TObject);
  2. var
  3.   currAss :largeint;
  4. begin
  5.   if dmGuidance.qryReviewSpec.RecordCount <> 0 then
  6.     currAss := dmGuidance.qryReviewSpec.FieldByName('assid').AsInteger;
  7.   OpenReview(dmGuidance.dsrReviewSpec);
  8.   if dmGuidance.qryReviewSpec.RecordCount <> 0 then
  9.       dmGuidance.qryReviewSpec.Locate('assid',currAss,[]);
  10. end;

The error occurs when the statement dmGuidance.qryReviewSpec.Locate('assid',currAss,[]) is executed. 

The database is in firebird 2.5 and I'm using Lazarus 1.6.4
« Last Edit: March 23, 2017, 09:57:50 am by talorigomat »
Lazarus 1.6.4, Windows 10

talorigomat

  • Jr. Member
  • **
  • Posts: 82
Re: Sigsegv error at 9c087
« Reply #1 on: March 16, 2017, 02:00:04 pm »
If a change the procedure so that it displays a message before executing the locate statement

Code: Pascal  [Select]
  1.   .........
  2.   OpenReview(dmGuidance.dsrReviewSpec);
  3.   if dmGuidance.qryReviewSpec.RecordCount <> 0 then
  4.   begin
  5.     ShowMessage(IntToStr(CurrAss));
  6.     dmGuidance.qryReviewSpec.Locate('assid',currAss,[]);
  7.   end;
  8. .....
  9.  
   

then the error doesn't occur. %)
Lazarus 1.6.4, Windows 10

talorigomat

  • Jr. Member
  • **
  • Posts: 82
Re: Sigsegv error at 9c087
« Reply #2 on: March 16, 2017, 06:30:53 pm »
 Issuing an application.ProcessMessages command be executing the locate statement seemed to solve the problem.  I'm still interested in hearing from others as I didn't have this problem in the previous version of Lazarus.
Code: Pascal  [Select]
  1.  .........
  2.   OpenReview(dmGuidance.dsrReviewSpec);
  3.   if dmGuidance.qryReviewSpec.RecordCount <> 0 then
  4.   begin
  5.     application.ProcessMessages;
  6.     dmGuidance.qryReviewSpec.Locate('assid',currAss,[]);
  7.   end;
  8. .....
  9.  
Lazarus 1.6.4, Windows 10

 

Recent

Get Lazarus at SourceForge.net. Fast, secure and Free Open Source software downloads Open Hub project report for Lazarus