Login
User Name:

Password:



Register
Forgot your password?
Vote for Us!
tintin++ ogg sound player script for linux
Author: Robert Smith
Submitted by: Vladaar
6Dragons ogg Soundpack
Author: Vladaar
Submitted by: Vladaar
6Dragons 4.4
Author: Vladaar
Submitted by: Vladaar
LoP 1.46
Author: Remcon
Submitted by: Remcon
LOP 1.45
Author: Remcon
Submitted by: Remcon
Users Online
CommonCrawl, Yandex

Members: 0
Guests: 10
Stats
Files
Topics
Posts
Members
Newest Member
481
3,734
19,366
618
Micheal64X
Today's Birthdays
Vintar (28)
Related Links
» SmaugMuds.org » Codebases » AFKMud Support & Development » Segfault with new continents
Forum Rules | Mark all | Recent Posts

Segfault with new continents
< Newer Topic :: Older Topic >

Pages:<< prev 1 next >>
Post is unread #1 Jan 4, 2007, 12:21 pm
Go to the top of the page
Go to the bottom of the page

N_Yo_FACE

GroupMembers
Posts15
JoinedJan 8, 2003

I decided to try adding some new continents to the MUD. I just basically copied the one.* files as two.*, three.*, and 4.*. After following the instructions in the Newcontinent.txt file and recompiling, everything went smoothly. I could access each different map, etc...

Unfortunetally, when it comes to setting an area to one of the other continents, the MUD segfaults. Session just disconnects, and server console says "Segmentation Fault", no details. Same thing when manually editing an area file to refer to a different continent. Upon loading, server segfaults. If I had more details to give, I would, but alas, I am clueless here (not unusually seeing my experiance with C++, or even C. LoL). Thanks in advance for any help with this issue. :)
       
Post is unread #2 Jan 5, 2007, 8:03 am
Go to the top of the page
Go to the bottom of the page

N_Yo_FACE

GroupMembers
Posts15
JoinedJan 8, 2003

Since learning about this wonderful tool called gdb, I've been able to get the following regarding the segfault:

Program received signal SIGSEGV, Segmentation fault.
0x00000000005cb0f5 in str_cmp (astr=0x7fffffd94040 "two", bstr=0x72724100746c6f42 <Address 0x72724100746c6f42 out of bounds>;) at editor.cpp:397
397 if( LOWER( *astr ) != LOWER( *bstr ) )
(gdb) backtrace
#0 0x00000000005cb0f5 in str_cmp (astr=0x7fffffd94040 "two", bstr=0x72724100746c6f42 <Address 0x72724100746c6f42 out of bounds>;) at editor.cpp:397
#1 0x000000000054cc65 in get_continent (continent=0x7fffffd94040 "two";) at build.cpp:620
#2 0x00000000005121e5 in do_aset (ch=0x1004090, argument=0x7fffffd96acd "";) at area.cpp:4655
#3 0x000000000059fe51 in interpret (ch=0x1004090, argument=0x7fffffd96ab5 "siward.are continent two";) at commands.cpp:1563
#4 0x000000000059360e in process_input () at comm.cpp:867
#5 0x0000000000593bde in game_loop () at comm.cpp:932
#6 0x0000000000594763 in main (argc=1, argv=0x7fffffd97478) at comm.cpp:1346
(gdb) frame 0
#0 0x00000000005cb0f5 in str_cmp (astr=0x7fffffd94040 "two", bstr=0x72724100746c6f42 <Address 0x72724100746c6f42 out of bounds>;) at editor.cpp:397
397 if( LOWER( *astr ) != LOWER( *bstr ) )
(gdb) frame 1
#1 0x000000000054cc65 in get_continent (continent=0x7fffffd94040 "two";) at build.cpp:620
620 if( !str_cmp( continent, continents[x] ) )
(gdb) frame 2
#2 0x00000000005121e5 in do_aset (ch=0x1004090, argument=0x7fffffd96acd "";) at area.cpp:4655
4655 value = get_continent( arg2 );
(gdb) frame 3
#3 0x000000000059fe51 in interpret (ch=0x1004090, argument=0x7fffffd96ab5 "siward.are continent two";) at commands.cpp:1563
1563 ( *cmd->do_fun ) ( ch, argument );
(gdb) frame 4
#4 0x000000000059360e in process_input () at comm.cpp:867
867 interpret( d->character, cmdline );
(gdb) frame 5
#5 0x0000000000593bde in game_loop () at comm.cpp:932
932 process_input();
(gdb) frame 6
#6 0x0000000000594763 in main (argc=1, argv=0x7fffffd97478) at comm.cpp:1346
1346 game_loop( );

I *sooo* gotta learn C and C++. LoL
       
Post is unread #3 Jan 5, 2007, 11:09 am
Go to the top of the page
Go to the bottom of the page

Samson
Black Hand
GroupAdministrators
Posts3,643
JoinedJan 1, 2002

Hmm. That looks like the buffer overflowed. Or there's no actual continent value for "two" which means I may have missed something in the docs. I'll have to check that later after I get home from work.
       
Post is unread #4 Jan 5, 2007, 7:36 pm
Go to the top of the page
Go to the bottom of the page

Samson
Black Hand
GroupAdministrators
Posts3,643
JoinedJan 1, 2002

Ok, it looks like a step was missed in documenting for a new continent.

In build.cpp, locate this:
/* Area continent table for continent/plane system */
char *const continents[] = {
   "one", "astral", "immortal"
};


And add your new continent name in the appropriate spot in the list. This should go after step #5 in the procedure. A docs fix has been committed for this.
       
Pages:<< prev 1 next >>