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

Report calling native hash when failing #2817

Open
AvarianKnight opened this issue Sep 26, 2024 · 2 comments
Open

Report calling native hash when failing #2817

AvarianKnight opened this issue Sep 26, 2024 · 2 comments
Labels
documentation triage Needs a preliminary assessment to determine the urgency and required action

Comments

@AvarianKnight
Copy link
Contributor

AvarianKnight commented Sep 26, 2024

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 with arg[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

fx::ScriptTrace("%s: execution failed: %s\n", __func__, e.what());
context.SetError("Execution of native %016llx in script host failed: %s", hash, e.what());

Area(s)

FiveM, Natives

Additional information

No response

@AvarianKnight AvarianKnight added documentation triage Needs a preliminary assessment to determine the urgency and required action labels Sep 26, 2024
@d22tny
Copy link

d22tny commented Sep 26, 2024

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.

@AvarianKnight
Copy link
Contributor Author

Haven't had a case of no stack trace being opened, just one that's very uninformative

See:
uninformative error message

The line this point to is not useful at all

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation triage Needs a preliminary assessment to determine the urgency and required action
Projects
None yet
Development

No branches or pull requests

2 participants