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

[BUG] race condition when un-spectating user causes nil value error #877

Open
iSentrie opened this issue Jan 26, 2025 · 1 comment
Open
Labels

Comments

@iSentrie
Copy link

Describe the bug

After spectating several players on exit errors occurs.

To Reproduce

Steps to reproduce the behavior:

  1. Spectate player
  2. Switch to other player without closing menu
  3. The more you do it, the more errors occur
  4. Exit spectate
  5. See errors in F8

Expected behavior

I expect no errors.

Screenshots/Logs

Image

Server info:

  • Linux
  • FXServer Version 12255
  • EasyAdmin Version 7.32

Additional context

^1SCRIPT ERROR: @EasyAdmin/client/admin_client.lua:406: attempt to index a nil value (global 'oldCoords')^7
^1SCRIPT ERROR: @EasyAdmin/client/admin_client.lua:406: attempt to index a nil value (global 'oldCoords')^7
^1SCRIPT ERROR: @EasyAdmin/client/admin_client.lua:406: attempt to index a nil value (global 'oldCoords')^7
^1SCRIPT ERROR: @EasyAdmin/client/admin_client.lua:406: attempt to index a nil value (global 'oldCoords')^7
^1SCRIPT ERROR: @EasyAdmin/client/admin_client.lua:406: attempt to index a nil value (global 'oldCoords')^7
^1SCRIPT ERROR: @EasyAdmin/client/admin_client.lua:406: attempt to index a nil value (global 'oldCoords')^7

Sometimes

^1SCRIPT ERROR: @EasyAdmin/client/admin_client.lua:406: attempt to index a nil value (global 'oldCoords')^7
^1SCRIPT ERROR: @EasyAdmin/client/admin_client.lua:406: attempt to index a nil value (global 'oldCoords')^7
^3> spectatePlayer^7 (^5@EasyAdmin/client/admin_client.lua^7:406)
^3> fn^7 (^5@EasyAdmin/client/gui_c.lua^7:1950)
@Blumlaut
Copy link
Owner

Blumlaut commented Feb 1, 2025

this is a weird one, looks like oldCoords is nil but.. not?

the check already looks at if we're a nil value or not:

if oldCoords then

possible race condition? hm.

actually -- The more you do it, the more errors occur indicates that this could be getting triggered multiple times? but why? doesnt look like the code is actually triggering multiple times anywhere..

need to repro this locally

@Blumlaut Blumlaut changed the title [BUG] global 'old'coords error [BUG] race condition when un-spectating user causes nil value error Feb 1, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants