official-antistasi-community / A3-Antistasi

Antistasi Community Version - work in progress - Discord https://discord.com/invite/TYDwCRKnKX
https://antistasi.de
Other
217 stars 156 forks source link

Speculative init order fix #3297

Closed jaj22 closed 2 weeks ago

jaj22 commented 2 weeks ago

What type of PR is this.

  1. [X] Bug?
  2. [ ] Change
  3. [ ] Enhancement

What have you changed and why?

Apparently initClientDone can be true before A3A_utilityItemHM exists on the client, causing errors in the initRemoteObject JIP function. This was expected to be impossible due to publicVariable order guarantees. I have a dumb theory that subsequent publicVariable calls on the same variable don't update the order, which means that A3A_startupState is not a valid fence variable.

This PR switches the fence variable to serverInitDone. If the ordering problem doesn't show up again then we learnt something weird about Arma.

Please specify which Issue this PR Resolves.

closes #XXXX

Please verify the following and ensure all checks are completed.

  1. [ ] Have you loaded the mission in LAN host?
  2. [ ] Have you loaded the mission on a dedicated server?

Is further testing or are further changes required?

  1. [ ] No
  2. [X] Yes (Please provide further detail below.)

It's probably not possible to generate the issue without a heavily loaded server & client.