Permadeath and segfault

A place for people to post strange occurances that could be potential bugs.

Moderator: Board moderators

Post Reply
SilverNexus
Junior member
Posts: 165
Joined: Mon Jun 25, 2012 5:33 pm
Location: Planet Earth

Permadeath and segfault

Post by SilverNexus »

When a character is killed on a permadeath server, his/her name still is listed in the character selection dialog after the player is returned to the character selection screen. Selecting the dead character causes the selection dialog to go away and prompt the user for his/her password in the messages area of the client (like the old way would have to confirm a new character's password). When the user enters a password, the server segfaults after giving this error:

Code: Select all

13/11/01 14:15:13 [Error]   BUG: process_events(): Object without map or inventory is on active list: TestDummy (23386)
I am using a stock trunk server, version 1.70.0-r19089 with permadeath enabled (someone I know was planning on doing a YouTube "hardcore" series).

As far as I can tell, the server is acting appropriately, as the character no longer exists. The problem appears to be that the client still displays the dead character as an option in the first place.
That SilverNexus guy? You needn't worry about him.
He is level negative 4 in oratory, and his singing is worse.
Leaf
Forum Aficionado
Posts: 1994
Joined: Tue Apr 29, 2003 5:55 pm
Location: Minnesota, USA
Contact:

Post by Leaf »

I moved this to the SF project page as a bug report.

https://sourceforge.net/p/crossfire/bugs/762/
"Put another, more succinct way: don't complain, contribute. It's more satisfying in the long run, and it's more constructive."
Eric Meyer
SilverNexus
Junior member
Posts: 165
Joined: Mon Jun 25, 2012 5:33 pm
Location: Planet Earth

Post by SilverNexus »

Is there a way for the server to request the account name from the client?

I know there are several instances where the server is given the account name, but I'm not sure whether or not the server can fetch that information at-will.

If there isn't, I might have to make a character array/pointer to the account the character is from in the player structure, just so that the accounts file can be updated when a character dies in permadeath.

Maybe the delete_character() function has some useful information for this. If only I could find it...
That SilverNexus guy? You needn't worry about him.
He is level negative 4 in oratory, and his singing is worse.
SilverNexus
Junior member
Posts: 165
Joined: Mon Jun 25, 2012 5:33 pm
Location: Planet Earth

Post by SilverNexus »

I found the account name in the player structure. (pl->socket.account_name)

As such, I just need to make a way for the dead character to be revived with the appropriate effect on the account file.

I was thinking that either an extra defined variable in the pl_corpse archetype containing the account name or an additional file (in the var/crossfire folder) that lists the names of dead players and the accounts they are tied to.
If there is an unused char* variable in the making of pl_corpse, that seems like an easier way to implement this than making a whole new file it would have to sift through every death and resurrection.

Any thoughts on these ideas?
That SilverNexus guy? You needn't worry about him.
He is level negative 4 in oratory, and his singing is worse.
SilverNexus
Junior member
Posts: 165
Joined: Mon Jun 25, 2012 5:33 pm
Location: Planet Earth

Post by SilverNexus »

In the end, I chose an attribute in the pl_corpse.
Specifically, I am currently using slaying, but can change it to something else should there be some weird effects from using that variable.
That SilverNexus guy? You needn't worry about him.
He is level negative 4 in oratory, and his singing is worse.
SilverNexus
Junior member
Posts: 165
Joined: Mon Jun 25, 2012 5:33 pm
Location: Planet Earth

Post by SilverNexus »

Patch committed to r19105.
That SilverNexus guy? You needn't worry about him.
He is level negative 4 in oratory, and his singing is worse.
Post Reply