
Pages:<< prev 1 next >>


Fledgling

GroupMembers
Posts19
JoinedJan 10, 2010
Ok, here's a bit of background.
Successfully run a SmaugFUSS server on Ubuntu 10 (Lucid). At the request of players I've decided to upgrade and begin a new world on AFKMud (mainly for the features and abilities). However I am running into some issues during compiling.
During the make process I get the following warnings:
Now aside of those upon compiling, everything works fine. I can load the MUD and telnet in without any issue, including admin/admin. However though; When I create a new character I get buffer overflows. I'm pretty sure it's due to the errors but I'm not 100%.
I have searched and found gdb and valgrind solutions (kind of) unfortunately gdb and valgrind don't work, or I'm still a bit linux retarded.
Any help is appreciated. All I need to do is get running without crashing and from there I'm golden.
Successfully run a SmaugFUSS server on Ubuntu 10 (Lucid). At the request of players I've decided to upgrade and begin a new world on AFKMud (mainly for the features and abilities). However I am running into some issues during compiling.
During the make process I get the following warnings:
Compiling o/boards.o.... boards.cpp: In function ‘void load_boards()’: boards.cpp:1132: warning: ignoring return value of ‘int system(const char*)’, declared with attribute warn_unused_result Compiling o/build.o....
Compiling o/comm.o.... comm.cpp: In function ‘void directory_check()’: comm.cpp:234: warning: ignoring return value of ‘int chdir(const char*)’, declared with attribute warn_unused_result comm.cpp:241: warning: ignoring return value of ‘int chdir(const char*)’, declared with attribute warn_unused_result comm.cpp:242: warning: ignoring return value of ‘int system(const char*)’, declared with attribute warn_unused_result Compiling o/commands.o....
Compiling o/hotboot.o.... hotboot.cpp: In function ‘void hotboot_recover()’: hotboot.cpp:792: warning: ignoring return value of ‘int fscanf(FILE*, const char*, ...)’, declared with attribute warn_unused_result Compiling o/imm_host.o....
Compiling o/object.o.... new_auth.cpp: In function ‘void name_generator(std::string&)’: new_auth.cpp:76: warning: ignoring return value of ‘char* fgets(char*, int, FILE*)’, declared with attribute warn_unused_result new_auth.cpp:80: warning: ignoring return value of ‘char* fgets(char*, int, FILE*)’, declared with attribute warn_unused_result new_auth.cpp:86: warning: ignoring return value of ‘char* fgets(char*, int, FILE*)’, declared with attribute warn_unused_result new_auth.cpp:93: warning: ignoring return value of ‘char* fgets(char*, int, FILE*)’, declared with attribute warn_unused_result new_auth.cpp:100: warning: ignoring return value of ‘char* fgets(char*, int, FILE*)’, declared with attribute warn_unused_result new_auth.cpp: In function ‘void pick_name(std::string&, const char*)’: new_auth.cpp:146: warning: ignoring return value of ‘char* fgets(char*, int, FILE*)’, declared with attribute warn_unused_result new_auth.cpp:150: warning: ignoring return value of ‘char* fgets(char*, int, FILE*)’, declared with attribute warn_unused_result new_auth.cpp:155: warning: ignoring return value of ‘char* fgets(char*, int, FILE*)’, declared with attribute warn_unused_result Compiling o/objindex.o....
Compiling o/pfiles.o.... pfiles.cpp: In function ‘void do_pfiles(char_data*, std::string)’: pfiles.cpp:854: warning: ignoring return value of ‘int system(const char*)’, declared with attribute warn_unused_result pfiles.cpp: In function ‘void check_pfiles(time_t)’: pfiles.cpp:907: warning: ignoring return value of ‘int system(const char*)’, declared with attribute warn_unused_result Compiling o/player.o....
Now aside of those upon compiling, everything works fine. I can load the MUD and telnet in without any issue, including admin/admin. However though; When I create a new character I get buffer overflows. I'm pretty sure it's due to the errors but I'm not 100%.
I have searched and found gdb and valgrind solutions (kind of) unfortunately gdb and valgrind don't work, or I'm still a bit linux retarded.
Any help is appreciated. All I need to do is get running without crashing and from there I'm golden.



Sorcerer

GroupMembers
Posts902
JoinedJan 29, 2007
What do you mean by buffer overflows?
The warnings might or might not be related to whatever error you're seeing. The warnings are saying that you are improperly ignoring the return value of a function, which might be using its return value to alert you to some problem.
What doesn't work about valgrind? I would strongly recommend that you run this through valgrind; it's usually the fastest way to track down memory problems. Perhaps you simply need to install valgrind: sudo aptitude install valgrind
The warnings might or might not be related to whatever error you're seeing. The warnings are saying that you are improperly ignoring the return value of a function, which might be using its return value to alert you to some problem.
What doesn't work about valgrind? I would strongly recommend that you run this through valgrind; it's usually the fastest way to track down memory problems. Perhaps you simply need to install valgrind: sudo aptitude install valgrind


Black Hand

GroupAdministrators
Posts3,708
JoinedJan 1, 2002
Those all appear to be the result of some new gcc warning, what version of gcc are you using on that system?
None of that should be generating buffer overflows though. You'll definitely need to get Valgrind working to pin that one down.
None of that should be generating buffer overflows though. You'll definitely need to get Valgrind working to pin that one down.



Geomancer

GroupAdministrators
Posts1,992
JoinedJul 26, 2005
I tried it in cygwin and had no problems out of any of it.
I did notice one odd thing though Samson, when I created a new character I never got past the room where you could say reset to start over. Maybe I missed something but didn't see any way out of it for a new character.
I did notice one odd thing though Samson, when I created a new character I never got past the room where you could say reset to start over. Maybe I missed something but didn't see any way out of it for a new character.



Sorcerer

GroupMembers
Posts902
JoinedJan 29, 2007
It's unlikely that the game would work fine with one compiler and crash with another. (It is however likely that different versions will give different warnings.) That's why I'm curious to know what exactly is going wrong and how to OP is using the term "buffer overflow".

Black Hand

GroupAdministrators
Posts3,708
JoinedJan 1, 2002
Ah, yeah. AFKMud didn't come with the newbie zones before and I forgot to connect the chargen zone to it when they got added.
Also just recompiled the base and have no issues with gcc 4.4.4.
Also just recompiled the base and have no issues with gcc 4.4.4.


Fledgling

GroupMembers
Posts19
JoinedJan 10, 2010
Ok, got my issue resolved. Not the way I'd have liked to, but it worked and will require very little learning curve. I scratched Ubuntu as my server and loaded the latest of Fedora. Gathered my required packages and successfully achieved a clean make.
I did receive an error
However, opening in gedit and resaving as Linux rather than Windows line end I was able to achieve this:
I left the default port of 7500, adjusted the port forwarding on the router (which shouldn't matter as I'm going direct to the machine at the moment) and disabled Fedora's firewall.
However, trying to connect to my server locally (via local IP 192.168.1.104) (Just tried via dyndns url pointing at my current IP and same result) (And just tried via the server machine telnet on localserver, still same result) I get a "connection refused" return in my client. I also ran a port scan to determine if port 7500 was open or not and it does not appear so.
I'm learning the intricacies of Fedora over Ubuntu right now, so it is possible I'm missing something again... any advice? I'm not sure if the problem is lying on the startup script actually not starting, or an error in my network (which I understand would be outside the scope of support here), So close now, yet seemingly still far away :-(
I did receive an error
[root@server src]# ./startup & [1] 2216 'root@server src]# Unknown option: `- Usage: csh [ -bcdefilmnqstvVxX ] [ argument ... ]. [1]+ Exit 1 ./startup
However, opening in gedit and resaving as Linux rather than Windows line end I was able to achieve this:
[root@server src]# ./startup & [1] 11300 [root@server src]#
I left the default port of 7500, adjusted the port forwarding on the router (which shouldn't matter as I'm going direct to the machine at the moment) and disabled Fedora's firewall.
However, trying to connect to my server locally (via local IP 192.168.1.104) (Just tried via dyndns url pointing at my current IP and same result) (And just tried via the server machine telnet on localserver, still same result) I get a "connection refused" return in my client. I also ran a port scan to determine if port 7500 was open or not and it does not appear so.
I'm learning the intricacies of Fedora over Ubuntu right now, so it is possible I'm missing something again... any advice? I'm not sure if the problem is lying on the startup script actually not starting, or an error in my network (which I understand would be outside the scope of support here), So close now, yet seemingly still far away :-(


Black Hand

GroupAdministrators
Posts3,708
JoinedJan 1, 2002
If you do a ps ux do you see your process listed there? If so then the startup worked and the MUD is running. Which would mean there's something funky going on in your network setup.
If it's not on the process list then something is preventing it from starting and you should be able to find some reason why in the logs directory.
If it's not on the process list then something is preventing it from starting and you should be able to find some reason why in the logs directory.



Fledgling

GroupMembers
Posts19
JoinedJan 10, 2010
I did not try ps ux but it was listed under ps x. That's what I figured. Thanks for the help. Off to figure out WTF the hangup is, ssh, apache, FTP all open, thanks again Samson





Fledgling

GroupMembers
Posts19
JoinedJan 10, 2010
Sooo....found my problem.
I read the logs, and saw this:
So, lesson learned... I was a moron haha logged as normal user without sudo permissions, ran ./startup & and wouldn't you know it, worked!
For future people that seem to have a running mud but inability to telnet into the MUD... log off root and log into your server as a normal user and run the script.
Thank you again for the help guys. In regards to the buffer overflows I mentioned at the start... what would happen is I'd create a new character, but the moment I'd log in to create race/class it would throw buffer over flow messages into my SSH window and shut the mud down... still not sure why, but switching to Fedora from Ubuntu solved that issue.
-Daygon the Non-Log reading Moron who runs as Root.
I read the logs, and saw this:
Warning, you are a moron. Do not run as root.
So, lesson learned... I was a moron haha logged as normal user without sudo permissions, ran ./startup & and wouldn't you know it, worked!
For future people that seem to have a running mud but inability to telnet into the MUD... log off root and log into your server as a normal user and run the script.
Thank you again for the help guys. In regards to the buffer overflows I mentioned at the start... what would happen is I'd create a new character, but the moment I'd log in to create race/class it would throw buffer over flow messages into my SSH window and shut the mud down... still not sure why, but switching to Fedora from Ubuntu solved that issue.
-Daygon the Non-Log reading Moron who runs as Root.


Black Hand

GroupAdministrators
Posts3,708
JoinedJan 1, 2002
lol, Darien's code finally got to see some use

Pages:<< prev 1 next >>