[SOLVED - Kinda...] mud crashes when link dead characters auto-quit

Posted by Cbond on Sun 14 Jun 2009 07:36 AM — 5 posts, 24,221 views.

USA #0
After hunting around and testing various things I've determined that after a character goes link dead and their descriptor gets set to NULL, for some reason the ch->in_room for the char gets NULL'd out as well. I've tried some stuff and I've got it to the point that their pfile isn't getting wiped anymore, but the mud is still crashing. In this case in extract_char, because ch->in_room is NULL.

So, can anyone figure out why ch->in_room is getting NULL'd out? The "physical" character still exists in the game so why would it not be showing up as in a room? The last time I tested this, about 2 minutes ago, the test char was sitting in room vnum 100.

Thanks.
Australia Forum Administrator #1
Which version of Smaug is this?
USA #2
It's actually a modified SWR 1.0.

Oh ya, I just remembered that the issue cropped up after we put in an account system...

Think I'll go poke around in the account stuff to see if anything in there looks like an obvious culprit, though why that would be an issue I couldn't say as it should only have anything to do with logging in...

Well, after taking a closer look at the account system, the ONLY thing it does as far as what room the character is in is it reads the Room from the player file in order to display what room the player last quit from...
Amended on Sun 14 Jun 2009 11:00 PM by Cbond
Australia Forum Administrator #3
Quote:

It's actually a modified SWR 1.0.


It is hard to debug a pointer problem with modified code that I don't have access to. I can only suggest you read up on gdb (http://mushclient.com/gdb) and try to put breakpoints on the parts of the code that set ch->in_room to NULL, and force a link-dead character.
USA #4
As Nick said, without being able to see the code, the best we can really do is guess work, but if I were to take a guess based on what you've told us, I'd suspect that the character was being extracted twice.