• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!
  • 2026 staff recruitment is open! Check it out and consider applying!

Solved Dual Wielding Crash

Status
Not open for further replies.

Digital

Learning C++
Joined
Jul 15, 2018
Messages
57
Solutions
1
Reaction score
12
Hi, I installed the Feature - True dual wielding for TFS 1.x but it keeps crashing my server every time a monster or player uses a physical attack. The only error that it gives is Segmentation fault (core dumped).

Is there a way to find more information on this error? I compiled the sources on my vps if that is any help. The server's operating system is Ubuntu 16.04 Server.
 
Last edited by a moderator:
"Core Dumped" implies that the last state of the application has been saved to your computer. Using this file you can figure out how you managed to SegFault. You also know that the problem occurs on creatures attacking, so follow that rabbit hole and see if TFS has been updated compared to the script (which is a little old now).
 
"Core Dumped" implies that the last state of the application has been saved to your computer. Using this file you can figure out how you managed to SegFault. You also know that the problem occurs on creatures attacking, so follow that rabbit hole and see if TFS has been updated compared to the script (which is a little old now).
Thanks for a hint at least. I found this on the web after searching for more information.Why are core dump files generated? on that page it lead me to this. Network Theory Ltd - How to examine core files - a tutorial When I find the solution I'll post it here.

Ok I see what I did wrong I put this
C++:
    /* If player is dual wielding, we already assured he has weapons in both hands. */
    if (isDualWielding()) {
        return getWeapon(getAttackHand(), ignoreAmmo);
    }
In here
Code:
Item* Player::getWeapon(slots_t slot, bool ignoreAmmo) const
instead of here
Code:
Item* Player::getWeapon(bool ignoreAmmo/* = false*/) const
So I guess it was looping I guess idk lol I haven't tried it out with dual wield but I am no longer crashing the server.
 
Last edited by a moderator:
Status
Not open for further replies.
Back
Top