-
-
Notifications
You must be signed in to change notification settings - Fork 57
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
In v3.4.0, calling an event will create an SOL2 assertion failure #317
Comments
Update on tests:I enabled debug in config and here are the results: function testHandler(data)
print(data)
end
MP.RegisterEvent("testEvent", "testHandler")
MP.TriggerGlobalEvent("testEvent", "test data") I get the following logs:
I tried running it inside of the
|
Update on TestsFeels like this is the right track, by passing 2 arguments to the event, you will get 2 assertion failures! function testHandler(data1, data2)
print(data1, data2)
end
MP.RegisterEvent("testEvent", "testHandler")
MP.TriggerGlobalEvent("testEvent", "test1", "test2") Log:
|
New UpdateFor me the issue is located here: https://github.com/BeamMP/BeamMP-Server/blob/minor/src/TLuaEngine.cpp#L461-L462 While testing the follwing code: function testHandler(data1, data2)
print(data1, data2)
end
MP.RegisterEvent("testEvent", "testHandler")
local test = function() return true end
MP.TriggerGlobalEvent("testEvent", "test Str", test) I got the following logs:
The interesting part is:
Which tells me that the issue is before the type validation for the arguments, and the fact that by passing 2 args, i get the error twice makes me think that is is located between line 461 and 462! |
UpdateIt could also be All of this seems to correspond to |
it was exactly this, thank you very much :) |
I wrote this in the commit for the fix as well, but basically, the behavior of |
Ok, this explains it, Thanks a lot for the quick fix !!! |
Fill out general information
OS (windows, linux, ...):
BeamMP-Server Version: v3.4.0 (BeamMP-Server.debian.11.x86_64)
Describe the bug
When calling an event with
MP.TriggerLocalEvent
orMP.TriggerGlobalEvent
you will get anSOL2 assertion failure
.Getting the return value with
Future:GetResults()
will also make anSOL2 assertion failure
.BUT, everything works nomrally execpt for this assertion failure, the right data is passed to the event, and you get the right data that is returned.
To Reproduce
Here are examples of code that will make the errors:
Expected behavior
No SOL3 assertion failure
Logs
(For only 1 assertion error)
The text was updated successfully, but these errors were encountered: