Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: Going 'sleep' MAY crash server #4752

Open
4 tasks done
gesior opened this issue Jun 13, 2024 · 0 comments
Open
4 tasks done

[Bug]: Going 'sleep' MAY crash server #4752

gesior opened this issue Jun 13, 2024 · 0 comments
Labels
bug An issue describing unexpected behavior of code needs-confirmation not confirmed by a developer yet

Comments

@gesior
Copy link
Contributor

gesior commented Jun 13, 2024

By submitting this bug issue, you agree to the following.

  • This is a bug in the software that resides in this repository, and not a support matter (use https://otland.net/forums/support.16/ for support)
  • This issue is reproducible without changes to the C++ code in this repository
  • This bug has not been resolved in master branch
  • There is no existing issue for this bug already

Does this bug crash tfs?

yes (not always)

Server Version

1.7 (Master)

Operation System

all (listed below)

OS Description

No response

Bug description

Going 'sleep' MAY crash server

Possible Pull Requests which are to blame

No response

Steps to reproduce

  1. Click on bed (can't check it on 12+, but it may execute C++ action pointed in Actual Behavior)
  2. Wait until someone 'wrap' bed item.
  3. Try to start sleep.

Actual Behavior

I get report from modified TFS. I cannot run 12+ client on Linux. Can someone confirm it?

This:
https://github.com/otland/forgottenserver/blob/master/src/actions.cpp#L337
sets bedItem in Player to BedItem*:
https://github.com/otland/forgottenserver/blob/master/src/player.h#L226
but does not 'increase pointer' [old TFS] (or use Shared Pointer).

If it opens Dialog window and in meanwhile someone 'Wrap' BedItem (remove ite), it will crash, when someone close Dialog around that line:
https://github.com/otland/forgottenserver/blob/master/src/game.cpp#L5655

Expected Behavior

Not crash.

Backtrace

No response

@gesior gesior added bug An issue describing unexpected behavior of code needs-confirmation not confirmed by a developer yet labels Jun 13, 2024
@github-project-automation github-project-automation bot moved this to Backlog in TFS 1.8 Jun 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug An issue describing unexpected behavior of code needs-confirmation not confirmed by a developer yet
Projects
Status: Backlog
Development

No branches or pull requests

1 participant