Login
User Name:

Password:



Register

Forgot your password?
Hi - Clean SmaugFuss map/description issue..
Dec 15, 2024 7:29 pm
By Samson
AFKMud 2.2.4
Dec 10, 2024 4:09 pm
By Samson
I3 and IMC
Dec 8, 2024 6:35 pm
By Remcon
Ubuntu 22.04.5 LTS
Dec 5, 2024 5:10 pm
By Remcon
SmaugFUSS 1.8/1.9
Nov 29, 2024 11:46 am
By Remcon
SWFOTEFUSS 1.5.1
Author: Various
Submitted by: Samson
SWRFUSS 1.4.1
Author: Various
Submitted by: Samson
SmaugFUSS 1.9.5
Author: Various
Submitted by: Samson
AFKMud 2.2.4
Author: AFKMud Team
Submitted by: Samson
LOP 1.5
Author: Remcon
Submitted by: Remcon
Users Online
AhrefsBot, Bing

Members: 0
Guests: 37
Stats
Files
Topics
Posts
Members
Newest Member
494
3,808
19,707
588
Mortrex

Today's Birthdays
There are no member birthdays today.
» SmaugMuds » Codebases » SWFOTE FUSS » Mud crash with roomflag noflo...
Forum Rules | Mark all | Recent Posts

Mud crash with roomflag nofloor
< Newer Topic :: Older Topic >

Pages:<< prev 1 next >>
Post is unread #1 Oct 13, 2020 8:23 am   
Go to the top of the page
Go to the bottom of the page

Gunner
Fledgling
GroupMembers
Posts11
JoinedMay 26, 2011

 
Hi.
I'm using codebase Swfote 2.1.
when I use the nofloor flag in a room and i'm falling down, the mud crashess.
The error is:
#0  0x00000000004ddd52 in char_to_room (ch=0x12e7490, pRoomIndex=0x0) at handler.c:1098

That line of handler.c is:
void char_to_room( CHAR_DATA *ch, ROOM_INDEX_DATA *pRoomIndex )
{
    OBJ_DATA *obj;

    if ( !ch )
    {
	bug( "Char_to_room: NULL ch!", 0 );
	return;
    }
   if( !get_room_index( pRoomIndex->vnum ) )
      pRoomIndex = NULL;

And the nofloor flag code in the act_move.c file is:
bool will_fall( CHAR_DATA *ch, int fall )
{
    if ( IS_SET( ch->in_room->room_flags, ROOM_NOFLOOR )
    &&   CAN_GO(ch, DIR_DOWN)
    && (!IS_AFFECTED( ch, AFF_FLYING )
    || ( ch->mount && !IS_AFFECTED( ch->mount, AFF_FLYING ) ) ) )
    {
	if ( fall > 80 )
	{
	   bug( "Falling (in a loop?) more than 80 rooms: vnum %d", ch->in_room->vnum );
	   char_from_room( ch );
	   char_to_room( ch, get_room_index( wherehome(ch) ) );
	   fall = 0;
	   return TRUE;
	}
	set_char_color( AT_FALLING, ch );
	send_to_char( "Caes...\n\r", ch );
	move_char( ch, get_exit(ch->in_room, DIR_DOWN), ++fall );
	return TRUE;
    }
    return FALSE;
}

Thank you in advance and sorry for my English

Post is unread #2 Oct 13, 2020 12:37 pm   
Go to the top of the page
Go to the bottom of the page

InfiniteAxis
Off the Edge of the Map
GroupAdministrators
Posts1,200
JoinedMar 21, 2006

 
Gunner said:


#0  0x00000000004ddd52 in char_to_room (ch=0x12e7490, pRoomIndex=0x0) at handler.c:1098



pRoomIndex = 0x0 means that RoomIndex was NULL, or non-existant.

Post is unread #3 Oct 13, 2020 3:32 pm   
Go to the top of the page
Go to the bottom of the page

Gunner
Fledgling
GroupMembers
Posts11
JoinedMay 26, 2011

 
it's strange, because the room does exist. in fact if there is no exit down does not run the nofloor

Post is unread #4 Oct 16, 2020 5:21 pm   
Go to the top of the page
Go to the bottom of the page

Remcon
Geomancer
GroupAdministrators
Posts1,946
JoinedJul 26, 2005

 
void char_to_room( CHAR_DATA *ch, ROOM_INDEX_DATA *pRoomIndex )
{
    OBJ_DATA *obj;

    if ( !ch )
    {
	bug( "Char_to_room: NULL ch!", 0 );
	return;
    }
   if( !get_room_index( pRoomIndex->vnum ) )
      pRoomIndex = NULL;

id suggest maybe changing that last if check to
   if( !pRoomIndex || !get_room_index( pRoomIndex->vnum ) )

Can even try to handle it and give some log info to protect it from crashing there if you want. In mine it looks like it will warn about trying to put them in a null room. place them in the previous room if there is one, try to put them in limbo if no previous room, tell you to prepare for a crash if none of those exist lol.

Post is unread #5 Oct 21, 2020 3:16 am   
Go to the top of the page
Go to the bottom of the page

GatewaySysop
Conjurer
GroupMembers
Posts423
JoinedMar 7, 2005

 
My understanding from seeing this same question on Nick's forum was that the issue happened in a variety of places and circumstances, so it would seem a larger problem than just falling.

You need to find out why char_to_room( ) is being called with a NULL value of the pRoomIndex argument.

Is this only happening with falling or elsewhere? If so, where else does it happen? Under what conditions?

Post is unread #6 Oct 21, 2020 12:53 pm   
Go to the top of the page
Go to the bottom of the page

Samson
Black Hand
GroupAdministrators
Posts3,697
JoinedJan 1, 2002

 
What really needs to be done here is an analysis of the backtrace. I'd suggest having a look through the GDB Tutorial that's linked in the main menu at the top right and then figuring out why NULL data is being passed.

Making the change Remcon suggested will simply mask the issue and it'll never be found, and will likely go on to cause crashes elsewhere that become even harder to diagnose.

Post is unread #7 Oct 21, 2020 5:58 pm   
Go to the top of the page
Go to the bottom of the page

Remcon
Geomancer
GroupAdministrators
Posts1,946
JoinedJul 26, 2005

 
lol it logs it and lets you pin point when its happening. had the issue once and using that allowed me to stop crazy crashing while i dig into what was crashing it and when null was being passed.

Post is unread #8 Nov 4, 2020 1:48 pm   Last edited Nov 4, 2020 1:49 pm by GatewaySysop
Go to the top of the page
Go to the bottom of the page

GatewaySysop
Conjurer
GroupMembers
Posts423
JoinedMar 7, 2005

 
Based on the complete lack of follow-up or any recent reply after myself and others attempted to help this same OP on Nick's forum, I am not at all surprised that there's been no response from the OP here either. At least we tried (again). :rolleyes:

Pages:<< prev 1 next >>