[SERVER] entityRemoved event broken on recent artifacts

Server Artifact : b12160 (Linux) - Maybe also on some olders
Categorie : Server side issue
Issue : entityRemoved entity args cannot be use as before, using GetEntityType or Owner send an error.
SCRIPT ERROR: native 000000000b1bd08d: Tried to access invalid entity: 157447
Native being dependant on which native you are using ofc.
Repro :

  1. Update to recent artifacts
  2. Add this snippet server side :
AddEventHandler('entityRemoved', function(_entity)
	local entity = _entity
	--
	local type = GetEntityType(entity)
end)
  1. Create a vehicle and then delete it (should also work on objects/peds but only tried on vehicles)

It will send the error.
Here if you need any infos.

Peace

Can confirm that several of my customers are running into this issue as well. Told them to downgrade for the time being.

Edit: started on 12160

Didn’t fix the issue, same error tested on : b12165 Linux

That’s because it was merged on 12168

Indeed fixed on 12168, thanks that was really quick