For some reason its passing an unacceptable value through the function and I can't figure out why. :(
in handler.c
call to function in update.c is clean_obj_queue( );
Program received signal SIGSEGV, Segmentation fault.
0x000000324207725a in _int_free () from /lib64/libc.so.6
Missing separate debuginfos, use: debuginfo-install glibc-2.10.1-2.x86_64 nss-softokn-freebl-3.12.3.99.3-2.11.3.fc11.x86_64 zlib-1.2.3-22.fc11.x86_64
(gdb) bt
#0 0x000000324207725a in _int_free () from /lib64/libc.so.6
#1 0x00000000004e5cc3 in free_obj (obj=0x109bc00) at handler.c:6892
#2 0x00000000004e5965 in clean_obj_queue () at handler.c:6841
#3 0x0000000000582f95 in update_handler () at update.c:3554
#4 0x00000000004a2835 in game_loop () at comm.c:716
#5 0x00000000004a1d8c in main (argc=1, argv=0x7fffffffe6c8) at comm.c:343
in handler.c
/* borrowed from smaug 1.8 */
void clean_obj_queue( void )
{
OBJ_DATA *obj;
while( extracted_obj_queue )
{
obj = extracted_obj_queue;
extracted_obj_queue = extracted_obj_queue->next;
free_obj( obj );
--cur_qobjs;
}
}
/* Deallocates the memory used by a single object after it's been extracted. */
void free_obj( OBJ_DATA * obj )
{
AFFECT_DATA *paf, *paf_next;
EXTRA_DESCR_DATA *ed, *ed_next;
// REL_DATA *RQueue, *rq_next;
MPROG_ACT_LIST *mpact, *mpact_next;
if( !obj ) {
bug( "%s: obj = NULL", __FUNCTION__ );
return; }
for( mpact = obj->mpact; mpact; mpact = mpact_next )
{
mpact_next = mpact->next;
DISPOSE( mpact->buf );
DISPOSE( mpact );
}
/*
* remove affects
*/
for( paf = obj->first_affect; paf; paf = paf_next )
{
paf_next = paf->next;
DISPOSE( paf );
}
obj->first_affect = obj->last_affect = NULL;
/*
* remove extra descriptions
*/
for( ed = obj->first_extradesc; ed; ed = ed_next )
{
ed_next = ed->next;
STRFREE( ed->description );
STRFREE( ed->keyword );
DISPOSE( ed );
}
obj->first_extradesc = obj->last_extradesc = NULL;
STRFREE( obj->name );
STRFREE( obj->description );
STRFREE( obj->short_descr );
STRFREE( obj->action_desc );
DISPOSE( obj ); //<---Crash originates here.
return;
}
call to function in update.c is clean_obj_queue( );