[0.14.22] Crash after event on_canceled_deconstruction
Posted: Thu Mar 09, 2017 1:45 am
I'm currently writing a mod in which I tried to change the force of an entity in the on_canceled_deconstruction event.
This seems to work at first but when the game tries to save it freezes or if you quit to mainmenu it crashes the game.
I included a very small test mod and my save where I could reliably repoduce this crash. (use these)
Reproduction:
factorio log:
This seems to work at first but when the game tries to save it freezes or if you quit to mainmenu it crashes the game.
I included a very small test mod and my save where I could reliably repoduce this crash. (use these)
Reproduction:
- Deconstruct the storage chests on the left
- Quickly after cancel the deconstruction to trigger the mod event
- Now when you quit to mainmenu the game crashes
Code: Select all
script.on_event(defines.events.on_canceled_deconstruction, function(event)
event.entity.force = "neutral"
end)
Code: Select all
0.001 2017-03-09 02:21:23; Factorio 0.14.22 (build 25342, win64, steam)
0.001 Operating system: Windows 10 (version 1511)
0.001 Program arguments: "C:\Games\Steam Games\steamapps\common\Factorio\bin\x64\Factorio.exe"
0.001 Read data path: C:/Games/Steam Games/steamapps/common/Factorio/data
0.001 Write data path: C:/Users/Frederik/AppData/Roaming/Factorio
0.001 Binaries path: C:/Games/Steam Games/steamapps/common/Factorio/bin
0.015 System info: [CPU: Intel(R) Core(TM) i7-4720HQ CPU @ 2.60GHz, 8 cores, RAM: 8108MB]
0.016 Display options: [FullScreen: 1] [VSync: 1] [UIScale: 100%] [MultiSampling: OFF] [Screen: 255]
0.020 Available display adapters: 1
0.020 [0]: \\.\DISPLAY1 - Intel(R) HD Graphics 4600 {0x05, [0,0], 1920x1080, 32bit, 60Hz}
0.020 Create display on adapter 0. Size 1280x720 at position [310, 162].
0.770 Initialised Direct3D:[0] NVIDIA GeForce GTX 960M; driver: nvd3dumx.dll 21.21.13.7849
0.773 Video memory size (dedicated video/dedicated system/shared system/available): 4065/0/4054/4088 MB
0.794 DSound: Starting _dsound_update thread
0.794 DSound: Enter _dsound_update; tid=6232
0.794 Device reset internal.
0.796 Desktop composition is active.
0.796 WARNING: You have vsync and desktop composition enabled on Direct3d. Consider disabling vsync to increase performance on some confirgurations.
0.796 Graphics options: [Graphics quality: normal] [Video memory usage: high] [Light scale: 25%] [DXT: false]
0.881 Loading mod core 0.0.0 (data.lua)
0.885 Loading mod base 0.14.22 (data.lua)
1.012 Checksum for core: 1291735968
1.012 Checksum for mod base: 786624017
1.012 Checksum for mod bug-test: 0
1.351 Info PlayerData.cpp:55: Local player-data.json available, timestamp 1489021090
1.351 Info PlayerData.cpp:62: Cloud player-data.json unavailable
1.561 Initial atlas bitmap size is 16384
1.564 Created atlas bitmap 16384x5589
1.790 Created atlas bitmap 4096x968
1.798 Created atlas bitmap 4096x3652
8.414 Sprites loaded
8.414 Convert atlas 4096x968 to: trilinear-filtering
8.438 Convert atlas 4096x3652 to: mipmap
8.799 Loading sounds...
10.076 Custom inputs active: 0
10.112 Factorio initialised
15.294 Loading map C:\Users\Frederik\AppData\Roaming\Factorio\saves\bug test.zip
15.369 Info Scenario.cpp:152: Map version 0.14.22-0
16.035 Checksum for script C:/Users/Frederik/AppData/Roaming/Factorio/temp/currently-playing/control.lua: 900459546
16.036 Checksum for script __bug-test__/control.lua: 1553155945
21.574 Error CrashHandler.cpp:230: Received SIGSEGV
Factorio crashed. Generating symbolized stacktrace, please wait ...
c:\cygwin64\tmp\factorio-xcajoo\libraries\stackwalker\stackwalker.cpp (906): StackWalker::ShowCallstack
c:\cygwin64\tmp\factorio-xcajoo\src\util\logger.cpp (337): Logger::writeStacktrace
c:\cygwin64\tmp\factorio-xcajoo\src\util\logger.cpp (391): Logger::logStacktrace
c:\cygwin64\tmp\factorio-xcajoo\src\util\crashhandler.cpp (105): CrashHandler::writeStackTrace
c:\cygwin64\tmp\factorio-xcajoo\src\util\crashhandler.cpp (233): CrashHandler::SignalHandler
d:\th\minkernel\crts\ucrt\src\appcrt\misc\exception_filter.cpp (219): _seh_filter_exe
d:\th\minkernel\crts\ucrt\src\appcrt\startup\thread.cpp (117): `thread_start<unsigned int (__cdecl*)(void * __ptr64)>'::`1'::filt$0
ERROR: SymGetLineFromAddr64, GetLastError: 487 (Address: 00007FF6BF9CA708)
00007FF6BF9CA708 (Factorio): (filename not available): __C_specific_handler
ERROR: SymGetLineFromAddr64, GetLastError: 487 (Address: 00007FFB28BF9AFD)
00007FFB28BF9AFD (ntdll): (filename not available): _chkstk
ERROR: SymGetLineFromAddr64, GetLastError: 487 (Address: 00007FFB28B84FE9)
00007FFB28B84FE9 (ntdll): (filename not available): RtlImageNtHeaderEx
ERROR: SymGetLineFromAddr64, GetLastError: 487 (Address: 00007FFB28BF8C0A)
00007FFB28BF8C0A (ntdll): (filename not available): KiUserExceptionDispatcher
c:\cygwin64\tmp\factorio-xcajoo\src\logistics\logisticmanager.cpp (27): LogisticManager::~LogisticManager
c:\cygwin64\tmp\factorio-xcajoo\src\force\forcedata.cpp (160): ForceData::~ForceData
c:\cygwin64\tmp\factorio-xcajoo\src\force\forcemanager.cpp (30): ForceManager::~ForceManager
c:\cygwin64\tmp\factorio-xcajoo\src\map\map.cpp (944): Map::~Map
c:\cygwin64\tmp\factorio-xcajoo\src\scenario\scenario.cpp (749): Scenario::~Scenario
c:\cygwin64\tmp\factorio-xcajoo\src\appmanager.cpp (217): AppManager::quitGameAndGoToMainMenu
c:\cygwin64\tmp\factorio-xcajoo\src\appmanagerstates.cpp (252): InGameMenu::process
c:\cygwin64\tmp\factorio-xcajoo\src\appmanager.cpp (187): AppManager::process
c:\cygwin64\tmp\factorio-xcajoo\src\mainloop.cpp (277): MainLoop::prePrepare
c:\cygwin64\tmp\factorio-xcajoo\src\mainloop.cpp (352): MainLoop::mainLoopStep
c:\cygwin64\tmp\factorio-xcajoo\src\mainloop.cpp (208): MainLoop::run
c:\cygwin64\tmp\factorio-xcajoo\src\main.cpp (808): wmain
f:\dd\vctools\crt\vcstartup\src\startup\exe_common.inl (253): __scrt_common_main_seh
ERROR: SymGetLineFromAddr64, GetLastError: 487 (Address: 00007FFB26528102)
00007FFB26528102 (KERNEL32): (filename not available): BaseThreadInitThunk
ERROR: SymGetLineFromAddr64, GetLastError: 487 (Address: 00007FFB28BAC5B4)
00007FFB28BAC5B4 (ntdll): (filename not available): RtlUserThreadStart
22.358 Error Util.cpp:77: 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.