Page 1 of 1
[boskid][0.17.79] Crash from modded vehicle grid attacking itself
Posted: Wed Dec 11, 2019 10:28 pm
by IronCartographer
While riding a vehicle with Schall's Gun Pods installed and active, change player's force to "enemy" and a crash to desktop results once the vehicle destroys itself.
Personal laser defenses do not cause the crash if used in the vehicle's grid instead, though they do still attack and destroy the vehicle itself--is this intended in the first place?
Save with a test case ready to go:
Re: [0.17.79] Crash from modded vehicle grid attacking itself
Posted: Thu Dec 12, 2019 1:55 am
by Honktown
Guessing, the friend/ceasefire of the entity aren't changed when the player's force is updated (which makes sense).
What happens if you're out of a vehicle? (presumably it attacks you, but not itself?)
A possible crash is because the player might be in a weird limbo - it exists in the vehicle, but it's not exactly on the map (the force of a vehicle may change when someone gets in it, which makes sense, if a force can get in another forces vehicle). This thinking would crash every time though.
I'd suggest looking into the mod, because it may have an illogical on_entity_killed or w/e event. The gun pods are modded, laser defenses aren't.
Edit:
In the log
Code: Select all
29.766 Error CrashHandler.cpp:462: Exception Code: c0000005, Address: 0x000000013fa82689
ModuleBase: 0x000000013f800000, ImageSize: 0183e000, RelativeAddress: 00282689
29.766 Error CrashHandler.cpp:468: Access Violation: Read at address FFFFFFFFFFFFFFFF
c0000005 is a null access violation. Somewhere something isn't considering that the entity may no longer exist. I'm looking through the mod at the moment but it's not a long mod.
Re: [0.17.79] Crash from modded vehicle grid attacking itself
Posted: Thu Dec 12, 2019 2:03 am
by Honktown
Whoops. Thought I was in the technical help section. Sorry for a staff member that might get pissy with me.
My best guess is equipmentgrid.cpp either itself didn't consider the entity may not exist (not sure if the dead player still exists) or that since Schall's Gun Pod doesn't do a valid() before accessing the equipment grid, that's the problem. I could test the latter if you want, since it could be a mod problem.
Re: [0.17.79] Crash from modded vehicle grid attacking itself
Posted: Thu Dec 12, 2019 5:03 am
by Honktown
Got bored and tried it. When outside the vehicle, by doing /c game.players[1].force = game.forces[2] the vehicle starts attacking me and kills me. I was trying to enter it but I cannot enter 'enemy' vehicles.
HOWEVER. When I was in the vehicle, and did the same thing, the tank killed itself, exploded, and I had no crash.
I'm on Windows 7, Steam version 0.17.79
Edit: strange. In your save I DO get the crash, in a new game I don't.
Update: I was wearing a shield. Unshielded, the game crashes, if I'm shielded, I take no/subtick? damage and don't crash.
Update update: Hooooold on a second. It might be two turrets is the problem. I unloaded the turrets down to 1, cause I was presuming things.
Yup: Having more than one equipment in the vehicle when it dies crashes it. I stuck in batteries and some reactors, and even though there was only 1 turret it still crashes. Takes a while to kill itself with only one turret.
Re: [boskid][0.17.79] Crash from modded vehicle grid attacking itself
Posted: Fri Dec 13, 2019 8:15 am
by boskid
Thanks for the report, it should be fixed for next release.