Program exits with signal 11 (SIGSEGV).
Matthew Jew
mjew at icnc.com
Mon Jul 21 15:43:37 CDT 2003
Ruslan,
On Monday, July 21, 2003, at 03:31 PM, Ruslan Zasukhin wrote:
> on 7/22/03 1:25, Matthew Jew at mjew at icnc.com wrote:
>
> Hi Mathew,
>
>> Ruslan,
>>
>> Signal 11 (SIGSEGV) is a segment violation (or so the pages I read
>> say).
>>
>> SIGSEGV can have two reasons I think
>>
>> SEGV_MAPERR address not mapped to object
>> SEGV_ACCERR invalid permissions for mapped object
>>
>> I got the debugger working (using Totte's suggestion about copying the
>> framework)
>> and the SIGSEGV actually occurs within the method at this point
>>
>> delete _databaseDefinition;
>>
>> The full method is
>> - (void)dealloc
>> {
>> [self close];
>> delete _databaseDefinition; // <-- SIGSEGV occurs here
>>
>> [super dealloc];
>> }
>
> What is _databaseDefinition
> -- is it your class ?
>
>
It is from the Cocoa Demo (I just copied over the demo files)
and modified them for my fields.
// ----------------------------------------------------------
// DatabaseDefinition class
// ----------------------------------------------------------
class DatabaseDefinition : public VDK_DataBase
{
private:
NewsgroupTable *_newsgroupTable;
public:
DatabaseDefinition() {
_newsgroupTable = new NewsgroupTable();
}
~DatabaseDefinition() { }
NewsgroupTable* getRecordCountTable() {
// We now only have one table
return _newsgroupTable;
}
NewsgroupTable* getNewsgroupTable() {
return _newsgroupTable;
}
};
> Check next points:
>
> 1) if you use cursors then kill all cursors before you close db.
>
> 2) if you close db you do this before ValentinaShutdown call.
Yes, #2 was the problem.
In the Cocoa Demo code, it actually does the ValentinaShutdown
inside the [self close] method BEFORE deleting the databasedefinition.
I reversed the order of the lines of code and it works properly now.
Thank you very much!
Did you say someone had a more up-to-date Cocoa Demo?
- Matthew
More information about the Valentina
mailing list