Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Fix stack overflow when attaching elements in maps #1663

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

Merged
StrixG merged 4 commits into multitheftauto:master from tederis:attach_fix
Sep 21, 2020

Conversation

@tederis
Copy link
Member

@tederis tederis commented Sep 12, 2020
edited
Loading

When storing elements in maps sometimes we are attaching elements. In that case cross referencing may lead to
an endless cycle and finally to a stack overflow error. The PR is intended to fix it.

The resource for crashing your own server:
test.zip

AlexTMjugador and patrikjuvonen reacted with thumbs up emoji
@StrixG StrixG added the bug Something isn't working label Sep 12, 2020
@StrixG StrixG added this to the Backlog milestone Sep 12, 2020
Copy link
Contributor

@patrikjuvonen patrikjuvonen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for the pull request. Seems good to me.

Copy link
Contributor

qaisjp commented Sep 20, 2020
edited
Loading

My instinct is that we should (also|only) deal with this in the map parsing/loading process.

(I have only skimmed the code, so I don't know if this change affects performance, and therefore I don't know if the problem should ONLY be dealt with when loading maps.)

Copy link
Member Author

tederis commented Sep 21, 2020

My instinct is that we should (also|only) deal with this in the map parsing/loading process.

(I have only skimmed the code, so I don't know if this change affects performance, and therefore I don't know if the problem should ONLY be dealt with when loading maps.)

But it's already working that way. The processes are occuring in function LinkupElements() which in turn invoked inside a map loading process.

Copy link
Contributor

qaisjp commented Sep 21, 2020

Great!

@StrixG StrixG modified the milestones: Backlog, 1.5.8 Sep 21, 2020
@StrixG StrixG changed the title (削除) Stack overflow fix (削除ここまで) (追記) Fix stack overflow when attaching elements in maps (追記ここまで) Sep 21, 2020
@StrixG StrixG merged commit 97dbfc6 into multitheftauto:master Sep 21, 2020
qaisjp added a commit that referenced this pull request Sep 28, 2020
StrixG pushed a commit that referenced this pull request Sep 29, 2020
qaisjp added a commit that referenced this pull request Sep 30, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@Pirulax Pirulax Pirulax requested changes

@StrixG StrixG StrixG approved these changes

+2 more reviewers

@patrikjuvonen patrikjuvonen patrikjuvonen approved these changes

Reviewers whose approvals may not affect merge requirements

Assignees

No one assigned

Labels

bug Something isn't working

Projects

None yet

Milestone

1.5.8

Development

Successfully merging this pull request may close these issues.

AltStyle によって変換されたページ (->オリジナル) /