Code: Select all
local count = 0
local on_chunk_generated = function(event)
count = count + 1
if (count == 1681) then
local surface = game.surfaces[1]
local iron = "iron-ore"
local copper = "copper-ore"
local coal = "coal"
local stone = "stone"
local oil = "crude-oil"
local uranium = "uranium-ore"
local enemy = "enemy-base"
local mgs = surface.map_gen_settings
mgs.autoplace_controls[iron].size = "3"
mgs.autoplace_controls[iron].frequency = "0.1"
mgs.autoplace_controls[iron].richness = "0.2"
mgs.autoplace_controls[copper].size = "3"
mgs.autoplace_controls[copper].frequency = "0.1"
mgs.autoplace_controls[copper].richness = "0.2"
mgs.autoplace_controls[coal].size = "3"
mgs.autoplace_controls[coal].frequency = "0.1"
mgs.autoplace_controls[coal].richness = "0.2"
mgs.autoplace_controls[stone].size = "3"
mgs.autoplace_controls[stone].frequency = "0.1"
mgs.autoplace_controls[stone].richness = "0.2"
mgs.autoplace_controls[oil].size = "10"
mgs.autoplace_controls[oil].frequency = "0.1"
mgs.autoplace_controls[oil].richness = "0.03"
mgs.autoplace_controls[uranium].size = "3"
mgs.autoplace_controls[uranium].frequency = "0.1"
mgs.autoplace_controls[uranium].richness = "0.2"
mgs.autoplace_controls[enemy].size = "10"
mgs.autoplace_controls[enemy].frequency = "0.1"
surface.map_gen_settings = mgs
end
end
Factorio crashed. Generating symbolized stacktrace, please wait ...
c:\users\build\appdata\local\temp\factorio-build-pexkpd\src\surface\surface.cpp (1687): Surface::changeMapGenSettings
c:\users\build\appdata\local\temp\factorio-build-pexkpd\src\script\luasurface.cpp (2395): LuaSurface::luaWriteMapGenSettings
c:\users\build\appdata\local\temp\factorio-build-pexkpd\src\script\luasurface.cpp (643): LuaSurface::luaNewIndex
c:\users\build\appdata\local\temp\factorio-build-pexkpd\src\script\luabinder.hpp (348): LuaBinder<LuaRandomGenerator>::callWrapperOnObject
c:\users\build\appdata\local\temp\factorio-build-pexkpd\libraries\lua\ldo.c (350): luaD_precall
c:\users\build\appdata\local\temp\factorio-build-pexkpd\libraries\lua\ldo.c (423): luaD_call
c:\users\build\appdata\local\temp\factorio-build-pexkpd\libraries\lua\lvm.c (104): callTM
c:\users\build\appdata\local\temp\factorio-build-pexkpd\libraries\lua\lvm.c (168): luaV_settable
c:\users\build\appdata\local\temp\factorio-build-pexkpd\libraries\lua\lvm.c (604): luaV_execute
c:\users\build\appdata\local\temp\factorio-build-pexkpd\libraries\lua\lapi.c (1067): f_call
c:\users\build\appdata\local\temp\factorio-build-pexkpd\libraries\lua\ldo.c (137): luaD_rawrunprotected
c:\users\build\appdata\local\temp\factorio-build-pexkpd\libraries\lua\ldo.c (623): luaD_pcall
c:\users\build\appdata\local\temp\factorio-build-pexkpd\libraries\lua\lapi.c (1093): lua_pcallk
c:\users\build\appdata\local\temp\factorio-build-pexkpd\src\util\luahelper.cpp (4407): LuaHelper::pCallWithStackTrace
c:\users\build\appdata\local\temp\factorio-build-pexkpd\src\script\luagamescript.cpp (1119): LuaGameScript::runEventHandler
c:\users\build\appdata\local\temp\factorio-build-pexkpd\src\script\luaeventdispatcher.cpp (687): LuaEventDispatcher::run
c:\users\build\appdata\local\temp\factorio-build-pexkpd\src\script\luaeventdispatcher.cpp (513): LuaEventDispatcher::dispatch
c:\users\build\appdata\local\temp\factorio-build-pexkpd\src\map\entitymapgenerationtask.cpp (279): EntityMapGenerationTask::apply
c:\users\build\appdata\local\temp\factorio-build-pexkpd\src\map\mapgenerationhelper.cpp (92): MapGenerationHelper::applyTaskResult
c:\users\build\appdata\local\temp\factorio-build-pexkpd\src\map\mapgenerationmanager.cpp (265): MapGenerationManager::update
c:\users\build\appdata\local\temp\factorio-build-pexkpd\src\surface\surface.cpp (1615): Surface::update
c:\users\build\appdata\local\temp\factorio-build-pexkpd\src\map\map.cpp (1630): Map::updateEntities
c:\users\build\appdata\local\temp\factorio-build-pexkpd\src\game.cpp (210): Game::update
c:\users\build\appdata\local\temp\factorio-build-pexkpd\src\scenario\scenario.cpp (1348): Scenario::update
c:\users\build\appdata\local\temp\factorio-build-pexkpd\src\scenario\scenario.cpp (1237): Scenario::updateStep
c:\users\build\appdata\local\temp\factorio-build-pexkpd\src\mainloop.cpp (1350): MainLoop::gameUpdateStep
c:\users\build\appdata\local\temp\factorio-build-pexkpd\src\mainloop.cpp (1203): MainLoop::gameUpdateLoop
c:\program files (x86)\microsoft visual studio\2017\community\vc\tools\msvc\14.16.27023\include\functional (15732480): std::_Func_impl_no_alloc<<lambda_df7262221d3c1f1d60586a46e6ec37ec>,void>::_Do_call
c:\users\build\appdata\local\temp\factorio-build-pexkpd\src\util\workerthread.cpp (73): WorkerThread::loop
c:\program files (x86)\microsoft visual studio\2017\community\vc\tools\msvc\14.16.27023\include\thr\xthread (230): std::_LaunchPad<std::unique_ptr<std::tuple<void (__cdecl SoundLibrary::AsyncLoader::*)(void),SoundLibrary::AsyncLoader *>,std::default_delete<std::tuple<void (__cdecl SoundLibrary::AsyncLoader::*)(void),SoundLibrary::AsyncLoader *> > > >::_Go
c:\program files (x86)\microsoft visual studio\2017\community\vc\tools\msvc\14.16.27023\include\thr\xthread (209): std::_Pad::_Call_func
minkernel\crts\ucrt\src\appcrt\startup\thread.cpp (97): thread_start<unsigned int (__cdecl*)(void *),1>
ERROR: SymGetLineFromAddr64, GetLastError: 487 (Address: 0000000076DD59CD)
0000000076DD59CD (kernel32): (filename not available): BaseThreadInitThunk
ERROR: SymGetLineFromAddr64, GetLastError: 487 (Address: 000000007700B981)
000000007700B981 (ntdll): (filename not available): RtlUserThreadStart
Stack trace logging done
67.040 Error MapGenerationManager.cpp:256: MapGenerationHelper::applyTaskResult(..., force) didn't finish all requests.
67.040 Error CrashHandler.cpp:641: Received 22
Logger::writeStacktrace skipped.
67.040 Error CrashHandler.cpp:195: Map tick at moment of crash: 2486
67.091 Info CrashHandler.cpp:315: Executable CRC: 2419858143