[boskid][0.17.79] Crash from modded vehicle grid attacking itself

This subforum contains all the issues which we already resolved.
IronCartographer
Filter Inserter
Filter Inserter
Posts: 464
Joined: Tue Jun 28, 2016 2:07 pm
Contact:

[boskid][0.17.79] Crash from modded vehicle grid attacking itself

Post 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:
autoimmune_grid.zip
(653.55 KiB) Downloaded 153 times

Code: Select all

/c game.player.force = "enemy"
factorio-current.log
(19.42 KiB) Downloaded 175 times
Honktown
Smart Inserter
Smart Inserter
Posts: 1042
Joined: Thu Oct 03, 2019 7:10 am
Contact:

Re: [0.17.79] Crash from modded vehicle grid attacking itself

Post 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.
I have mods! I guess!
Link
Honktown
Smart Inserter
Smart Inserter
Posts: 1042
Joined: Thu Oct 03, 2019 7:10 am
Contact:

Re: [0.17.79] Crash from modded vehicle grid attacking itself

Post 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.
I have mods! I guess!
Link
Honktown
Smart Inserter
Smart Inserter
Posts: 1042
Joined: Thu Oct 03, 2019 7:10 am
Contact:

Re: [0.17.79] Crash from modded vehicle grid attacking itself

Post 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.
I have mods! I guess!
Link
User avatar
boskid
Factorio Staff
Factorio Staff
Posts: 3092
Joined: Thu Dec 14, 2017 6:56 pm
Contact:

Re: [boskid][0.17.79] Crash from modded vehicle grid attacking itself

Post by boskid »

Thanks for the report, it should be fixed for next release.
Post Reply

Return to “Resolved Problems and Bugs”