[0.17.63] Game Freeze (Custom Scenario) on unit group destroy or autonomous.

Place to get help with not working mods / modding interface.
Post Reply
Oarc
Fast Inserter
Fast Inserter
Posts: 100
Joined: Sun Sep 18, 2016 2:04 pm
Contact:

[0.17.63] Game Freeze (Custom Scenario) on unit group destroy or autonomous.

Post by Oarc »

THIS IS A CUSTOM SCENARIO SPECIFIC ISSUE so I understand if you don't have time to help.
I tried to figure out how to reproduce this with minimal scenario code, but I still can't figure it out after spending several hours on this.


For some reason, when I use set_autonomous() or destroy() on my unit groups, my game sometimes freezes.
If I uncomment the single line that does that, I don't get any game freezes.

Normally I've seen freezes with bad scenario code where there's a loop condition that it gets stuck in, but I don't think I have any bad loops like that. At least nothing obvious to me.

Either way, I have attached the save that demonstrates one of these freezes.
If you load that game, it should freeze for you within 1-2 seconds.
I'm hoping you have the tools/expertise to quickly identify what I'm doing wrong?

I'd appreciate any help I can get with this, thanks!

EDIT: The specific line in question: Line 1076 in "oarc_enemies.lua"

Code: Select all

attack.group.destroy()
I just made a duplicate of the save, and if I edit the zip file and comment out that line, the save no longer freezes the game after it's loaded.
Attachments
_test_freeze.zip
(1.2 MiB) Downloaded 55 times

User avatar
Klonan
Factorio Staff
Factorio Staff
Posts: 5150
Joined: Sun Jan 11, 2015 2:09 pm
Contact:

Re: [0.17.63] Game Freeze (Custom Scenario) on unit group destroy or autonomous.

Post by Klonan »

You got yourself caught in an loop with 2 events:

Image

Moving to modding help

Oarc
Fast Inserter
Fast Inserter
Posts: 100
Joined: Sun Sep 18, 2016 2:04 pm
Contact:

Re: [0.17.63] Game Freeze (Custom Scenario) on unit group destroy or autonomous.

Post by Oarc »

Thank you!!

Post Reply

Return to “Modding help”