ALiVEOS / ALiVE.OS

ALiVE Open Source GPL v2
http://alivemod.com/
Other
160 stars 80 forks source link

Added isnil check on attempts to retrieve _profile #768

Closed Kiskadee-dev closed 1 year ago

Kiskadee-dev commented 2 years ago

This is an attempt to reduce the effects of the race condition.

Since units profiles are unregistered upon death by an event handler, opcom and intelligence may try to act upon already unregistered profiles.

This would generate an error spam on fnc_G2.sqf and also rarely stall opcom.

Since the profiles are returned as new instances, a workaround is to check if the returned value was null, otherwise it's pretty safe to go ahead.

DavisBrown723 commented 2 years ago

What's the status on this, is there a reason it's marked as Draft or can it be merged?

Kiskadee-dev commented 2 years ago

@DavisBrown723 I must it to diag_log the error as a warning, but less often, maybe once, so we know the problem still exists in the future.

DarrellJMartin commented 2 years ago

Current status please?

Azraeel commented 1 year ago

Current status please?

Same here plus I tested both commits actively

DarrellJMartin commented 1 year ago

Merged for public testing