Register forum user name Search FAQ

Gammon Forum

Notice: Any messages purporting to come from this site telling you that your password has expired, or that you need to verify your details, confirm your email, resolve issues, making threats, or asking for money, are spam. We do not email users with any such messages. If you have lost your password you can obtain a new one by using the password reset link.

Due to spam on this forum, all posts now need moderator approval.

 Entire forum ➜ MUDs ➜ General ➜ My mud will not start ??!!!??? (fixed)

My mud will not start ??!!!??? (fixed)

It is now over 60 days since the last post. This thread is closed.     Refresh page


Pages: 1  2 3  

Posted by Hanaisse   Canada  (114 posts)  Bio
Date Reply #15 on Sun 06 Dec 2009 12:35 AM (UTC)
Message
Generally logs are in the log folder..

I think at this point you'll want to run gdb for more accurate results.

aka: Hana
Owner in Training of: Fury of the Gods
alm-dev.org:4000
Top

Posted by Dextermovies   (65 posts)  Bio
Date Reply #16 on Sun 06 Dec 2009 12:35 AM (UTC)
Message
What is gdb ?
Top

Posted by Hanaisse   Canada  (114 posts)  Bio
Date Reply #17 on Sun 06 Dec 2009 12:37 AM (UTC)
Message
Template:post=3653 Please see the forum thread: http://gammon.com.au/forum/?id=3653.

aka: Hana
Owner in Training of: Fury of the Gods
alm-dev.org:4000
Top

Posted by Nick Cash   USA  (626 posts)  Bio
Date Reply #18 on Sun 06 Dec 2009 12:48 AM (UTC)
Message
Hanaisse is right, gdb will probably lead you to the answer quickly if you can follow the tutorial and use it effectively. Essentially, you need to figure out why you are failing to read a particular file. Without your boot log there is no way for us to determine what file that might be.

Have you added any fread_word() function calls, or modified the saving/loading of any particular object (mobs, classes, system data, etc)? If not, it seems likely you have corrupted some data somewhere that gets saved, though having filenames and an idea of what you changed would be the best. What commands did you add?

~Nick Cash
http://www.nick-cash.com
Top

Posted by Dextermovies   (65 posts)  Bio
Date Reply #19 on Sun 06 Dec 2009 01:03 AM (UTC)
Message
setfdb,loadfdb,savefdb,testarm and distort .. all wiz commands..
Top

Posted by Dextermovies   (65 posts)  Bio
Date Reply #20 on Sun 06 Dec 2009 01:37 AM (UTC)

Amended on Sun 06 Dec 2009 01:47 AM (UTC) by Dextermovies

Message
Ok, I can not get it to create a core dump :( I added the -g3 to the l_flags and c_flags .. Am I missing something ?

I alos editied the etc/secturity/limits.conf and added * soft core 10000 to it to allow for large core dumps, then I loged out and back in to make the change stick.
Top

Posted by Hanaisse   Canada  (114 posts)  Bio
Date Reply #21 on Sun 06 Dec 2009 01:56 AM (UTC)
Message
Did you make clean?

Are you saying the error during startup is not producing any core files? They'll be in your main folder /Dystopia/ (or whatever it is.

Did you find the log files yet?

aka: Hana
Owner in Training of: Fury of the Gods
alm-dev.org:4000
Top

Posted by Dextermovies   (65 posts)  Bio
Date Reply #22 on Sun 06 Dec 2009 07:24 AM (UTC)
Message
Nope no log files, all it says is

(gdb) run file Dystopia
Starting program: /home/Josh/Desktop/dystopia2/src/Dystopia file Dystopia
[Thread debugging using libthread_db enabled]
Usage: /home/Josh/Desktop/dystopia2/src/Dystopia [port #]

Program exited with code 01.



I have done make clean and make distclean.
Top

Posted by Nick Gammon   Australia  (23,140 posts)  Bio   Forum Administrator
Date Reply #23 on Sun 06 Dec 2009 08:39 AM (UTC)

Amended on Sun 06 Dec 2009 08:42 AM (UTC) by Nick Gammon

Message
You got an error message because you ran it with the arguments "file Dystopia" when it is expecting a port number.

What I normally do to debug is, change to the area directory, and then do gdb, like this:


cd ../area              # it needs to run in the area directory
gdb ../src/Dystopia     # or whatever the executable is

(gdb) run 4000          # run with port 4000



See: http://www.gammon.com.au/gdb

- Nick Gammon

www.gammon.com.au, www.mushclient.com
Top

Posted by Dextermovies   (65 posts)  Bio
Date Reply #24 on Sun 06 Dec 2009 11:46 AM (UTC)
Message
I still get the same thing ...


[Josh@localhost area]$ gdb ../src/Dystopia
GNU gdb (GDB) Fedora (7.0-8.fc12)
Copyright (C) 2009 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 "i686-redhat-linux-gnu".
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>...
Reading symbols from /home/Josh/Desktop/dystopia2/src/Dystopia...done.
(gdb) run 4000
Starting program: /home/Josh/Desktop/dystopia2/src/Dystopia 4000
[Thread debugging using libthread_db enabled]

Program exited with code 01.
(gdb) 
Top

Posted by Dextermovies   (65 posts)  Bio
Date Reply #25 on Sun 06 Dec 2009 04:16 PM (UTC)
Message
Issue found I think..
In the other code fread_number is defined as
unsigned long long int	fread_number	args( ( FILE *fp ) ); 


But in the dystopia 2 code it is defined as
int   fread_number       (FILE * fp); 


Now if I change the code from the old mud to
unsigned long long int	fread_number	( FILE *fp ); 

I get

db.c:2268: error: conflicting types for ‘fread_number’
dystopia.h:3969: note: previous declaration of ‘fread_number’ was here


Any help here is greatly appreciated
Top

Posted by Zeno   USA  (2,871 posts)  Bio
Date Reply #26 on Sun 06 Dec 2009 05:51 PM (UTC)
Message
Code 01 means the code is executing exit(1) somewhere.

Is this log still showing up?
Dec 5 12:52:56 :: [*****] BUG: Fread_word: word 'ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ' too long.

Zeno McDohl,
Owner of Bleached InuYasha Galaxy
http://www.biyg.org
Top

Posted by Nick Gammon   Australia  (23,140 posts)  Bio   Forum Administrator
Date Reply #27 on Sun 06 Dec 2009 07:53 PM (UTC)
Message
In your case gdb didn't show much because the MUD didn't actually crash, it chose to exit, as Zeno said. If you haven't found the problem, you can still find why it calls exit. First make your own exit function:


void my_exit (int status)
  {
  exit (status);
  }


And put a function prototype in mud.h or whatever it is called:



void my_exit (int status);


Then go through the rest of the code (using grep will help) and change every instance of:


exit (1);


to:


my_exit (1);


(And of course any other numbers you find).

Just don't change the one inside my_exit. ;P

Then fire up gdb again, and before typing "run" type in "break my_exit". That will put a breakpoint on your my_exit function. Then type "run" or "run 4000" and let it rip. Then when it tries to exit it will end up in my_exit. Then type "bt" to get a backtrace to see exactly where in the code it is calling exit.

- Nick Gammon

www.gammon.com.au, www.mushclient.com
Top

Posted by Dextermovies   (65 posts)  Bio
Date Reply #28 on Sun 06 Dec 2009 10:04 PM (UTC)
Message
Now I get These errors while compiling the source

[12:00:59] Linking executable ...
obj/act_info.o: In function `my_exit':
/home/Josh/Desktop/dystopia2/src/dystopia.h:2600: multiple definition of `my_exit'
obj/act_comm.o:/home/Josh/Desktop/dystopia2/src/dystopia.h:2600: first defined here
obj/act_move.o: In function `my_exit':
/home/Josh/Desktop/dystopia2/src/dystopia.h:2600: multiple definition of `my_exit'
obj/act_comm.o:/home/Josh/Desktop/dystopia2/src/dystopia.h:2600: first defined here
obj/act_comm.o:/home/Josh/Desktop/dystopia2/src/dystopia.h:2600: first defined here
collect2: ld returned 1 exit status
make: *** [Dystopia] Error 1
[Josh@localhost src]$ 

There are several more of these.
Top

Posted by Nick Gammon   Australia  (23,140 posts)  Bio   Forum Administrator
Date Reply #29 on Sun 06 Dec 2009 10:17 PM (UTC)
Message
Put the actual function (my first box) only once in the code (eg. comms.c) otherwise the linker will complain it finds more than one of them. The function prototype I mentioned, which you put in your .h file, tells the other functions to expect it to be found at link time.

- Nick Gammon

www.gammon.com.au, www.mushclient.com
Top

The dates and times for posts above are shown in Universal Co-ordinated Time (UTC).

To show them in your local time you can join the forum, and then set the 'time correction' field in your profile to the number of hours difference between your location and UTC time.


98,268 views.

This is page 2, subject is 3 pages long:  [Previous page]  1  2 3  [Next page]

It is now over 60 days since the last post. This thread is closed.     Refresh page

Go to topic:           Search the forum


[Go to top] top

Information and images on this site are licensed under the Creative Commons Attribution 3.0 Australia License unless stated otherwise.