![](https://smaugmuds.afkmods.com/skins/default/images/icons/topic.png)
Pages:<< prev 1 next >>
![Post is unread](https://smaugmuds.afkmods.com/skins/default/images/icons/topic.png)
![](https://smaugmuds.afkmods.com/skins/default/images/noavatar.png)
![This member is currently offline](https://smaugmuds.afkmods.com/skins/default/images/icons/user_offline.png)
Fledgling
![](https://smaugmuds.afkmods.com/skins/default/images/0.png)
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:
That line of handler.c is:
And the nofloor flag code in the act_move.c file is:
Thank you in advance and sorry for my English
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](https://smaugmuds.afkmods.com/skins/default/images/icons/topic.png)
![This member is currently offline](https://smaugmuds.afkmods.com/skins/default/images/icons/user_offline.png)
Off the Edge of the Map
![](https://smaugmuds.afkmods.com/skins/default/images/5.png)
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](https://smaugmuds.afkmods.com/skins/default/images/icons/topic.png)
![](https://smaugmuds.afkmods.com/skins/default/images/noavatar.png)
![This member is currently offline](https://smaugmuds.afkmods.com/skins/default/images/icons/user_offline.png)
Fledgling
![](https://smaugmuds.afkmods.com/skins/default/images/0.png)
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](https://smaugmuds.afkmods.com/skins/default/images/icons/topic.png)
![](https://smaugmuds.afkmods.com/skins/default/images/noavatar.png)
![This member is currently offline](https://smaugmuds.afkmods.com/skins/default/images/icons/user_offline.png)
Geomancer
![](https://smaugmuds.afkmods.com/skins/default/images/6.png)
GroupAdministrators
Posts1,921
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](https://smaugmuds.afkmods.com/skins/default/images/icons/topic.png)
![](https://smaugmuds.afkmods.com/avatars/uploaded/601.jpg)
![This member is currently offline](https://smaugmuds.afkmods.com/skins/default/images/icons/user_offline.png)
Conjurer
![](https://smaugmuds.afkmods.com/skins/default/images/3.png)
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?
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](https://smaugmuds.afkmods.com/skins/default/images/icons/topic.png)
![This member is currently offline](https://smaugmuds.afkmods.com/skins/default/images/icons/user_offline.png)
Black Hand
![](https://smaugmuds.afkmods.com/skins/default/images/7.png)
GroupAdministrators
Posts3,689
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.
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](https://smaugmuds.afkmods.com/skins/default/images/icons/topic.png)
![](https://smaugmuds.afkmods.com/skins/default/images/noavatar.png)
![This member is currently offline](https://smaugmuds.afkmods.com/skins/default/images/icons/user_offline.png)
Geomancer
![](https://smaugmuds.afkmods.com/skins/default/images/6.png)
GroupAdministrators
Posts1,921
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.
![](https://smaugmuds.afkmods.com/avatars/uploaded/601.jpg)
![This member is currently offline](https://smaugmuds.afkmods.com/skins/default/images/icons/user_offline.png)
Conjurer
![](https://smaugmuds.afkmods.com/skins/default/images/3.png)
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:](https://smaugmuds.afkmods.com/emojis/rolleyes.gif)
Pages:<< prev 1 next >>