zen-mod / ZEN

Zeus enhancement mod for Arma 3
https://zen-mod.github.io/ZEN
GNU General Public License v3.0
108 stars 47 forks source link

Killing unit via Zeus crashes the game (closes) #706

Open l4ndl0rd opened 1 year ago

l4ndl0rd commented 1 year ago

Arma 3 Version: 2.10.149954 (stable) CBA Version: 3.15.8 (stable) ZEN Version: 1.12.2 (stable)

Mods:

- CBA_A3
- ZEN

Description: When killing player off via zeus to trigger a respawn the game just crashes (closes itself) and writes a minidump for an access violation with code c0000005. Description is set to respawn = 5.

Expected behavior: Respawn to different alive unit from those available.

Steps to reproduce:

  1. Place two or more units in the editor
  2. Place a Gamemaster-Module for #adminLogged
  3. Save mission
  4. Create descrition.ext
  5. In the description.ext set respawn = 5; - respawnDelay = whatever you want to
  6. Start the mission, get into the Zeus interface, select Playerunit and reduce health to zero => Game crashes

Where did the issue occur?

Additional information: When testing, sometimes the crash also occured just hitting the respawn button, that was however not always the case

RPT log file:

Kexanone commented 1 year ago

Do your steps also leading to a crash without CBA and ZEN? If so, you should report it over at https://feedback.bistudio.com/ indead.

l4ndl0rd commented 1 year ago

Can't really try the same exact steps cause I can't select myself in Vanilla. However the Respawn one that happened with Zen did not occur in Vanilla.

Kexanone commented 1 year ago

I can confirm that the health attribute one is 100% reproducible. Interestingly, directly executing player setDamage 1 in the script console does not trigger the crash.

neilzar commented 1 year ago

Did a bunch of debugging with the repro. Seems it only happens in MP, not in SP, and only when you click the OK button; it doesn't happen if you press Enter to apply. There seems to be something funky with the garbage collection related to the button click. Possible solution from ZEN side could be a frame delay on the setDamage call in initAttributes.sqf, so the interface is closed before the player is killed, but I'm not 100% certain that is going to fix it.