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
➜ SMAUG
➜ Running the server
➜ SWR segfaults in Cygwin
It is now over 60 days since the last post. This thread is closed.
Refresh page
| Posted by
| Greven
Canada (835 posts) Bio
|
| Date
| Sat 26 Jun 2004 05:18 AM (UTC) |
| Message
| In the process of cleaning up my code for distribution, I've come across a snag. The code, with some makefile mods, compiles cleanly. I've corrected all errors in boot as well. The mud boots no problem on slackware 9, but in cygwin, I get this:
Tue Feb 17 23:12:13 2004 :: Initializing socket
Program received signal SIGSEGV, Segmentation fault.
0x77e731cf in KERNEL32!IsBadWritePtr ()
from /cygdrive/c/WINDOWS/system32/kernel32.dll
(gdb) bt
#0 0x77e731cf in KERNEL32!IsBadWritePtr ()
from /cygdrive/c/WINDOWS/system32/kernel32.dll
#1 0x00000013 in ?? ()
#2 0x0022ef24 in ?? ()
#3 0x00000012 in ?? ()
#4 0x0022e000 in ?? ()
#5 0x0022e000 in ?? ()
#6 0x0022d8dc in ?? ()
#7 0x0024c5c8 in ?? ()
#8 0x0022f090 in ?? ()
#9 0x77e9bb86 in KERNEL32!EnumResourceLanguagesW ()
from /cygdrive/c/WINDOWS/system32/kernel32.dll
#10 0x77e81880 in KERNEL32!GetVolumeInformationW ()
from /cygdrive/c/WINDOWS/system32/kernel32.dll
Outside of gdb, I just get a stack dump. I searched for some references to these problem, dunno if maybe people have come across this before.
Also, I for sure have my segvio commented out.
I dunno, any ideas? |
Nobody ever expects the spanish inquisition!
darkwarriors.net:4848
http://darkwarriors.net | | Top |
|
| Posted by
| Samson
USA (683 posts) Bio
|
| Date
| Reply #1 on Sat 26 Jun 2004 04:49 PM (UTC) |
| Message
| Wow, you managed to hork the kernel with that one. Aside from the log snip that says initializing socket, do you have any other idea what might have done it?
Also, which version of SWR, Cygwin, and Windows is this? | | Top |
|
| Posted by
| Greven
Canada (835 posts) Bio
|
| Date
| Reply #2 on Sat 26 Jun 2004 05:27 PM (UTC) |
| Message
| | Yeah, I know those errors are bad, especially from the kernel. I'm running a highly modified SWR 1.0, which certainly doesn't help. My version of cygwin is 1.5.10-3, and I'm running it on win xp corporate. At one point I was missing cygz.dll, but that doesn't seem to be affecting the problem when I replaced it. |
Nobody ever expects the spanish inquisition!
darkwarriors.net:4848
http://darkwarriors.net | | Top |
|
| Posted by
| Samson
USA (683 posts) Bio
|
| Date
| Reply #3 on Sun 27 Jun 2004 12:04 AM (UTC) Amended on Sun 27 Jun 2004 12:15 AM (UTC) by Samson
|
| Message
| Well I don't know. I was running 1.5.9.something here with no known incidents. Perhaps they've done something in 1.5.10-3 that caused your problem? I'm sure you know AFKMud is about as highly modified as things get these days, and so far I've never had any trouble on Cygwin. Though I don't do extensive runtime testing with it. Since your error seems to be coming off of init_socket though, I'll fire my code up and see what happens.
Update: Had no trouble with 1.5.10-3 either. | | Top |
|
| Posted by
| Greven
Canada (835 posts) Bio
|
| Date
| Reply #4 on Sun 27 Jun 2004 02:19 AM (UTC) |
| Message
| Yeah, I haven't had any other problems with AFK, SMAUGFUSS, or SWRFUSS at all in cygwin, they all seem to work. So I assume that its my own code, and consweuqently my own fault, but I don't have a clue where I would begin to look to track this down. It a good possibility that it has something to do with my "to cygwin" modifications, though those are mostly just "#ifdef (__cygwin__)" ( don't remember it off hand) for libraries and such. I assume this because it works fine in linux, so I don't see it being a fundamental flaw in the base code itself. There is a good possibility that it is either the MCCP, the dlsym, or the crypt code that I had to alter to work with cygwin. I took guidance from the AFK mud makefile for some of it ( the alternate dlsym calls during compile, for example ), but I may have screwed it up somewhere in there.
As to how to fix this, I'll try messing with a few settings, see what I can do. A usable core/bt stack would be nice, though. |
Nobody ever expects the spanish inquisition!
darkwarriors.net:4848
http://darkwarriors.net | | Top |
|
| Posted by
| Darrik Vequir
(24 posts) Bio
|
| Date
| Reply #5 on Mon 28 Jun 2004 04:53 PM (UTC) |
| Message
|
I actually have this exact same problem loading up SWRiP INSIDE GDB. But I do NOT have the same problem with loading it up outside GDB. This is a pain, because I can't debug it without a core dump ( with cygwin doesn't do ) and/or running it inside gdb.
No idea what causes it, I just gave up and went back to doing my testing on my linux box.
Darrik Vequir
Star Wars: Rise in Power | | Top |
|
| Posted by
| Greven
Canada (835 posts) Bio
|
| Date
| Reply #6 on Mon 28 Jun 2004 06:25 PM (UTC) |
| Message
| Granted it would be nice if you could configure cygwin to actually export a core. It appears that it does not have a limit or unlimit command.
When I launch it outside of windows I get another stack dump, which is terribly aggravating. I'm thinking it might be my version of windows, so I'm gonna test that when I can. |
Nobody ever expects the spanish inquisition!
darkwarriors.net:4848
http://darkwarriors.net | | Top |
|
| Posted by
| Greven
Canada (835 posts) Bio
|
| Date
| Reply #7 on Mon 05 Jul 2004 06:38 AM (UTC) |
| Message
| | Actually got it working for the most part. It will boot from windows, from within cygwin, but not in gdb. However, it works on a non-xp pro platform, I think its xp home, not certain, just thought I would let others know should they run into this. |
Nobody ever expects the spanish inquisition!
darkwarriors.net:4848
http://darkwarriors.net | | Top |
|
| Posted by
| David Haley
USA (3,881 posts) Bio
|
| Date
| Reply #8 on Mon 05 Jul 2004 04:26 PM (UTC) |
| Message
| | You can always try doing this the oldfashioned way and actually stepping through line by line after that log message ("initializing socket") and just see yourself where it dies. Tedious yes, but it seems to be the only option at this point. :) |
David Haley aka Ksilyan
Head Programmer,
Legends of the Darkstone
http://david.the-haleys.org | | Top |
|
| Posted by
| Greven
Canada (835 posts) Bio
|
| Date
| Reply #9 on Mon 05 Jul 2004 04:56 PM (UTC) |
| Message
| | Did that, actually, seems that gdb didn't wanna stop at that log line. I threw a break in, but it just didn't stop, I dunno. |
Nobody ever expects the spanish inquisition!
darkwarriors.net:4848
http://darkwarriors.net | | Top |
|
| Posted by
| Nick Gammon
Australia (23,173 posts) Bio
Forum Administrator |
| Date
| Reply #10 on Tue 06 Jul 2004 10:36 PM (UTC) |
| Message
| He means, somewhere beyond that log line. You know it was working till then, so put a breakpoint on that line, and then just step until it crashes.
However what you might do is try to "divide and conquer".
Say it *does* do this line:
log ("Initializing socket"); // or whatever it is
// hundreds of lines of code here //
log ("Reading areas"); // or whatever
Put another breakpoint halfway through that code. Then if it crashes *before* the breakpoint you know it is in the first half, otherwise the second half.
Then put another breakpoint halfway through the half that crashed, and repeat the exercise. You will eventually narrow it down to a small batch of lines.
|
- Nick Gammon
www.gammon.com.au, www.mushclient.com | | Top |
|
| Posted by
| Greven
Canada (835 posts) Bio
|
| Date
| Reply #11 on Wed 07 Jul 2004 02:11 AM (UTC) |
| Message
| | Sorry, I guess I should have been more clear. None of my break points are picking up anywhere. I can set one at main, one on reset_area, anywhere, none will catch. I've been searching on google for similiar instances, and I may just need to uninstall and reinstall cygwin from scratch again. Dunno, thanks for the suggestions, though, muchly appreciated as always Nick. |
Nobody ever expects the spanish inquisition!
darkwarriors.net:4848
http://darkwarriors.net | | 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.
32,774 views.
It is now over 60 days since the last post. This thread is closed.
Refresh page
top