Steps to reproduce:
1. Run these three commands in succession
2. Game will crash on the third one (100% success rate for me)
Code: Select all
/c
function func()
local sf = game.surfaces[1]
local find_entities_filtered = sf.find_entities_filtered
local find_entities_filtered_area = { {-10,-10}, {10,10} }
local find_entities_filtered_params = { type = types, area = find_entities_filtered_area }
local function fn()
return find_entities_filtered(find_entities_filtered_params)
end
return fn
end
Code: Select all
/c f = func()
Code: Select all
/c
local N = 100000
for i = 1, N do
f()
end