mirror of
https://github.com/esx-framework/esx_core.git
synced 2026-08-29 01:01:22 +00:00
9a248406b04d0e8942eaba38ff2828eae248e1ab
Every point from every resource is served by one shared thread, and the enter, leave
and inside callbacks are all invoked bare. A Lua error in any one of them terminates
that coroutine, and nothing restarts it - startLoop only runs once, from the spawn
handler in es_extended.
So a single faulty third party resource takes down point detection for the whole
client. Shops, garages and job markers stop reacting, with no hint beyond one stack
trace, until the player reconnects.
inside is the worst of the three because it runs every frame while the player stands
in the point, so it is also dropped from insidePoints once it errors. Otherwise the
guard would turn a dead thread into a console flood at framerate. enter and leave only
fire on a transition, so they stay registered.
Measured in game on artifact 25770, with a healthy point, a point whose enter raises
and a point whose inside raises, all created while standing on them:
before: the healthy point fired enter, then the broken one raised at points/client.lua
and after that nothing happened at all - no leave when walking away, and
points created afterwards never fired enter either, the thread was gone
after: both failures are logged against the owning point and resource, all three
points fired leave when walking away, and points created afterwards worked
normally. The inside failure printed once rather than every frame.
The runtime already prints the error and its stack, so the added line only names the
point and the resource it came from.
ESX Legacy
Discord - Website - Documentation
Want more resources? You can browse the Cfx.re Releases board for more!
ESX is the leading framework, trusted by over 12,000 communities to provide the highest quality roleplay servers on FiveM
💗 Supporters
Interested in helping us? Take a look at our patreon
| We would like to sincerely thank the following donors who helped fund the development of ESX. |
|---|
| Mohamad Buhamad - Michael Hein - RoadToSix - Montree Narathong |
| Saydoon - Muhannad alyamani - iSentrie - Wecity - Samuel Nicol |
| Kyle McShea - Artin - Mathias Christoffersen - Jaylan Yilmaz - Callum |
| CONGRESS KW - Michael Hein - Smery sitbon - daZepelin - CMF Community |
Description
Languages
JavaScript
62.3%
Lua
34.8%
TypeScript
1.2%
HTML
0.8%
CSS
0.7%
Other
0.2%