Forum > Debugger

Project chios raised exception class 'External: SIGSEGV'.

(1/1)

orionyx:
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:
looks like you are trying  to access an uninitialized variable.

orionyx:
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:
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:
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.

Navigation

[0] Message Index

Go to full version