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

Enderdraak
Inserter
Inserter
Posts: 39
Joined: Mon Jan 14, 2019 2:39 pm
Contact:

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

Post 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 322 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
Attachments
factorio-current.log
(14.08 KiB) Downloaded 21 times
factorio-dump-current.dmp
(682.17 KiB) Downloaded 9 times
Enderdraak
Inserter
Inserter
Posts: 39
Joined: Mon Jan 14, 2019 2:39 pm
Contact:

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

Post 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.
Rseding91
Factorio Staff
Factorio Staff
Posts: 16672
Joined: Wed Jun 11, 2014 5:23 am
Contact:

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

Post 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.
If you want to get ahold of me I'm almost always on Discord.
Post Reply

Return to “Fixed for 2.1”