Page 1 of 1

.14.17 Hard crash using clear_items_inside() on robots

Posted: Wed Nov 02, 2016 8:06 am
by Nexela
Vanilla .14.17
[Edit: most inventory modifying commands on robots will crash factorio]


New game
/c game.player.insert("roboport"); game.player.insert("construction-robot"); game.player.insert("deconstruction-planner")
place a stone furnace, mark the stone furnace for deconstruction
place the roboport and put a robot in it
after the robot picks up the furnace select it and run
/c game.player.selected.clear_items_inside()

At this point Factorio crashes
other commands that cause crashes
/c game.player.selected.get_inventory(1).remove("stone-furnace")
/c game.player.selected.get_inventory(1).clear()

Commands that work
/c game.player.print(game.player.selected.get_inventory(1).get_contents()["stone-furnace"])
/c game.player.print(game.player.selected.get_inventory(1).can_insert("stone-furnace"))
/c game.player.selected.get_inventory(1).insert("stone-furnace")

Related ish:
viewtopic.php?f=28&t=35498

Code: Select all

   0.000 2016-11-02 03:53:33; Factorio 0.14.17 (build 25256, win64, alpha)
   0.000 Operating system: Windows 7 Service Pack 1
   0.000 Program arguments: "E:\Games\Factorio_Web\Factorio_Experimental\bin\x64\factorio.exe"
   0.000 Read data path: E:/Games/Factorio_Web/Factorio_Experimental/data
   0.000 Write data path: E:/Games/Factorio_Web/Factorio_Experimental
   0.000 Binaries path: E:/Games/Factorio_Web/Factorio_Experimental/bin
   0.011 System info: [CPU: Intel(R) Core(TM) i7-4770K CPU @ 3.50GHz, 8 cores, RAM: 16267MB]
   0.011 Display options: [FullScreen: 0] [VSync: 0] [UIScale: 100%] [MultiSampling: OFF] [Screen: 255]
   0.012 Available display adapters: 1
   0.012  [0]: \\.\DISPLAY1 - NVIDIA GeForce GTX 970 {0x05, [0,0], 1920x1080, 32bit, 60Hz}
   0.013 Create display on adapter 0. Size 1280x720 at position [310, 162].
   0.512 Initialised Direct3D:[0] NVIDIA GeForce GTX 970; driver: nvd3dumx.dll 21.21.13.7306
   0.515     Video memory size (dedicated video/dedicated system/shared system/available): 4007/0/7877/3690 MB
   0.534 DSound: Starting _dsound_update thread
   0.534 DSound: Enter _dsound_update; tid=2572
   0.534 Device reset internal.
   0.536 Desktop composition is active.
   0.536 Graphics options: [Graphics quality: normal] [Video memory usage: all] [Light scale: 100%] [DXT: false]
   0.599 Loading mod core 0.0.0 (data.lua)
   0.603 Loading mod base 0.14.17 (data.lua)
   0.678 Checksum for core: 1291735968
   0.678 Checksum for mod base: 538937375
   0.908 Info PlayerData.cpp:55: Local player-data.json available, timestamp 1478055900
   0.908 Info PlayerData.cpp:62: Cloud player-data.json unavailable
   1.091 Initial atlas bitmap size is 16384
   1.094 Created atlas bitmap 16384x8536
   1.508 Created atlas bitmap 4096x968
   1.525 Created atlas bitmap 4096x3652
   6.022 Sprites loaded
   6.022 Convert atlas 4096x968 to: trilinear-filtering
   6.045 Convert atlas 4096x3652 to: mipmap
   6.521 Loading sounds...
   7.752 Custom inputs active: 0
   7.752 Info Updater.cpp:749: Downloading https://updater.factorio.com/get-available-versions?username=Nexela&token=<private>&apiVersion=2
   8.160 0 packages available to download (experimental updates enabled).
   8.208 Factorio initialised
  16.444 Info Scenario.cpp:152: Map version 0.14.17-0
  16.495 Checksum for script E:/Games/Factorio_Web/Factorio_Experimental/temp/currently-playing/control.lua: 1057114497
 145.936 Error CrashHandler.cpp:139: Exception Code: c0000005, Address: 0x000000013ff6b028
ModuleBase: 0x000000013fdc0000, ImageSize: 011e5000, RelativeAddress: 001ab028
 145.936 Error CrashHandler.cpp:149: Exception Context:
rax=0000000003294f80, rbx=000000000774c890, rcx=0000000006122170,
rdx=0000000000000000, rsi=0000000002551be0, rdi=0000000000000049,
rip=000000013ff6b028, rsp=0000000008d6f300, rbp=0000000000000000,
 r8=0000000002551c30,  r9=000000000774c770, r10=0000000000000000,
r11=0000000000000206, r12=0000000008d6f3f0, r13=0000000000001dfe,
r14=0000000006122170, r15=000000003ed580c0
 145.936 Crashed in E:\Games\Factorio_Web\Factorio_Experimental\bin\x64\factorio.exe (0x000000013fdc0000 - 0x0000000140fa5000)
Factorio crashed. Generating symbolized stacktrace, please wait ...
c:\cygwin64\tmp\factorio-31uujk\libraries\stackwalker\stackwalker.cpp (906): StackWalker::ShowCallstack
c:\cygwin64\tmp\factorio-31uujk\src\util\logger.cpp (337): Logger::writeStacktrace
c:\cygwin64\tmp\factorio-31uujk\src\util\logger.cpp (391): Logger::logStacktrace
c:\cygwin64\tmp\factorio-31uujk\src\util\crashhandler.cpp (105): CrashHandler::writeStackTrace
c:\cygwin64\tmp\factorio-31uujk\src\util\crashhandler.cpp (175): CrashHandler::SehHandler
ERROR: SymGetLineFromAddr64, GetLastError: 487 (Address: 0000000076CDBC10)
0000000076CDBC10 (kernel32): (filename not available): UnhandledExceptionFilter
ERROR: SymGetLineFromAddr64, GetLastError: 487 (Address: 0000000076EDFF88)
0000000076EDFF88 (ntdll): (filename not available): EtwEventSetInformation
ERROR: SymGetLineFromAddr64, GetLastError: 487 (Address: 0000000076E778C8)
0000000076E778C8 (ntdll): (filename not available): _C_specific_handler
ERROR: SymGetLineFromAddr64, GetLastError: 487 (Address: 0000000076E87E8D)
0000000076E87E8D (ntdll): (filename not available): RtlDecodePointer
ERROR: SymGetLineFromAddr64, GetLastError: 487 (Address: 0000000076E784CF)
0000000076E784CF (ntdll): (filename not available): RtlUnwindEx
ERROR: SymGetLineFromAddr64, GetLastError: 487 (Address: 0000000076EABAC8)
0000000076EABAC8 (ntdll): (filename not available): KiUserExceptionDispatcher
c:\cygwin64\tmp\factorio-31uujk\src\logistics\logisticnetwork.cpp (456): LogisticNetwork::selectStoragePoint
c:\cygwin64\tmp\factorio-31uujk\src\logistics\logisticnetwork.cpp (734): LogisticNetwork::dispatchPendingSubset
c:\cygwin64\tmp\factorio-31uujk\src\logistics\logisticnetwork.cpp (711): LogisticNetwork::dispatchPending
c:\cygwin64\tmp\factorio-31uujk\src\logistics\logisticnetwork.cpp (339): LogisticNetwork::update
c:\cygwin64\tmp\factorio-31uujk\src\force\forcedata.cpp (418): ForceData::update
c:\cygwin64\tmp\factorio-31uujk\src\map\map.cpp (1123): Map::update
c:\cygwin64\tmp\factorio-31uujk\src\game.cpp (144): Game::update
c:\cygwin64\tmp\factorio-31uujk\src\scenario\scenario.cpp (842): Scenario::update
c:\cygwin64\tmp\factorio-31uujk\src\mainloop.cpp (761): MainLoop::gameUpdateStep
c:\cygwin64\tmp\factorio-31uujk\src\mainloop.cpp (630): MainLoop::gameUpdateLoop
c:\cygwin64\tmp\factorio-31uujk\src\util\workerthread.cpp (34): WorkerThread::loop
c:\program files (x86)\microsoft visual studio 14.0\vc\include\thr\xthread (247): std::_LaunchPad<std::unique_ptr<std::tuple<void (__cdecl WorkerThread::*)(void) __ptr64,WorkerThread * __ptr64>,std::default_delete<std::tuple<void (__cdecl WorkerThread::*)(void) __ptr64,WorkerThread * __ptr64> > > >::_Run
c:\program files (x86)\microsoft visual studio 14.0\vc\include\thr\xthread (210): std::_Pad::_Call_func
d:\th\minkernel\crts\ucrt\src\appcrt\startup\thread.cpp (115): thread_start<unsigned int (__cdecl*)(void * __ptr64)>
ERROR: SymGetLineFromAddr64, GetLastError: 487 (Address: 0000000076C559CD)
0000000076C559CD (kernel32): (filename not available): BaseThreadInitThunk
ERROR: SymGetLineFromAddr64, GetLastError: 487 (Address: 0000000076E8A2E1)
0000000076E8A2E1 (ntdll): (filename not available): RtlUserThreadStart
 148.253 Error CrashHandler.cpp:106: Map tick at moment of crash: 7678
 148.253 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.

Re: .14.17 Hard crash using clear_items_inside() on robots

Posted: Wed Nov 02, 2016 8:32 am
by Nexela
Commands on the actual slot don't crash and work as intended

/game.player.selected.get_inventory(1)[1].clear()

Re: .14.17 Hard crash using clear_items_inside() on robots

Posted: Wed Nov 02, 2016 8:46 am
by Rseding91
Fixed for 0.14.18.