citizenfx / fivem

The source code for the Cfx.re modification frameworks, such as FiveM, RedM and LibertyM, as well as FXServer.
https://cfx.re/
3.49k stars 2.06k forks source link

Native errors without stacktrace #2716

Open mcNuggets1 opened 1 month ago

mcNuggets1 commented 1 month ago

What happened?

Every native error I get has no stacktrace attached even when the function is executed in lua. [ script:mg_lib] SCRIPT ERROR: Execution of native 0000000012038599 in script host failed: Argument at index 0 was null

Dunno if it's possible to get a stacktrace or anything line-y, but it's much needed. Reading error messages and not being able to tell for what exact lines they are is obnoxious and causes work to take double the amount. Makes debugging a mess, because you have to CHECK every instance of a native to be executed properly, which is just impossible for server owners.

Expected result

A proper stacktrace

Reproduction steps

DoesPlayerExist(0)

Importancy

Slight inconvenience

Area(s)

FiveM, FXServer

Specific version(s)

FiveM

Additional information

No response

AvarianKnight commented 3 weeks ago

These seem to have stack traces already.

image

Can you provide an example resource that doesn't have stack traces?

mcNuggets1 commented 3 weeks ago

It didn't have one for me. I don't know why it won't give me a proper stacktrace, but that happened in other cases aswell.

AvarianKnight commented 2 weeks ago

It didn't have one for me. I don't know why it won't give me a proper stacktrace, but that happened in other cases aswell.

Can you provide a resource where it doesn't happen so maybe it can be replicated