Login
User Name:

Password:



Register
Forgot your password?
Vote for Us!
Couple bugs
Dec 12, 2017, 5:42 pm
By Remcon
Bug in disarm( )
Nov 12, 2017, 6:54 pm
By GatewaySysop
Bug in will_fall( )
Oct 23, 2017, 1:35 am
By GatewaySysop
Bug in do_zap( ), do_brandish( )
Oct 18, 2017, 1:52 pm
By GatewaySysop
Bug in get_exp_worth( )
Oct 10, 2017, 1:26 am
By GatewaySysop
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
Memwatch
Author: Johan Lindh
Submitted by: Vladaar
Users Online
CommonCrawl, Yandex

Members: 0
Guests: 7
Stats
Files
Topics
Posts
Members
Newest Member
477
3,705
19,232
608
LAntorcha
Today's Birthdays
There are no member birthdays today.
Related Links
» SmaugMuds.org » Codebases » AFKMud Support & Development » Immortal using command goto h...
Forum Rules | Mark all | Recent Posts

Immortal using command goto hell...
< Newer Topic :: Older Topic > crash...

Pages:<< prev 1 next >>
Post is unread #1 Feb 6, 2011, 9:03 pm
Go to the top of the page
Go to the bottom of the page

trilioth
Fledgling
GroupMembers
Posts16
JoinedJan 27, 2011

This what showed on terminal:
Segmentation fault (core dumped)

warning: Can't read pathname for load map: Input/output error.


I started the mud with this commands ./startup & and I have not yet studied the debug stuff I heard mentioned I just thought I might tell you guys about what happened first.

Basically the mud crashed when I entered goto hell as an Immortal. I restarted the mud and sent goto hell and it crashed the mud again.
       
Post is unread #2 Feb 6, 2011, 9:13 pm
Go to the top of the page
Go to the bottom of the page

Conner
Sorcerer
GroupMembers
Posts870
JoinedMay 8, 2005

Maybe the mud took offense?

Sorry, couldn't resist. :lol:

Seriously, we'll need a little more info about the crash itself in all likelihood, maybe you should take a look at gdb and see what it has to say about the core file that the segmentation fault dumped on you. On the other hand, that "can't read pathname for load map: Input/output error." warning might be a wee clue in itself too. ;)
       
Post is unread #3 Feb 6, 2011, 9:19 pm
Go to the top of the page
Go to the bottom of the page

Aurin
Magician
GroupMembers
Posts189
JoinedSep 5, 2010

check do_goto and see if you can't find a check for incorrect input. This is most likely what's crashing the mud on you, as I'm fairly certain 'hell' isn't defined within the code, so it returns gibberish or NULL and crashes.
       
Post is unread #4 Feb 7, 2011, 1:42 pm
Go to the top of the page
Go to the bottom of the page

ayuri
Magician
GroupMembers
Posts239
JoinedJun 13, 2008

IMO it looks like its trying to use the map data for overland as an arg given the warning "warning: Can't read pathname for load map". 'goto hell' should return a "You cannot find that..." or a "No such location". Now, hell isn't defined in the game as a 'goto-able spot' if you will. Now, if you've a mob named hell - then yea sure you could goto her.

Just trying to be helpful, my knowledge of AFK is rather close to nonexistent.
ayuri
       
Post is unread #5 Feb 7, 2011, 4:13 pm
Go to the top of the page
Go to the bottom of the page

Aurin
Magician
GroupMembers
Posts189
JoinedSep 5, 2010

mine as well, ayuri. :whistle: Just throwing out options. heh
       
Post is unread #6 Feb 7, 2011, 8:29 pm
Go to the top of the page
Go to the bottom of the page

Conner
Sorcerer
GroupMembers
Posts870
JoinedMay 8, 2005

My specific knowledge of AFK is not really any better than y'all's in all likelihood, but I'd bet with you two that basically it doesn't know what hell is as locations go, since it's neither a room vnum nor a mob name, and instead of returning something like "goto where?" it's returning a (null) for the location to do_goto which, in turn, is bringing down the mud.
       
Post is unread #7 Feb 7, 2011, 9:00 pm
Go to the top of the page
Go to the bottom of the page

Samson
Black Hand
GroupAdministrators
Posts3,639
JoinedJan 1, 2002

Num Name Unread Description
No unread messages...
Comm: Admin returns from beyond the void.

"They say if you play a Microsoft CD backwards you hear satanic messages, what's
worse is if you play it forward it installs Windows." -- Morglum

[30000hp 30836m 30000mv] [1exp]
goto hell
No such location.

[30000hp 30836m 30000mv] [1exp]


Going to need a backtrace of the crash to diagnose it. Stock code produces only the expected error: "No such location"
       
Post is unread #8 Feb 12, 2011, 2:29 am
Go to the top of the page
Go to the bottom of the page

trilioth
Fledgling
GroupMembers
Posts16
JoinedJan 27, 2011

It looks like there are problems just loading it up

Preview:
....
warning: Can't read pathname for load map: Input/output error.
....
Program terminated with signal 11, Segmentation fault.
#0  0x00000000005bdb21 in goto_obj (ch=0x1b3f9d0, obj=0x1b162b0, argument=...)
    at build.cpp:932
932	   if( ch->pcdata && ch->pcdata->bamfout[0] )
(gdb) ^CQuit


All of it:
HIDDEN:~/afkmud/src$ gdb -c core afkmud
GNU gdb (GDB) 7.2-ubuntu
Copyright (C) 2010 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-linux-gnu".
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>...
Reading symbols from /home/trilioth/afkmud/src/afkmud...done.
[New Thread 1799]

warning: Can't read pathname for load map: Input/output error.
Reading symbols from /lib/libz.so.1...(no debugging symbols found)...done.
Loaded symbols for /lib/libz.so.1
Reading symbols from /usr/lib/libgd.so.2...(no debugging symbols found)...done.
Loaded symbols for /usr/lib/libgd.so.2
Reading symbols from /lib/libdl.so.2...(no debugging symbols found)...done.
Loaded symbols for /lib/libdl.so.2
Reading symbols from /usr/lib/libstdc++.so.6...(no debugging symbols found)...done.
Loaded symbols for /usr/lib/libstdc++.so.6
Reading symbols from /lib/libm.so.6...(no debugging symbols found)...done.
Loaded symbols for /lib/libm.so.6
Reading symbols from /lib/libgcc_s.so.1...(no debugging symbols found)...done.
Loaded symbols for /lib/libgcc_s.so.1
Reading symbols from /lib/libc.so.6...(no debugging symbols found)...done.
Loaded symbols for /lib/libc.so.6
Reading symbols from /usr/lib/libXpm.so.4...(no debugging symbols found)...done.
Loaded symbols for /usr/lib/libXpm.so.4
Reading symbols from /usr/lib/libX11.so.6...(no debugging symbols found)...done.
Loaded symbols for /usr/lib/libX11.so.6
Reading symbols from /usr/lib/libjpeg.so.62...(no debugging symbols found)...done.
Loaded symbols for /usr/lib/libjpeg.so.62
Reading symbols from /usr/lib/libfontconfig.so.1...(no debugging symbols found)...done.
Loaded symbols for /usr/lib/libfontconfig.so.1
Reading symbols from /usr/lib/libfreetype.so.6...(no debugging symbols found)...done.
Loaded symbols for /usr/lib/libfreetype.so.6
Reading symbols from /lib/libpng12.so.0...(no debugging symbols found)...done.
Loaded symbols for /lib/libpng12.so.0
Reading symbols from /lib64/ld-linux-x86-64.so.2...(no debugging symbols found)...done.
Loaded symbols for /lib64/ld-linux-x86-64.so.2
Reading symbols from /usr/lib/libxcb.so.1...(no debugging symbols found)...done.
Loaded symbols for /usr/lib/libxcb.so.1
Reading symbols from /lib/libexpat.so.1...(no debugging symbols found)...done.
Loaded symbols for /lib/libexpat.so.1
Reading symbols from /usr/lib/libXau.so.6...(no debugging symbols found)...done.
Loaded symbols for /usr/lib/libXau.so.6
Reading symbols from /usr/lib/libXdmcp.so.6...(no debugging symbols found)...done.
Loaded symbols for /usr/lib/libXdmcp.so.6
Core was generated by `../src/afkmud 7500'.
Program terminated with signal 11, Segmentation fault.
#0  0x00000000005bdb21 in goto_obj (ch=0x1b3f9d0, obj=0x1b162b0, argument=...)
    at build.cpp:932
932	   if( ch->pcdata && ch->pcdata->bamfout[0] )
(gdb) ^CQuit
(gdb) 
       
Post is unread #9 Feb 12, 2011, 2:37 am
Go to the top of the page
Go to the bottom of the page

trilioth
Fledgling
GroupMembers
Posts16
JoinedJan 27, 2011

Er. I thought it wouldn't be running after that last bit, but it was.

I tested it. And was able to log it, to my surprise.

I logging in and checked the terminal no new message. Then I entered bt into the terminal. Then I entered the damning command "goto hell" and this is what I saw:

(gdb) bt
#0  0x00000000005bdb21 in goto_obj (ch=0x1b3f9d0, obj=0x1b162b0, argument=...)
    at build.cpp:932
#1  0x00000000005be71a in do_goto (ch=0x1b3f9d0, argument=...)
    at build.cpp:1035
#2  0x000000000064d15d in interpret (ch=0x1b3f9d0, argument=...)
    at commands.cpp:814
#3  0x0000000000647260 in process_input () at comm.cpp:870
#4  0x0000000000647556 in game_loop () at comm.cpp:935
#5  0x0000000000648183 in main (argc=2, argv=0x7fffabda80d8) at comm.cpp:1342
(gdb) Segmentation fault (core dumped)

warning: Can't read pathname for load map: Input/output error.

#0  0x00000000005bdb21 in goto_obj (ch=0x1b3f9d0, obj=0x1b162b0, argument=...)
    at build.cpp:932
#1  0x00000000005be71a in do_goto (ch=0x1b3f9d0, argument=...)
    at build.cpp:1035
#2  0x000000000064d15d in interpret (ch=0x1b3f9d0, argument=...)
    at commands.cpp:814
#3  0x0000000000647260 in process_input () at comm.cpp:870
#4  0x0000000000647556 in game_loop () at comm.cpp:935
#5  0x0000000000648183 in main (argc=2, argv=0x7fffabda80d8) at comm.cpp:1342
(gdb) ^CQuit
(gdb) 
       
Post is unread #10 Feb 12, 2011, 9:40 am
Go to the top of the page
Go to the bottom of the page

Aurin
Magician
GroupMembers
Posts189
JoinedSep 5, 2010

While others in the community could probably figure this out without looking too closely at the functions involved, might help the rest of us learn if you could also post the associated functions for goto_obj and do_goto. :)
       
Post is unread #11 Feb 12, 2011, 10:23 am
Go to the top of the page
Go to the bottom of the page

Kayle
Off the Edge of the Map
GroupAdministrators
Posts1,195
JoinedMar 21, 2006

It looks to me like it's trying to load an overland map to check against, but not finding one. But I don't know AFKMud very well.
       
Post is unread #12 Feb 12, 2011, 8:07 pm
Go to the top of the page
Go to the bottom of the page

Zeno
Sorcerer
GroupMembers
Posts723
JoinedMar 5, 2005

Can you print ch->pcdata and ch->pcdata->bamfout and ch->pcdata->bamfout[0] in frame 0 for us?
       
Post is unread #13 Feb 13, 2011, 11:08 pm
Go to the top of the page
Go to the bottom of the page

trilioth
Fledgling
GroupMembers
Posts16
JoinedJan 27, 2011

build.cpp:932:   if( ch->pcdata && ch->pcdata->bamfout[0] )

build.cpp:1035:         goto_obj( ch, obj, arg );

This could get really long...
void goto_obj( char_data * ch, obj_data * obj, const string & argument )
{
   room_index *location;

   ch->set_color( AT_IMMORT );
   location = obj->in_room;

   if( !location && obj->carried_by )
      location = obj->carried_by->in_room;
   else  /* It's in a container, this becomes too much hassle to recursively locate */
   {
      ch->printf( "%s is inside a container. Try locating that container first.\r\n", argument.c_str(  ) );
      return;
   }

   if( !location )
   {
      bug( "%s: Object in NULL room!", __FUNCTION__ );
      return;
   }

   if( location->is_private(  ) )
   {
      if( ch->level < sysdata->level_override_private )
      {
         ch->print( "That room is private right now.\r\n" );
         return;
      }
      else
         ch->print( "Overriding private flag!\r\n" );
   }

   if( location->flags.test( ROOM_ISOLATED ) && ch->level < LEVEL_SUPREME )
   {
      ch->print( "Go away! That room has been sealed for privacy!\r\n" );
      return;
   }

   if( ch->fighting )
      ch->stop_fighting( true );

   /*
    * Bamfout processing by Altrag, installed by Samson 12-10-97 
    */
   if( ch->pcdata && ch->pcdata->bamfout[0] )  //<-----------------------------------------------------------------------------------------<<<
      act( AT_IMMORT, "$T", ch, NULL, bamf_print( ch->pcdata->bamfout, ch ).c_str(  ), TO_CANSEE );
   else
      act( AT_IMMORT, "$n vanishes suddenly into thin air.", ch, NULL, NULL, TO_CANSEE );

   leave_map( ch, NULL, location );

   /*
    * Bamfin processing by Altrag, installed by Samson 12-10-97 
    */
   if( ch->pcdata && ch->pcdata->bamfin[0] )
      act( AT_IMMORT, "$T", ch, NULL, bamf_print( ch->pcdata->bamfin, ch ).c_str(  ), TO_CANSEE );
   else
      act( AT_IMMORT, "$n appears suddenly out of thin air.", ch, NULL, NULL, TO_CANSEE );
}

CMDF( do_goto )
{
   string arg;
   room_index *location, *in_room;
   char_data *wch;
   obj_data *obj;
   area_data *pArea;
   int vnum;

   argument = one_argument( argument, arg );

   if( arg.empty(  ) )
   {
      ch->print( "Goto where?\r\n" );
      return;
   }

   /*
    * Begin Overland Map additions 
    */
   if( !str_cmp( arg, "map" ) )
   {
      string arg1, arg2;
      int x, y, map = -1;

      argument = one_argument( argument, arg1 );
      argument = one_argument( argument, arg2 );

      if( arg1.empty(  ) )
      {
         ch->print( "Goto which map??\r\n" );
         return;
      }

      if( !str_cmp( arg1, "one" ) )
         map = ACON_ONE;

      if( map == -1 )
      {
         ch->printf( "There isn't a map for '%s'.\r\n", arg1.c_str(  ) );
         return;
      }

      if( arg2.empty(  ) && argument.empty(  ) )
      {
         enter_map( ch, NULL, 499, 499, map );
         return;
      }

      if( arg2.empty(  ) || argument.empty(  ) )
      {
         ch->print( "Usage: goto map <mapname> <X> <Y>\r\n" );
         return;
      }

      x = atoi( arg2.c_str(  ) );
      y = atoi( argument.c_str(  ) );

      if( x < 0 || x >= MAX_X )
      {
         ch->printf( "Valid x coordinates are 0 to %d.\r\n", MAX_X - 1 );
         return;
      }

      if( y < 0 || y >= MAX_Y )
      {
         ch->printf( "Valid y coordinates are 0 to %d.\r\n", MAX_Y - 1 );
         return;
      }

      enter_map( ch, NULL, x, y, map );
      return;
   }
   /*
    * End of Overland Map additions 
    */

   if( !is_number( arg ) )
   {
      if( ( wch = ch->get_char_world( arg ) ) != NULL && wch->in_room != NULL )
      {
         goto_char( ch, wch, arg );
         return;
      }

      if( ( obj = ch->get_obj_world( arg ) ) != NULL )
      {
         goto_obj( ch, obj, arg ); //<---------------------------------------------------------------------------------------------------<<<
         return;
      }
   }

   if( !( location = ch->find_location( arg ) ) )
   {
      vnum = atoi( arg.c_str(  ) );
      if( vnum < 0 || get_room_index( vnum ) )
      {
         ch->print( "You cannot find that...\r\n" );
         return;
      }

      if( ch->get_trust(  ) < LEVEL_CREATOR || vnum < 1 || ch->isnpc(  ) || !ch->pcdata->area )
      {
         ch->print( "No such location.\r\n" );
         return;
      }

      if( ch->get_trust(  ) < sysdata->level_modify_proto )
      {
         if( !ch->pcdata || !( pArea = ch->pcdata->area ) )
         {
            ch->print( "You must have an assigned area to create rooms.\r\n" );
            return;
         }
         if( vnum < pArea->low_vnum || vnum > pArea->hi_vnum )
         {
            ch->print( "That room is not within your assigned range.\r\n" );
            return;
         }
      }
      if( vnum < 1 || vnum > sysdata->maxvnum )
      {
         ch->printf( "Invalid vnum. Allowable range is 1 to %d\r\n", sysdata->maxvnum );
         return;
      }
      location = make_room( vnum, ch->pcdata->area );
      if( !location )
      {
         bug( "%s: failed", __FUNCTION__ );
         return;
      }
      ch->print( "&WWaving your hand, you form order from swirling chaos,\r\nand step into a new reality...\r\n" );
   }

   if( location->is_private(  ) )
   {
      if( ch->level < sysdata->level_override_private )
      {
         ch->print( "That room is private right now.\r\n" );
         return;
      }
      else
         ch->print( "Overriding private flag!\r\n" );
   }

   if( location->flags.test( ROOM_ISOLATED ) && ch->level < LEVEL_SUPREME )
   {
      ch->print( "Go away! That room has been sealed for privacy!\r\n" );
      return;
   }

   in_room = ch->in_room;
   if( ch->fighting )
      ch->stop_fighting( true );

   /*
    * Bamfout processing by Altrag, installed by Samson 12-10-97 
    */
   if( ch->pcdata && ch->pcdata->bamfout && ch->pcdata->bamfout[0] != '\0' )
      act( AT_IMMORT, "$T", ch, NULL, bamf_print( ch->pcdata->bamfout, ch ).c_str(  ), TO_CANSEE );
   else
      act( AT_IMMORT, "$n vanishes suddenly into thin air.", ch, NULL, NULL, TO_CANSEE );

   /*
    * It's assumed that if you've come this far, it's a room vnum you entered 
    */
   leave_map( ch, NULL, location );

   if( ch->pcdata && ch->pcdata->bamfin && ch->pcdata->bamfin[0] != '\0' )
      act( AT_IMMORT, "$T", ch, NULL, bamf_print( ch->pcdata->bamfin, ch ).c_str(  ), TO_CANSEE );
   else
      act( AT_IMMORT, "$n appears suddenly out of thin air.", ch, NULL, NULL, TO_CANSEE );
}
       
Post is unread #14 Feb 13, 2011, 11:09 pm
Go to the top of the page
Go to the bottom of the page

trilioth
Fledgling
GroupMembers
Posts16
JoinedJan 27, 2011

Zeno said:

Can you print ch->pcdata and ch->pcdata->bamfout and ch->pcdata->bamfout[0] in frame 0 for us?

I am not sure what you are asking me to do, Zeno.
       
Post is unread #15 Feb 13, 2011, 11:22 pm   Last edited Feb 13, 2011, 11:25 pm by trilioth
Go to the top of the page
Go to the bottom of the page

trilioth
Fledgling
GroupMembers
Posts16
JoinedJan 27, 2011

@Zeno: Surely there is more to what you ask...
(gdb) frame 0
#0  0x00000000005bdb21 in goto_obj (ch=0x1b3f9d0, obj=0x1b162b0, argument=...)
    at build.cpp:932
932	   if( ch->pcdata && ch->pcdata->bamfout[0] )


Edit: I have never used gdb before this. That is to say I am not familiar with it.
       
Post is unread #16 Feb 13, 2011, 11:40 pm
Go to the top of the page
Go to the bottom of the page

trilioth
Fledgling
GroupMembers
Posts16
JoinedJan 27, 2011

Is this it?
(gdb) print ch->pcdata
$1 = (pc_data *) 0x1b21490
(gdb) print ch
$2 = (char_data *) 0x1b14b30
(gdb) print ch->pcdata->bamfout
$3 = 0x0
(gdb) print ch->pcdata->bamfout[0]
Cannot access memory at address 0x0

       
Post is unread #17 Feb 14, 2011, 12:05 am   Last edited Feb 14, 2011, 12:06 am by Aurin
Go to the top of the page
Go to the bottom of the page

Aurin
Magician
GroupMembers
Posts189
JoinedSep 5, 2010

in goto_obj:
if( ch->pcdata && ch->pcdata->bamfout[0] )

perhaps it should match do_goto's bamfout check?:
if( ch->pcdata && ch->pcdata->bamfout && ch->pcdata->bamfout[0] != '\0' )

The way I see it, and I could be wrong, is that if you "goto hell" and it reverts
to goto_obj check, while your bamfout is null, it will still perform the check,
which will crash the mud on ya.

that said, you might also want to check the bamfin part, as that could lead to issues as well.
       
Post is unread #18 Feb 15, 2011, 3:21 pm
Go to the top of the page
Go to the bottom of the page

Conner
Sorcerer
GroupMembers
Posts870
JoinedMay 8, 2005

trilioth said:

Is this it?

(gdb) print ch->pcdata

$1 = (pc_data *) 0x1b21490

(gdb) print ch

$2 = (char_data *) 0x1b14b30

(gdb) print ch->pcdata->bamfout

$3 = 0x0

(gdb) print ch->pcdata->bamfout[0]

Cannot access memory at address 0x0

Yup, that's what he was asking you to do. 0x0 equates to null, which means your bamfout was set to null (not just nothing or blank, but actually unset), which leads us to Aurin's advice. ;)
       
Post is unread #19 Feb 15, 2011, 3:53 pm
Go to the top of the page
Go to the bottom of the page

Aurin
Magician
GroupMembers
Posts189
JoinedSep 5, 2010

Conner said:


Yup, that's what he was asking you to do. 0x0 equates to null, which means your bamfout was set to null (not just nothing or blank, but actually unset), which leads us to Aurin's advice. ;)

Sweet! I was actually more or less right, and helpful! :P I learneded something. ;)
       
Pages:<< prev 1 next >>