RE: Crash after server move
"Valnir" <[email protected]> Wed, 28 Mar 2007 20:48:45 -0400
| Newsgroups | gmane.games.devel.mud.rom |
|---|---|
| Message-ID | <000001c7719c$01d917f0$058b47d0$@com> |
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? =A0 - Valnir =A0 Program terminated with signal 11, Segmentation fault. #0=A0 0x080b373c in set_host (ch=3D0xb74f63bc, d=3D0xb74f5240) at = comm.c:5793 5793=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 = free_string(ch->usrdata->alt_hosts[h]); (gdb) print ch->usrdata $1 =3D (USER_DATA *) 0xb74f60b0 (gdb) print h $2 =3D -1219534064 (gdb) print ch->usrdata->alt_hosts[h] Cannot access memory at address 0x948ced3c (gdb)=20 =A0 ________________________________________ 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. >=A0 > Program terminated with signal 11, Segmentation fault. > #0=A0 0x080b373c in set_host (ch=3D0xb74f63bc, d=3D0xb74f5240) at = comm.c:5793 > 5793=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 = free_string(ch->usrdata->alt_hosts[h]); >=A0=A0 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=A0 0x080b373c in set_host (ch=3D0xb74f63bc, d=3D0xb74f5240) at = comm.c:5793 > #1=A0 0x080a905c in nanny (d=3D0xb74f5240, argument=3D0xb74f5661 = "Valnir") at > comm.c:2560 > #2=A0 0x080a4a49 in game_loop_unix (control=3D4) at comm.c:885 > #3=A0 0x080a4424 in main (argc=3D2, argv=3D0xbf911974) at comm.c:490 > (gdb) >=A0 > It's crashing while trying to update the listing of hosts that a = players has > connected from. >=A0 >=A0=A0=A0=A0 /* consolidate list and remove the current host from the = list, if needed > */ >=A0=A0 might want to put this block inside a if ( ch->usrdata !=3D null ) check >=A0=A0=A0=A0 for ( h =3D 0; h < MAX_HOSTS; h++ ) >=A0=A0=A0=A0 { >=A0=A0=A0=A0=A0=A0=A0=A0 if ( !str_cmp( ch->usrdata->alt_hosts[h], = d->host ) ) >=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 continue; >=A0 >=A0=A0=A0=A0=A0=A0=A0=A0 if ( !IS_NULLSTR(ch->usrdata->alt_hosts[h]) ) >=A0=A0=A0=A0=A0=A0=A0=A0 { >=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 hosts[i++] =3D = str_dup(ch->usrdata->alt_hosts[h]); >=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 = free_string(ch->usrdata->alt_hosts[h]); >=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 ch->usrdata->alt_hosts[h] =3D = &str_empty[0]; >=A0=A0=A0=A0=A0=A0=A0=A0 } >=A0=A0=A0=A0 } > The new server is running GCC 4.1.1 and any help would be greatly > appreciated. Thanks! >=A0 > - Valnir >=A0 > > >=A0=A0 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