I was expecting it might not work (generating chunk requests and calling force_generate_chunk_requests from handler of chunk generated event) but did not expect it to die to desktop.
Relevant log part:
log
Factorio crashed. Generating symbolized stacktrace, please wait ...
c:\cygwin64\tmp\factorio-build-shnskz\src\map\mapgenerationmanager.cpp (242): MapGenerationManager::generateAllInQueueSynchronously
c:\cygwin64\tmp\factorio-build-shnskz\src\map\mapgenerationmanager.cpp (200): MapGenerationManager::generateAllSynchronously
c:\cygwin64\tmp\factorio-build-shnskz\src\script\luasurface.cpp (1968): LuaSurface::luaForceGenerateChunkRequests
c:\cygwin64\tmp\factorio-build-shnskz\src\script\luabinder.hpp (326): LuaBinder<LuaTechnology>::callWrapper
c:\cygwin64\tmp\factorio-build-shnskz\libraries\lua\ldo.c (350): luaD_precall
c:\cygwin64\tmp\factorio-build-shnskz\libraries\lua\lvm.c (710): luaV_execute
c:\cygwin64\tmp\factorio-build-shnskz\libraries\lua\lapi.c (1027): f_call
c:\cygwin64\tmp\factorio-build-shnskz\libraries\lua\ldo.c (137): luaD_rawrunprotected
c:\cygwin64\tmp\factorio-build-shnskz\libraries\lua\ldo.c (623): luaD_pcall
c:\cygwin64\tmp\factorio-build-shnskz\libraries\lua\lapi.c (1053): lua_pcallk
c:\cygwin64\tmp\factorio-build-shnskz\src\util\luahelper.cpp (3729): LuaHelper::pCallWithStackTrace
c:\cygwin64\tmp\factorio-build-shnskz\src\script\luagamescript.cpp (977): LuaGameScript::runEventHandler
c:\cygwin64\tmp\factorio-build-shnskz\src\script\luaeventdispatcher.cpp (560): LuaEventDispatcher::run
c:\cygwin64\tmp\factorio-build-shnskz\src\script\luaeventdispatcher.cpp (426): LuaEventDispatcher::dispatch
c:\cygwin64\tmp\factorio-build-shnskz\src\map\entitymapgenerationtask.cpp (244): EntityMapGenerationTask::apply
c:\cygwin64\tmp\factorio-build-shnskz\src\map\mapgenerationhelper.cpp (93): MapGenerationHelper::applyTaskResult
c:\cygwin64\tmp\factorio-build-shnskz\src\map\mapgenerationmanager.cpp (251): MapGenerationManager::update
c:\cygwin64\tmp\factorio-build-shnskz\src\surface\surface.cpp (1470): Surface::update
c:\cygwin64\tmp\factorio-build-shnskz\src\map\map.cpp (1565): Map::updateEntities
c:\cygwin64\tmp\factorio-build-shnskz\src\game.cpp (201): Game::update
c:\cygwin64\tmp\factorio-build-shnskz\src\scenario\scenario.cpp (1216): Scenario::update
c:\cygwin64\tmp\factorio-build-shnskz\src\mainloop.cpp (1163): MainLoop::gameUpdateStep
c:\cygwin64\tmp\factorio-build-shnskz\src\mainloop.cpp (1032): MainLoop::gameUpdateLoop
c:\cygwin64\tmp\factorio-build-shnskz\src\util\workerthread.cpp (42): WorkerThread::loop
c:\program files (x86)\microsoft visual studio\2017\buildtools\vc\tools\msvc\14.15.26726\include\thr\xthread (230): std::_LaunchPad<std::unique_ptr<std::tuple<void (__cdecl*)(ParallelDesyncReportCreator *),ParallelDesyncReportCreator *>,std::default_delete<std::tuple<void (__cdecl*)(ParallelDesyncReportCreator *),ParallelDesyncReportCreator *> > > >::_Go
c:\program files (x86)\microsoft visual studio\2017\buildtools\vc\tools\msvc\14.15.26726\include\thr\xthread (209): std::_Pad::_Call_func
minkernel\crts\ucrt\src\appcrt\startup\thread.cpp (115): thread_start<unsigned int (__cdecl*)(void * __ptr64)>
ERROR: SymGetLineFromAddr64, GetLastError: 487 (Address: 00007FFB30E57BD4)
00007FFB30E57BD4 (KERNEL32): (filename not available): BaseThreadInitThunk
ERROR: SymGetLineFromAddr64, GetLastError: 487 (Address: 00007FFB32CACED1)
00007FFB32CACED1 (ntdll): (filename not available): RtlUserThreadStart
Stack trace logging done
43.916 Error MapGenerationManager.cpp:242: MapGenerationHelper::applyTaskResult(..., force) didn't finish all requests.
Logger::writeStacktrace skipped.
43.916 Error CrashHandler.cpp:189: Map tick at moment of crash: 6764319
43.916 Error Util.cpp:97: Unexpected error occurred. If you're running the latest version of the game you can help us solve the problem by posting the contents of the log file on the Factorio forums.
Please also include the save file(s), any mods you may be using, and any steps you know of to reproduce the crash.
48.955 Uploading log file
48.982 Error CrashHandler.cpp:245: Heap validation: success.
48.983 Creating crash dump.
49.103 CrashDump success
c:\cygwin64\tmp\factorio-build-shnskz\src\map\mapgenerationmanager.cpp (242): MapGenerationManager::generateAllInQueueSynchronously
c:\cygwin64\tmp\factorio-build-shnskz\src\map\mapgenerationmanager.cpp (200): MapGenerationManager::generateAllSynchronously
c:\cygwin64\tmp\factorio-build-shnskz\src\script\luasurface.cpp (1968): LuaSurface::luaForceGenerateChunkRequests
c:\cygwin64\tmp\factorio-build-shnskz\src\script\luabinder.hpp (326): LuaBinder<LuaTechnology>::callWrapper
c:\cygwin64\tmp\factorio-build-shnskz\libraries\lua\ldo.c (350): luaD_precall
c:\cygwin64\tmp\factorio-build-shnskz\libraries\lua\lvm.c (710): luaV_execute
c:\cygwin64\tmp\factorio-build-shnskz\libraries\lua\lapi.c (1027): f_call
c:\cygwin64\tmp\factorio-build-shnskz\libraries\lua\ldo.c (137): luaD_rawrunprotected
c:\cygwin64\tmp\factorio-build-shnskz\libraries\lua\ldo.c (623): luaD_pcall
c:\cygwin64\tmp\factorio-build-shnskz\libraries\lua\lapi.c (1053): lua_pcallk
c:\cygwin64\tmp\factorio-build-shnskz\src\util\luahelper.cpp (3729): LuaHelper::pCallWithStackTrace
c:\cygwin64\tmp\factorio-build-shnskz\src\script\luagamescript.cpp (977): LuaGameScript::runEventHandler
c:\cygwin64\tmp\factorio-build-shnskz\src\script\luaeventdispatcher.cpp (560): LuaEventDispatcher::run
c:\cygwin64\tmp\factorio-build-shnskz\src\script\luaeventdispatcher.cpp (426): LuaEventDispatcher::dispatch
c:\cygwin64\tmp\factorio-build-shnskz\src\map\entitymapgenerationtask.cpp (244): EntityMapGenerationTask::apply
c:\cygwin64\tmp\factorio-build-shnskz\src\map\mapgenerationhelper.cpp (93): MapGenerationHelper::applyTaskResult
c:\cygwin64\tmp\factorio-build-shnskz\src\map\mapgenerationmanager.cpp (251): MapGenerationManager::update
c:\cygwin64\tmp\factorio-build-shnskz\src\surface\surface.cpp (1470): Surface::update
c:\cygwin64\tmp\factorio-build-shnskz\src\map\map.cpp (1565): Map::updateEntities
c:\cygwin64\tmp\factorio-build-shnskz\src\game.cpp (201): Game::update
c:\cygwin64\tmp\factorio-build-shnskz\src\scenario\scenario.cpp (1216): Scenario::update
c:\cygwin64\tmp\factorio-build-shnskz\src\mainloop.cpp (1163): MainLoop::gameUpdateStep
c:\cygwin64\tmp\factorio-build-shnskz\src\mainloop.cpp (1032): MainLoop::gameUpdateLoop
c:\cygwin64\tmp\factorio-build-shnskz\src\util\workerthread.cpp (42): WorkerThread::loop
c:\program files (x86)\microsoft visual studio\2017\buildtools\vc\tools\msvc\14.15.26726\include\thr\xthread (230): std::_LaunchPad<std::unique_ptr<std::tuple<void (__cdecl*)(ParallelDesyncReportCreator *),ParallelDesyncReportCreator *>,std::default_delete<std::tuple<void (__cdecl*)(ParallelDesyncReportCreator *),ParallelDesyncReportCreator *> > > >::_Go
c:\program files (x86)\microsoft visual studio\2017\buildtools\vc\tools\msvc\14.15.26726\include\thr\xthread (209): std::_Pad::_Call_func
minkernel\crts\ucrt\src\appcrt\startup\thread.cpp (115): thread_start<unsigned int (__cdecl*)(void * __ptr64)>
ERROR: SymGetLineFromAddr64, GetLastError: 487 (Address: 00007FFB30E57BD4)
00007FFB30E57BD4 (KERNEL32): (filename not available): BaseThreadInitThunk
ERROR: SymGetLineFromAddr64, GetLastError: 487 (Address: 00007FFB32CACED1)
00007FFB32CACED1 (ntdll): (filename not available): RtlUserThreadStart
Stack trace logging done
43.916 Error MapGenerationManager.cpp:242: MapGenerationHelper::applyTaskResult(..., force) didn't finish all requests.
Logger::writeStacktrace skipped.
43.916 Error CrashHandler.cpp:189: Map tick at moment of crash: 6764319
43.916 Error Util.cpp:97: Unexpected error occurred. If you're running the latest version of the game you can help us solve the problem by posting the contents of the log file on the Factorio forums.
Please also include the save file(s), any mods you may be using, and any steps you know of to reproduce the crash.
48.955 Uploading log file
48.982 Error CrashHandler.cpp:245: Heap validation: success.
48.983 Creating crash dump.
49.103 CrashDump success