Below is the output from the core and the info you requested. I'm curious how "h" could be such an odd ball number while inside a defined for loop? - Valnir Program terminated with signal 11, Segmentation fault. #0 0x080b373c in set_host (ch=0xb74f63bc, d=0xb74f5240) at comm.c:5793 5793 free_string(ch->usrdata->alt_hosts[h]); (gdb) print ch->usrdata $1 = (USER_DATA *) 0xb74f60b0 (gdb) print h $2 = -1219534064 (gdb) print ch->usrdata->alt_hosts[h] Cannot access memory at address 0x948ced3c (gdb)
________________________________________ From: [EMAIL PROTECTED] on behalf of Ammaross Danan Sent: Wed 3/28/2007 2:27 AM To: [email protected] Subject: Re: Crash after server move Valnir wrote: > We're getting ready to port our mud to a new server and we're having a bit > of an issue. Everything compiles clean, but when we login we get past our > account login and when we select what character to play the mud crashes. > > Program terminated with signal 11, Segmentation fault. > #0 0x080b373c in set_host (ch=0xb74f63bc, d=0xb74f5240) at comm.c:5793 > 5793 free_string(ch->usrdata->alt_hosts[h]); > print ch->usrdata print h print ch->usrdata->alt_hosts[h] These will give us the proper feedback on exactly what is causing the crash. I'm willing to bet ch->usrdata is 0x0, or is 0x3 or some such invalid mem address (caused by an overrun of some sort). If it is, you may want to insert an alloc_mem in the new_char_data() and the corresponding free_mem() in the free_char_data(). > (gdb) where > #0 0x080b373c in set_host (ch=0xb74f63bc, d=0xb74f5240) at comm.c:5793 > #1 0x080a905c in nanny (d=0xb74f5240, argument=0xb74f5661 "Valnir") at > comm.c:2560 > #2 0x080a4a49 in game_loop_unix (control=4) at comm.c:885 > #3 0x080a4424 in main (argc=2, argv=0xbf911974) at comm.c:490 > (gdb) > > It's crashing while trying to update the listing of hosts that a players has > connected from. > > /* consolidate list and remove the current host from the list, if needed > */ > might want to put this block inside a if ( ch->usrdata != null ) check > for ( h = 0; h < MAX_HOSTS; h++ ) > { > if ( !str_cmp( ch->usrdata->alt_hosts[h], d->host ) ) > continue; > > if ( !IS_NULLSTR(ch->usrdata->alt_hosts[h]) ) > { > hosts[i++] = str_dup(ch->usrdata->alt_hosts[h]); > free_string(ch->usrdata->alt_hosts[h]); > ch->usrdata->alt_hosts[h] = &str_empty[0]; > } > } > The new server is running GCC 4.1.1 and any help would be greatly > appreciated. Thanks! > > - Valnir > > > > Ammaross Danan Realms of the Forgotten www.rotf.net 4998 -- ROM mailing list [email protected] Unsubscribe here ->>> http://www.rom.org/cgi-bin/mailman/listinfo/rom -- ROM mailing list [email protected] Unsubscribe here ->>> http://www.rom.org/cgi-bin/mailman/listinfo/rom

