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, DotBot, Bing

Members: 0
Guests: 8
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 » AFKMud compiles on Cygwin, bu...
Forum Rules | Mark all | Recent Posts

AFKMud compiles on Cygwin, but won't run
< Newer Topic :: Older Topic >

Pages:<< prev 1 next >>
Post is unread #1 Mar 14, 2008, 5:56 pm
Go to the top of the page
Go to the bottom of the page

Trengei
Fledgling
GroupMembers
Posts7
JoinedMar 14, 2008

Okay, I'm quite new to AFKMud, so this is probably a very newbish question.
I've managed to get AFKMud (2.0) to compile through cygwin, after a bit of trouble with libgd. However, gets an error whenever I go to run it. The output looks something like this:
/cygdrive/c/afkmud20/area
$ ../area/afkmud.exe
Sat Mar 15, 2008 11:39:02 AM AUSEDT::Booting Database
...
Sat Mar 15, 2008 11:39:05 AM AUSEDT::Loading auction houses...
Sat Mar 15, 2008 11:39:05 AM AUSEDT::Loading clan/guild shops...
       19[main] afkmud 3620 _cygtls::handle_exceptions: Error while dumping state (probably corrupted stack)
Segmentation fault (core dumped)

Any ideas on what's gone wrong? I've noticed that 3620 tends to change every time I attempt to run it, incase that's meaningful.

By the way, I have very little experience with C++ (although I have had experience with a few other languages), and I also have smaugfuss working on this computer, if all else fails, I'll just go back to it.
       
Post is unread #2 Mar 14, 2008, 9:58 pm
Go to the top of the page
Go to the bottom of the page

Zeno
Sorcerer
GroupMembers
Posts723
JoinedMar 5, 2005

Use gdb to see what is happening.
       
Post is unread #3 Mar 15, 2008, 1:20 pm
Go to the top of the page
Go to the bottom of the page

Trengei
Fledgling
GroupMembers
Posts7
JoinedMar 14, 2008

Okay, so just running through GBD gives me this:
Sat Mar 15, 2008 11:39:05 AM AUSEDT::Loading clan/guild shops...
    20 [main] afkmud 3640 _cygtls::handle_exceptions: Exception : STATUS_ACCESS_VIOLATION
  1754 [main] afkmud 3640 open_stackdumpfile: Dumping stack trace to afkmud.exe.stackdump
727912 [main] afkmud 3640 _cygtls::handle_exceptions: Exception: STATUS_ACCESS_VIOLATION
745292 [main] afkmud 3640 _cygtls::handle_exceptions: Error while dumping state (probably corrupted stack)

Program recieved signal SIGSEGV, Segmentation fault.
0x6101165b3 in stack_info::walk () from /user/bin/cygwin1.dll
       
Post is unread #4 Mar 15, 2008, 7:59 pm
Go to the top of the page
Go to the bottom of the page

David Haley
Sorcerer
GroupMembers
Posts903
JoinedJan 29, 2007

You could try checking out the gdb backtrace, but if your stack is corrupted that won't be terribly helpful. If indeed the stack is corrupted, the best way to find that is by using valgrind. I'm not sure if valgrind is available for Cygwin, though...
       
Post is unread #5 Mar 15, 2008, 10:07 pm
Go to the top of the page
Go to the bottom of the page

Trengei
Fledgling
GroupMembers
Posts7
JoinedMar 14, 2008

Okay, thanks. Will try sometime
       
Post is unread #6 Mar 20, 2008, 5:30 pm
Go to the top of the page
Go to the bottom of the page

Samson
Black Hand
GroupAdministrators
Posts3,639
JoinedJan 1, 2002

It would be helpful to see the entire backtrace on this. What you've shown us is only enough to speculate that perhaps the Cygwin installation itself isn't quite right, since Frame 0 indicates a fault in the cygwin1.dll file.

Valgrind is also not supported on Cygwin so that option isn't available.
       
Post is unread #7 Mar 20, 2008, 7:17 pm
Go to the top of the page
Go to the bottom of the page

Trengei
Fledgling
GroupMembers
Posts7
JoinedMar 14, 2008

Okay,
(gdb) backtrace
#0 0x610165b3 in stack_info::walk () from /usr/bin/cygwin1.dll
#1 0x7c859dcc in OutputDebugStringA () from /cygdrive/c/WINDOWS/system32/kernel32.dll
#2 0x40010006 in ?? ()
#3 0x00000000 in ?? ()

Hope that helps
       
Post is unread #8 Mar 20, 2008, 9:52 pm
Go to the top of the page
Go to the bottom of the page

Samson
Black Hand
GroupAdministrators
Posts3,639
JoinedJan 1, 2002

Unfortunately not. The only thing it does is confirm that the stack is corrupted, as David suspected.

Were you doing anything specific that might have led to it? Do you have access to a linux box by chance that has Valgrind installed?
       
Post is unread #9 Mar 21, 2008, 1:17 am
Go to the top of the page
Go to the bottom of the page

Trengei
Fledgling
GroupMembers
Posts7
JoinedMar 14, 2008

All I had done was compile and run. I tried cleaning, but that made no difference.
I do have a linux box, although its a fairly clean install, and I don't think it has the right packages. Would compiling through it be my best bet now?
       
Post is unread #10 Mar 21, 2008, 3:48 am
Go to the top of the page
Go to the bottom of the page

David Haley
Sorcerer
GroupMembers
Posts903
JoinedJan 29, 2007

Valgrind is a tool meant to find this kind of problem; gdb is meant to find other kinds of problems. (It doesn't detect stack corruption.)

So trying this on a Linux box is definitely a good idea if you can. If you are running a Debian-based system, you should do (as root): aptitude install valgrind. If you have a Fedora system, I believe the command is (again as root): yum install valgrind. If you have another system, you'll have to do whatever you normally do to install packages.

Once you have valgrind, you run the program like so: go to the area directory, then type: valgrind ../src/smaug. Adjust the executable name as necessary, and optionally add the port number in case you're not using the default.

Once you have it running in valgrind, do whatever you do to get the crash. Valgrind should tell you exactly where the stack gets corrupted. You'll have to read its output and go from there.
       
Post is unread #11 Mar 21, 2008, 5:25 am
Go to the top of the page
Go to the bottom of the page

Remcon
Geomancer
GroupAdministrators
Posts1,858
JoinedJul 26, 2005


Okay, I'm quite new to AFKMud, so this is probably a very newbish question.
I've managed to get AFKMud (2.0) to compile through cygwin, after a bit of trouble with libgd. However, gets an error whenever I go to run it. The output looks something like this:
Code:

/cygdrive/c/afkmud20/area
$ ../area/afkmud.exe
Sat Mar 15, 2008 11:39:02 AM AUSEDT::Booting Database
...
Sat Mar 15, 2008 11:39:05 AM AUSEDT::Loading auction houses...
Sat Mar 15, 2008 11:39:05 AM AUSEDT::Loading clan/guild shops...
19[main] afkmud 3620 _cygtls::handle_exceptions: Error while dumping state (probably corrupted stack)
Segmentation fault (core dumped)


Any ideas on what's gone wrong? I've noticed that 3620 tends to change every time I attempt to run it, incase that's meaningful.

By the way, I have very little experience with C++ (although I have had experience with a few other languages), and I also have smaugfuss working on this computer, if all else fails, I'll just go back to it.

Something that strikes me as odd is you did ../area/afkmud.exe when the afkmud.exe file should be in the src directory (at least it was in my test). Also the shops directory was empty on a stock release so had no crashing issue caused by this issue.

I would guess that this issue is caused from fread_mobile setting things that are already set. It was fixed in a higher version of AFKMud (I checked 2.03 and it's fixed in it). Try making your fread_mobile in save.cpp looking like the one in 2.03 and see if that fixes the issue.

       
Post is unread #12 Mar 21, 2008, 2:48 pm   Last edited Mar 21, 2008, 5:12 pm by Trengei
Go to the top of the page
Go to the bottom of the page

Trengei
Fledgling
GroupMembers
Posts7
JoinedMar 14, 2008

Remcon said:



Something that strikes me as odd is you did ../area/afkmud.exe when the afkmud.exe file should be in the src directory (at least it was in my test). Also the shops directory was empty on a stock release so had no crashing issue caused by this issue.


That was a typo on my behalf...I have been running afkmud.exe (which is in the src directory) from the area directory.
And as I wasn't sure whether you wanted me to compile the same sources on my linux box, I'll just try compiling and running a clean version of 2.03
EDIT: Works fine on linux. Yet to decide whether I'll use it permanently
       
Post is unread #13 Mar 22, 2008, 3:59 pm
Go to the top of the page
Go to the bottom of the page

David Haley
Sorcerer
GroupMembers
Posts903
JoinedJan 29, 2007

It would be best to copy your entire directory over to Linux, recompile, and run that. If the exact same files work on Linux, then this is a problem with Cygwin. (Not sure how Cygwin would be causing a stack overflow, though...)
       
Pages:<< prev 1 next >>