Page 1 of 1

[2.0.76] crash in technology screen when setting visible_when_disabled to true

Posted: Thu Mar 26, 2026 10:53 pm
by Enderdraak
What did I do?
Modding things, but the crash is completely reproducible in base game.
Step 1, Start to host a new world. (Technology screen must not pauze the game.)
Step 2, get a disabled technology.
Command used during testing:
/c for name, tech in pairs(game.forces.player.technologies) do tech.enabled = false end

Step 3, set technologies to be `visible_when_disabled` for some time in the future.
For testing this command was used to set that up:

Code: Select all

/c
script.on_event(defines.events.on_tick, function(event)
    if game.tick % 10 == 0 then
        for name, tech in pairs(game.forces.player.technologies) do
            if tech.visible_when_disabled == false then
                tech.visible_when_disabled = true
                break
            end
        end
    end
end)
Step 4, open the technology window.
I pressed my T button. And once the screen is open. The moment a tech changes its visible_when_disabled state the game crashes.

I have also found out that when hosting a server. The server does not crash. I was not in a position to test if a second player crashes. Either in the server or with hosting.
What happened?
A full on game crash, no recovery. No throwing back to the main menu. It crashes all the way.
03-26-2026, 23-50-50.png
03-26-2026, 23-50-50.png (1.26 MiB) Viewed 327 times
What did you expect to happen instead?
I expected the game to not crash and instead to also display the now visible_when_disabled = true tech simply gets displayed along side the other technologies.
Does it happen always, once, or sometimes?
It seems to always happen if the condition is met.
With the condition being; looking at a tech tree when a enabled = false technology swaps its visible_when_disabled attribute to true

Re: [2.0.76] crash in technology screen when setting visible_when_disabled to true

Posted: Sat Mar 28, 2026 8:12 am
by Enderdraak
Okay, after trying to make an April fools mod with this I discovered something.

It does not happen when I just start up my computer and load into a factorio to run these commands.

Extra steps I needed to reproduce; I start up a stand alone (modded) server with local host on the same PC. Then start up my base game client.
After that I got the crash to happen.
After I have started up a server once. It happens every time. Even without needing to start up a server to trigger the crash.

Re: [2.0.76] crash in technology screen when setting visible_when_disabled to true

Posted: Sun Mar 29, 2026 6:06 pm
by Rseding91
Thanks for the report. This is now fixed for 2.1. In the meantime - if you have at least 1 technology visible at all times it should avoid the crash.