[Rseding91] [1.0.0] Mod API: when a unit group with zero members receives the command build_base a crash/hang occurs

This subforum contains all the issues which we already resolved.
Urist_McAurelian
Manual Inserter
Manual Inserter
Posts: 2
Joined: Tue Sep 17, 2019 5:29 pm
Contact:

[Rseding91] [1.0.0] Mod API: when a unit group with zero members receives the command build_base a crash/hang occurs

Post by Urist_McAurelian »

When a unit group with zero members receives a command of type defines.command.build_base a crash (well, moreso the game just hangs) occurs. I've attached my log (although probably not applicable here) and a mod for demonstration purposes. This should work independent of save, so none attached. Just ensure water isn't at x=10, y=10. (not sure if that'd cause an error, but just in case...)

Place down your starting furnace and the script works as the unit group has at least one member, however when you mine it again it crashes as the unit group has no members.

I think I could've done that with console commands, but don't know how, sorry.

This isn't a bug per-say, I suppose, however having some sort of logging when this occurs would be nice... or maybe have set_command return false? I dunno. Don't usually make mods, so don't know what would work best. Just some sort of notification of what's going wrong would be nice, spent a good half day trying to figure out what was causing my game to crash.

Originally found when using rampant, however found independent of all mods besides my test one.
Attachments
user_testmod_1.0.0.zip
(1007 Bytes) Downloaded 133 times
factorio-current.log
(92.25 KiB) Downloaded 134 times
Rseding91
Factorio Staff
Factorio Staff
Posts: 14594
Joined: Wed Jun 11, 2014 5:23 am
Contact:

Re: [1.0.0] Mod API: when a unit group with zero members receives the command build_base a crash/hang occurs

Post by Rseding91 »

Huh, I thought I fixed this... I guess I never pushed the fix.
If you want to get ahold of me I'm almost always on Discord.
Urist_McAurelian
Manual Inserter
Manual Inserter
Posts: 2
Joined: Tue Sep 17, 2019 5:29 pm
Contact:

Re: [1.0.0] Mod API: when a unit group with zero members receives the command build_base a crash/hang occurs

Post by Urist_McAurelian »

Heh, well thanks then, I guess. Will it be an error popup or just the command being ignored?

Also, is there any way to tell what causes the game to hang without uploading the dump? Would've saved a lot of time.
Post Reply

Return to “Resolved Problems and Bugs”