-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
Report calling native hash when failing #2817
Comments
It normally has a stack trace attached but sometimes it doesn't show the stack trace. I opened a similar issue the first day the change was merged, and they've agreed that it would be okay to have the native hash included. |
I encountered the same issue today where debugging lacks sufficient information, and the context is missing. In my case, the situation was even worse within ESX.Menu.Default, as the stack trace did not include any references from other resources. I’m wondering if it would be better to change this to a warning instead? I noticed that throwing an error here directly can cause issues with some resources protected by Asset Escrow hosted by cfx. These resources are not open-sourced, and their authors are no longer providing support.
|
This wouldn't be desired behavior, this should error as it is unexpected input, but it should error in a way can be debugged, which it currently doesn't. |
Seems like an improved error handling has been pushed. I'll check it out today. |
As I could see, normally theres no trace when the script is obfuscated (in my case with luraph). |
In server side, but client-side still https://cdn.discordapp.com/attachments/469246162239750184/1293966174132113469/image.png?ex=67094b68&is=6707f9e8&hm=17edfb97ec8b768672d72ac5b4b2f0a9448d4d8cee65cbd54373b84e7dac01aa& |
The native hash is now included when showing a validation error. Also, the "value too large" error now silently fails (by not calling the native), to preserve backwards compatibility. |
Segment
n/a
Importancy
Unclear or unintuitive
Improvement request
Currently calling a native with too large of a value (such as
SetPedComponentVariation(ped, 12, 1, 0, 0)
where 12 isn't a valid component id) will error witharg[1]: value too large
, but this doesn't report the native used which can make it hard to debug what the error is.Normal native execution fails would include the native hash of the native that was called to cause the error
fivem/code/components/citizen-scripting-lua/src/LuaScriptNatives.cpp
Lines 474 to 476 in 49406c4
Area(s)
FiveM, Natives
Additional information
No response
The text was updated successfully, but these errors were encountered: