Login
User Name:

Password:



Register
Forgot your password?
Vote for Us!
auth_update crash
Dec 23, 2017, 10:15 pm
By Remcon
check_tumble
Dec 18, 2017, 7:21 pm
By Remcon
parse description bug
Dec 15, 2017, 10:08 pm
By Remcon
Couple bugs
Dec 12, 2017, 5:42 pm
By Remcon
Bug in disarm( )
Nov 12, 2017, 6:54 pm
By GatewaySysop
LoP 1.46
Author: Remcon
Submitted by: Remcon
LOP 1.45
Author: Remcon
Submitted by: Remcon
LOP Heroes Edition
Author: Vladaar
Submitted by: Vladaar
Heroes sound extras
Author: Vladaar
Submitted by: Vladaar
6Dragons 4.3
Author: Vladaar
Submitted by: Vladaar
Users Online
CommonCrawl, Yandex, Yahoo!

Members: 0
Guests: 5
Stats
Files
Topics
Posts
Members
Newest Member
478
3,708
19,242
612
Jacki72H
Today's Birthdays
There are no member birthdays today.
Related Links
» SmaugMuds.org » Codebases » AFKMud Support & Development » More Seg Fault Fun
Forum Rules | Mark all | Recent Posts

More Seg Fault Fun
< Newer Topic :: Older Topic > instaroom crashing

Pages:<< prev 1 next >>
Post is unread #1 Mar 25, 2004, 10:03 pm
Go to the top of the page
Go to the bottom of the page

cynshard

GroupMembers
Posts95
JoinedNov 19, 2003

We've been having problems with reset area crashing occasionally when editing
non-proto areas. Running AFKMud 1.61 on Debian Linux. Here is the log leading up
to the crash, with the report from gdb:
Fri Mar 26, 2004 3:42:35 PM CST :: Dialan returns from beyond the void.Fri Mar 26, 2004 3:43:08 PM CST :: Log Dialan: mcreate 26142 shop owner manFri Mar 26, 2004 3:43:13 PM CST :: Log Dialan: aassign vanaheim.areFri Mar 26, 2004 3:43:13 PM CST :: Assigning The City of Vanaheim to Dialan.Fri Mar 26, 2004 3:43:26 PM CST :: Log Dialan: mset 26142 long A shopkeeper is here.Fri Mar 26, 2004 3:43:35 PM CST :: Log Dialan: mset 26142 short a shopkeeperFri Mar 26, 2004 3:43:38 PM CST :: Log Dialan: mset 26142 level 5Fri Mar 26, 2004 3:43:43 PM CST :: Log Dialan: mset 26142 flags sentinelFri Mar 26, 2004 3:43:46 PM CST :: Log Dialan: mset 26142 flags pacifistFri Mar 26, 2004 3:44:11 PM CST :: Log Dialan: mset 26142 sex maleFri Mar 26, 2004 3:44:34 PM CST :: Log Dialan: mset 26142 flags protoFri Mar 26, 2004 3:44:35 PM CST :: Log Dialan: instaroomFri Mar 26, 2004 3:44:38 PM CST :: Log Dialan: reset listFri Mar 26, 2004 3:44:45 PM CST :: Log Dialan: reset listFri Mar 26, 2004 3:44:48 PM CST :: Log Dialan: reset areaFri Mar 26, 2004 3:44:52 PM CST :: Log Dialan: makeshop 26142Fri Mar 26, 2004 3:44:59 PM CST :: Log Dialan: folda vanaheim.areFri Mar 26, 2004 3:44:59 PM CST :: Saving vanaheim.are...Fri Mar 26, 2004 3:45:05 PM CST :: Log Dialan: ocreate 26142 neon potionFri Mar 26, 2004 3:45:12 PM CST :: Log Dialan: oset 26142 type potionFri Mar 26, 2004 3:45:17 PM CST :: Log Dialan: oset 26142 cost 20Fri Mar 26, 2004 3:45:39 PM CST :: Log Dialan: oset 26142 long A neon potion is laying on the ground.Fri Mar 26, 2004 3:45:46 PM CST :: Log Dialan: oset 26142 short a neon potionFri Mar 26, 2004 3:45:59 PM CST :: Log Dialan: oset 26142 level 1Fri Mar 26, 2004 3:46:13 PM CST :: Log Dialan: oset 26142 v0 50Fri Mar 26, 2004 3:46:25 PM CST :: Log Dialan: oset 26142 v1 61Fri Mar 26, 2004 3:46:34 PM CST :: Log Dialan: oset 26142 v2 -1Fri Mar 26, 2004 3:46:37 PM CST :: Log Dialan: oset 26142 v3 -1Fri Mar 26, 2004 3:46:51 PM CST :: Log Dialan: oset 26142 flags magicFri Mar 26, 2004 3:46:53 PM CST :: Log Dialan: oset 26142 flags protoNOTE:: Dialan gives the potion to the shopkeeper Vnum 26142 :: NOTEFri Mar 26, 2004 3:47:01 PM CST :: Log Dialan: folda vanaheim.areFri Mar 26, 2004 3:47:01 PM CST :: Saving vanaheim.are...Fri Mar 26, 2004 3:47:04 PM CST :: Log Dialan: instaroomFri Mar 26, 2004 3:47:09 PM CST :: Log Dialan: reset areaFri Mar 26, 2004 3:47:42 PM CST :: Log Dialan: ocreate 26001 light blue potionFri Mar 26, 2004 3:48:06 PM CST :: Log Dialan: oset 26001 long A light blue potion is resting on the ground here.Fri Mar 26, 2004 3:48:14 PM CST :: Log Dialan: oset 26001 short a light blue potionFri Mar 26, 2004 3:48:18 PM CST :: Log Dialan: oset 26001 level 1Fri Mar 26, 2004 3:48:22 PM CST :: Log Dialan: oset 26001 type potionFri Mar 26, 2004 3:48:29 PM CST :: Log Dialan: oset 26001 wear take holdFri Mar 26, 2004 3:48:34 PM CST :: Log Dialan: oset 26001 flags magicFri Mar 26, 2004 3:48:41 PM CST :: Log Dialan: oset 26001 cost 30Fri Mar 26, 2004 3:49:09 PM CST :: Log Dialan: oset 26001 v1 12Fri Mar 26, 2004 3:49:15 PM CST :: Log Dialan: oset 26001 v0 20Fri Mar 26, 2004 3:49:19 PM CST :: Log Dialan: oset 26001 v2 -1Fri Mar 26, 2004 3:49:22 PM CST :: Log Dialan: oset 26001 v3 -1Fri Mar 26, 2004 3:49:37 PM CST :: Log Dialan: oset 26001 flags protoNOTE:: Dialan gives the potion to the shopkeeper Vnum 26001 :: NOTEFri Mar 26, 2004 3:49:42 PM CST :: Log Dialan: instaroomProgram received signal SIGSEGV, Segmentation fault.0x401bc10c in calloc () from /lib/tls/libc.so.6


Edit: We realized that it wasn't every instaroom that would crash the game, so we tried to reproduce the crash more accurately.

I've added a couple of notes to this log.
       
Post is unread #2 Mar 26, 2004, 2:27 pm
Go to the top of the page
Go to the bottom of the page

cynshard

GroupMembers
Posts95
JoinedNov 19, 2003

Tested this bug out on Stock AFKMud 1.63 as well, and it seems to have the same problems I'm having.

*** More testing ***
I've done some tracking down of this bug and have figured the following:

If you instaroom a mob with any number of objects on its person. It works as long as there are no previous resets installed. But if you load another object into the room, on the ground or on the/a mob. Instaroom makes it all the way to the CREATE macro ( the calloc call ) before crashing. My guess is it's not clearing out the resets properly. I'm looking into that right now, if anyone has any ideas please chime in.

*** Even MORE Testing ***

It seems that instaroom will only write resets the first time you use it. For example here is a portion of my reset list:

61) thief man (26097) -> Whyle Street Room: 26106 [6]62) a little dirk (26033) -> thief man (wield) [1]63) shop owner man (26142) -> The Potion Shop Room: 26142 [1]64) neon potion (26142) -> shop owner man (carry) [1]


Without changing anything at all if I type instaroom I get the following:
Build: Cynshard: instaroomRoom resets installed.


And when I type reset list again here is the same portion of the reset list:
60) a little dirk (26033) -> thief man (wield) [1]61) thief man (26097) -> Whyle Street Room: 26106 [6]62) a little dirk (26033) -> thief man (wield) [1]


And so, if I type reset area after doing this, the game crashes with the following gdb output:


Something is quite fubar'd it seems. :/
Program received signal SIGSEGV, Segmentation fault.0x401bce72 in mallopt () from /lib/tls/libc.so.6
       
Post is unread #3 Mar 28, 2004, 2:14 pm
Go to the top of the page
Go to the bottom of the page

Samson
Black Hand
GroupAdministrators
Posts3,639
JoinedJan 1, 2002

Me and Valgrind spent some quality time with this and I think we figured out the problem was the wipe_resets function itself was dirty. Very dirty. So I popped open my copy of Smaug FUSS and put back the old version, with the mods for overland support. Valgrind no longer complains about it and the resets are redone the way they should be.

Open reset.c, find wipe_resets, replace with:

void wipe_resets( AREA_DATA *pArea, ROOM_INDEX_DATA *pRoom, sh_int map, sh_int x, sh_int y ){   RESET_DATA *pReset;   for( pReset = pArea->first_reset; pReset; )   {      if( pReset->command != 'R' && is_room_reset( pReset, pRoom, pArea ) )      {         /* Resets always go forward, so we can safely use the previous reset,            providing it exists, or first_reset if it doesnt.  -- Altrag */         RESET_DATA *prev = pReset->prev;         if( pRoom == NULL || ( pReset->arg4 == map && pReset->arg5 == x && pReset->arg6 == y ) )            delete_reset( pArea, pReset );         pReset = ( prev ? prev->next : pArea->first_reset );   }   else      pReset = pReset->next;   }   return;}

       
Pages:<< prev 1 next >>