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

Bad resource userdata for onResourceStop on "removed while running" #372

Closed
ArranTuna opened this issue Sep 2, 2018 · 0 comments

Comments

Projects
None yet
2 participants
@ArranTuna
Copy link
Contributor

commented Sep 2, 2018

Describe the bug
If you remove/move a resource while running and refresh your resources, the handler for onResourceStop will receive a "dead" resource userdata.

Resources that clean up special data after other resources will have memory leaks because the stopped resource's data won't be deleted due to the error.

To Reproduce
Steps to reproduce the behavior:

start xyz
srun addEventHandler("onResourceStop", root, function(res) getResourceName(res) end)
-- move xyz into other folder
refresh

Expected behavior
The resource object should still be usable.

MTA Version: 1.5

Additional context
From https://bugs.mtasa.com/view.php?id=9021

@ArranTuna ArranTuna added the bug label Sep 2, 2018

@botder botder self-assigned this Jan 4, 2019

@botder botder closed this in 2f8377b Jan 6, 2019

@botder botder added this to the 1.5.7 milestone Jan 6, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.