Program exits with signal 11 (SIGSEGV).

Matthew Jew mjew at icnc.com
Mon Jul 21 14:44:22 CDT 2003


On Monday, July 21, 2003, at 03:36  AM, Ruslan Zasukhin wrote:

> on 7/21/03 12:50, Matthew Jew at mjew at icnc.com wrote:
>
> Hi Matthew,
>
> 1) please note, I do not know Obj-C absolutly, but I will learn with 
> you :-)
>

Ruslan,

My apologies for bothering you by sending mail only to you directly.
I will send my questions to the list and related people from now on.

> 2) I again have CC this to Valentina list.
> BTW, I have made Totte, and Eric Forget, but at least 2-3 more good 
> experts
> of Obj-C present here. One of them, Arthur Clemens, have made latest 
> example
> for Obj-C.
>
> So guys, I offer you make small community and help each other resolve 
> any PB
> projects. Okay?
>

That would be wonderful, if others are willing.

> 3) Matthew, what exactly line exists ?
>

Actually, the signal 11 (SIGSEGV) happens at the very end, on the

[_database release];

I also neglected to mention another issue: I cannot find the DB files
anywhere on disk! This is also true of the Cocoa Demo; I cannot locate
the "ExampleDB" that it creates, even while the program is running
(I thought maybe it deleted it upon exit). Am I missing something 
obvious?

- Matthew


>>
>
>> Ruslan,
>>
>> Another Cocoa question.
>>
>> This routine causes the program to exit with signal 11 (SIGSEGV).
>>
>> - (void) writeGroupListToDB
>> {
>>    ValentinaDatabase * _database = [[ValentinaDatabase alloc] init];
>> NewsgroupTable * aNewsgroupTable;
>> long i;
>> GroupInfoRec *baseRecPtr;
>> GroupInfoRec *aRecPtr;
>> char *baseStringPtr;
>> char *groupName;
>>
>> printf("Started writeGroupListToDB\n");
>>
>> [_database
>> createDatabaseWithFileName:@"/Volumes/Beta2/ValentinaDBs/
>> SampleNewsgroupListDB"];
>> printf("Created DB\n");
>>
>> aNewsgroupTable = [_database databaseDefinition]->getNewsgroupTable();
>> printf("Get Table pointer\n");
>>
>>    aNewsgroupTable->SetBlank();
>> printf("Set Blank\n");
>>
>> baseRecPtr = (GroupInfoRec *) [groupInfo mutableBytes];
>> baseStringPtr = (char *) [stringPool mutableBytes];
>>
>> aRecPtr = baseRecPtr;
>> for ( i = 0; i < groupsInList; i++ )
>> {
>> groupName = baseStringPtr + aRecPtr->nameOffset;
>>
>> [_database databaseDefinition]->getNewsgroupTable()->mfNewsgroupName
>> = groupName;
>> [_database
>> databaseDefinition]->getNewsgroupTable()->mfNewsgroupNumber =
>> aRecPtr->groupNumber;
>>
>> [_database databaseDefinition]->getNewsgroupTable()->AddRecord();
>>
>> ++aRecPtr;    // Pointer math
>> }
>> printf("Done adding\n");
>> [_database databaseDefinition]->getNewsgroupTable()->Flush();
>> printf("Database flushed\n");
>> [_database close];
>> printf("Database closed\n");
>>    [_database release];
>> printf("Database released\n");
>> }
>>
>> - Matthew
>
> -- 
> Best regards,
> Ruslan Zasukhin      [ I feel the need...the need for speed ]
> -------------------------------------------------------------
> e-mail: ruslan at paradigmasoft.com
> web: http://www.paradigmasoft.com
>
> To subscribe to the Valentina mail list go to:
> http://lists.macserve.net/mailman/listinfo/valentina
> -------------------------------------------------------------
>



More information about the Valentina mailing list