Recent

Author Topic: Project chios raised exception class 'External: SIGSEGV'.  (Read 3821 times)

orionyx

  • New member
  • *
  • Posts: 8
Project chios raised exception class 'External: SIGSEGV'.
« on: September 24, 2018, 11:10:25 pm »
I am trying to run Lazarus under Ubuntu 18.04 on a laptop with 8gb and a 200Mb partition on a 500Mb hard drive shared with Win7.
I am writing a database application using MySQL. The database has 11 tables, 4 of which have some data present already. I am trying to view and edit this data using a TDBEdit component with a TDBNavigator, with a TDBMySQL57Connection, a TSQLQuery, a TDataset and a TTransaction, all properly connected. The SQL statement in the TSQLQuery is "select * from Garments".
When I show the form with this stuff on it, the 23 records in Garments appear in the TDBGrid. Excellent!
If I click on the grid, or use the arrows to move the cursor on the TDBNavigator, the program gives me this error: Project chios raised exception class 'External: SIGSEGV'.
The Assembler window opens up with this in it:


0000000000790BFE 0000                     add    %al,(%rax)
DB$_$TDATASET_$__$$_CHECKACTIVE
0000000000790C00 488d6424f8               lea    -0x8(%rsp),%rsp
0000000000790C05 4889f8                   mov    %rdi,%rax
0000000000790C08 4889c7                   mov    %rax,%rdi
0000000000790C0B e8101b0000               callq  0x792720 <DB$_$TDATASET_$__$$_GETACTIVE$$BOOLEAN>
0000000000790C10 84c0                     test   %al,%al

The bold text is the line at which the error occurs.
I run the program without debugging: same thing.
I run the program outside the IDE, and instead of the error message, the forms just silently disappear leaving no trace.

I have looked up this error in this forum, and so far the most useful suggestion from 2009 is - go for .net or java. I don't like either, but I do know they work.

So, what to do?


HeavyUser

  • Sr. Member
  • ****
  • Posts: 397
Re: Project chios raised exception class 'External: SIGSEGV'.
« Reply #1 on: September 24, 2018, 11:13:55 pm »
looks like you are trying  to access an uninitialized variable.

orionyx

  • New member
  • *
  • Posts: 8
Re: Project chios raised exception class 'External: SIGSEGV'.
« Reply #2 on: September 24, 2018, 11:22:46 pm »
Thanks for the suggestion.
I've looked for that, and it's not the answer. The error line mentions a TDATASET and seems to be querying its ACTIVE flag, but the TDataset on the form does not have an Active property - it's called Enabled.
I tried initializing the Active, Enabled and Connected properties of my components to False and then setting them to True when the form starts - the problem remains.
Older answers on this forum seem to indicate that this is a sporadic problem with no definitive solution.

HeavyUser

  • Sr. Member
  • ****
  • Posts: 397
Re: Project chios raised exception class 'External: SIGSEGV'.
« Reply #3 on: September 24, 2018, 11:32:06 pm »
Active is a public property of the TDataset and all its descentants have it. If yours does not then I have to ask for the components you use.

PS
  Keep  in mind public properties are not shown in the object inspector.

orionyx

  • New member
  • *
  • Posts: 8
Re: Project chios raised exception class 'External: SIGSEGV'.
« Reply #4 on: September 25, 2018, 09:59:20 am »
Solved! I went into the MySql table definition and set an autoincrement field as the primary key. Now it works perfectly. But it took a lot of reading through lots of tangled documentation to get there.
Thanks for your interest and suggestions.

 

TinyPortal © 2005-2018