Login
User Name:

Password:



Register
Forgot your password?
Vote for Us!
auth_update crash
Dec 23, 2017, 10:15 pm
By Remcon
check_tumble
Dec 18, 2017, 7:21 pm
By Remcon
parse description bug
Dec 15, 2017, 10:08 pm
By Remcon
Couple bugs
Dec 12, 2017, 5:42 pm
By Remcon
Bug in disarm( )
Nov 12, 2017, 6:54 pm
By GatewaySysop
LoP 1.46
Author: Remcon
Submitted by: Remcon
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
Users Online
CommonCrawl, Google, Exalead, Yandex

Members: 0
Guests: 5
Stats
Files
Topics
Posts
Members
Newest Member
478
3,708
19,242
612
Jacki72H
Today's Birthdays
Evoru (32)
Related Links
» SmaugMuds.org » Codebases » AFKMud Support & Development » Twohand flag/ Dual wield prob...
Forum Rules | Mark all | Recent Posts

Twohand flag/ Dual wield problem
< Newer Topic :: Older Topic >

Pages:<< prev 1 next >>
Post is unread #1 Jul 12, 2004, 1:08 am
Go to the top of the page
Go to the bottom of the page

Voidrider

GroupMembers
Posts4
JoinedJul 10, 2004

Hello, this is my first post here, having only recently found this wonderful code to play with. I ran into a problem last night
pertaining to the twohand flag and dual wielding. I created a missile weapon, flagged it as missile wield and twohand and
every attempt at dual wielding with caused a crash. The code plainly has measures for responding to any attempt to
dual wield with a wielded/missile_wielded weapon flagged as twohand, so I am wondering what could possibly be involved
here. The mud crashes before the message of: "You are already wielding a two-handed weapon." ever occurs. Any ideas?
       
Post is unread #2 Jul 12, 2004, 8:07 pm
Go to the top of the page
Go to the bottom of the page

cynshard

GroupMembers
Posts95
JoinedNov 19, 2003

While I don't know offhand what could be causing the problem, I bet that gdb will give you a helpful bit of information. Try running gdb on your core to see what line the game crashes on.

Samson has written a very helpful introduction to using gdb here.

Cynshard
       
Post is unread #3 Jul 12, 2004, 10:39 pm
Go to the top of the page
Go to the bottom of the page

Voidrider

GroupMembers
Posts4
JoinedJul 10, 2004

Okay, tried using gdb and received some feedback but much of it a bit mysterious. Here is what I got for the initial entry:

Core was generated by `../src/afkmud 5505'.
Program terminated with signal 11, Segmentation fault.
#0 0x081284ef in ?? ()

bt
#0 0x081284ef in ?? ()
#1 0x080a9149 in ?? ()
#2 0x080a9486 in ?? ()
#3 0x08136814 in ?? ()
#4 0x080fac71 in ?? ()
#5 0x080fba77 in ?? ()
#6 0x40094917 in ?? ()

frame 0
#0 0x081284ef in ?? ()

print ??
A parse error in expression, near `??'.

Now, this is all new to me, so I am not certain why I can't even get a file listing. But still, kudos again for Samson's help file on gdb; we brain-dead 37 year-olds need all the help we can get. And thanks for the link, Cynshard.



       
Post is unread #4 Jul 13, 2004, 1:44 am
Go to the top of the page
Go to the bottom of the page

Greven
Magician
GroupMembers
Posts204
JoinedMar 5, 2005

If your not getting valid info out of your core like that, chances are that you just didn't target your executable properly. Assuming your core is in the area directory, try this:

gdb ../src/afkmud -c core

Assuming that the core file is acutally called core and not core.XXXXX

Gdb knows what the core is reporting, but doesn't have the nessecary info ( like function names and such) that is needed from the executable to be able to report it in something you'd understand. Hope that helps.
       
Post is unread #5 Jul 13, 2004, 6:20 am
Go to the top of the page
Go to the bottom of the page

cynshard

GroupMembers
Posts95
JoinedNov 19, 2003

Additionally, you might try starting the game up with gdb attached and then forcing a crash.

To do that all you would need to do is (from the src directory)

cd ../area
gdb ../src/afkmud

and at the gdb prompt

run (port number goes here )

Then hop on the game and force the crash.
       
Post is unread #6 Jul 13, 2004, 6:35 am
Go to the top of the page
Go to the bottom of the page

RapidRunner

GroupMembers
Posts72
JoinedDec 4, 2003

or you could always do

ps ux

then gdb --pid= *the pid the executable is on*

then type continue

       
Post is unread #7 Jul 14, 2004, 1:13 am
Go to the top of the page
Go to the bottom of the page

Voidrider

GroupMembers
Posts4
JoinedJul 10, 2004

Thanks for the suggestions. Apparently my code was not recognizing the mw reference in the twohand flag portion of the do_wield code. After a bit of trial and error, I simply broke up the combined weapon type portion of this and moved the mw part to an area where it was
recognized. Everything seems to be working fine, now, thanks all.
       
Pages:<< prev 1 next >>