Grabbing a trainstop from the inventory makes the game crash

This subforum contains all the issues which we already resolved.
Post Reply
ElGaucho
Burner Inserter
Burner Inserter
Posts: 19
Joined: Mon Mar 27, 2017 9:27 pm
Contact:

Grabbing a trainstop from the inventory makes the game crash

Post by ElGaucho »

I am about to start a small mod, which basically just sets up some ghost entities of train tracks. I realized, that as soon as i grab a trainstop from my inventory, the game crashes immediately:

Code: Select all

for variable = 0, 100, 2 do
    game.surfaces[1].create_entity{name="entity-ghost", inner_name="straight-rail", direction = defines.direction.south, force=game.forces.player, position={x, y + variable}}
end
The logfile contains the following content:

Code: Select all

   0.002 2017-04-18 20:26:01; Factorio 0.14.22 (build 25342, win64, steam)
   0.002 Operating system: Windows 10 (version 1607) 
   0.002 Program arguments: "C:\Spiele\Steam\steamapps\common\Factorio\bin\x64\Factorio.exe" 
   0.002 Read data path: C:/Spiele/Steam/steamapps/common/Factorio/data
   0.002 Write data path: C:/Users/ElGaucho/AppData/Roaming/Factorio
   0.002 Binaries path: C:/Spiele/Steam/steamapps/common/Factorio/bin
   0.014 System info: [CPU: Intel(R) Core(TM) i7-6700K CPU @ 4.00GHz, 8 cores, RAM: 32727MB]
   0.015 Display options: [FullScreen: 1] [VSync: 0] [UIScale: 100%] [MultiSampling: OFF] [Screen: 255]
   0.017 Available display adapters: 3
   0.017  [0]: \\.\DISPLAY1 - NVIDIA GeForce GTX 1080 {0x05, [0,0], 2560x1440, 32bit, 120Hz}
   0.017  [1]: \\.\DISPLAY2 - NVIDIA GeForce GTX 1080 {0x01, [2560,0], 2560x1440, 32bit, 120Hz}
   0.018  [2]: \\.\DISPLAY3 - NVIDIA GeForce GTX 1080 {0x01, [-2560,0], 2560x1440, 32bit, 120Hz}
   0.018 Create display on adapter 0. Size 1280x720 at position [630, 342].
   0.499 Initialised Direct3D:[0] NVIDIA GeForce GTX 1080; driver: nvd3dumx.dll 21.21.13.7866
   0.500     Video memory size (dedicated video/dedicated system/shared system/available): 8110/0/16363/4082 MB
   0.538 DSound: Starting _dsound_update thread
   0.538 DSound: Enter _dsound_update; tid=1816
   0.539 Device reset internal.
   0.541 Desktop composition is active.
   0.541 Graphics options: [Graphics quality: normal] [Video memory usage: high] [Light scale: 25%] [DXT: false]
   0.642 Info ModManager.cpp:98: Found duplicate mod Speedrun, using folder version (0.1.1).
   0.646 Loading mod core 0.0.0 (data.lua)
   0.649 Loading mod base 0.14.22 (data.lua)
   0.716 Loading mod blueprint-string 4.0.0 (data.lua)
   0.754 Loading mod Advanced-Electric 0.1.3 (data.lua)
   0.795 Loading mod BetterBelts 1.0.2 (data.lua)
   0.835 Loading mod Bottleneck 0.6.2 (data.lua)
   0.879 Loading mod Crafting_Speed_Research 0.1.4 (data.lua)
   0.918 Loading mod ElGaucho 0.1.1 (data.lua)
   0.963 Loading mod EvoGUI 0.4.108 (data.lua)
   1.001 Loading mod Factorissimo 0.2.0 (data.lua)
   1.043 Loading mod Power Armor MK3 0.0.4 (data.lua)
   1.093 Loading mod Warehousing 0.0.11 (data.lua)
   1.132 Loading mod WaterWell 1.0.15 (data.lua)
   1.173 Loading mod LateUpgrades 0.2.2 (data.lua)
   1.232 Loading mod Squeak Through 1.1.6 (data-updates.lua)
   1.277 Loading mod long-reach 0.0.6 (data-final-fixes.lua)
   1.332 Loading mod tree_collision 0.4.0 (data-final-fixes.lua)
   1.375 Checksum for core: 1291735968
   1.375 Checksum for mod base: 786624017
   1.375 Checksum for mod blueprint-string: 62577300
   1.375 Checksum for mod Advanced-Electric: 1348850227
   1.375 Checksum for mod BetterBelts: 3073799481
   1.375 Checksum for mod Bottleneck: 4008105457
   1.375 Checksum for mod Crafting_Speed_Research: 3928230558
   1.375 Checksum for mod ElGaucho: 2140329560
   1.375 Checksum for mod EvoGUI: 1040096666
   1.375 Checksum for mod Factorissimo: 708485668
   1.375 Checksum for mod long-reach: 3674062281
   1.375 Checksum for mod Power Armor MK3: 2685576601
   1.375 Checksum for mod Squeak Through: 1088258958
   1.375 Checksum for mod tree_collision: 3231141521
   1.375 Checksum for mod Warehousing: 3149064619
   1.375 Checksum for mod WaterWell: 3229134519
   1.375 Checksum for mod LateUpgrades: 622199700
   1.655 Info PlayerData.cpp:55: Local player-data.json available, timestamp 1492462955
   1.655 Info PlayerData.cpp:60: Cloud player-data.json available, timestamp 1492462950
   1.739 Initial atlas bitmap size is 16384
   1.741 Created atlas bitmap 16384x5841
   1.883 Created atlas bitmap 4096x1040
   1.888 Created atlas bitmap 4096x3648
   6.786 Sprites loaded
   6.786 Convert atlas 4096x1040 to: trilinear-filtering 
   6.798 Convert atlas 4096x3648 to: mipmap 
   6.961 Loading sounds...
   7.998 Custom inputs active: 2
   8.027 Factorio initialised
  19.639 The scenario does not contain control.lua. Loading freeplay scripts.
  19.719 Info Scenario.cpp:152: Map version 0.14.22-0
  20.094 Checksum for script C:/Users/ElGaucho/AppData/Roaming/Factorio/temp/currently-playing/control.lua: 1057114497
  20.101 Checksum for script __blueprint-string__/control.lua: 1646716633
  20.101 Checksum for script __BetterBelts__/control.lua: 0
  20.102 Checksum for script __Bottleneck__/control.lua: 539679015
  20.103 Checksum for script __Crafting_Speed_Research__/control.lua: 1826326919
  20.104 Checksum for script __ElGaucho__/control.lua: 1549100632
  20.106 Checksum for script __EvoGUI__/control.lua: 3075659584
  20.108 Checksum for script __Factorissimo__/control.lua: 841786998
  20.109 Checksum for script __Warehousing__/control.lua: 4246273150
  20.110 Checksum for script __WaterWell__/control.lua: 2317626080
  28.722 Error CrashHandler.cpp:139: Exception Code: c0000005, Address: 0x00007ff61b3d0001
ModuleBase: 0x00007ff61b0a0000, ImageSize: 01249000, RelativeAddress: 00330001
  28.722 Error CrashHandler.cpp:149: Exception Context:
rax=0000e77a0bb9b8c9, rbx=0000000000000000, rcx=0000000000000000,
rdx=0000000000000003, rsi=0000000000000000, rdi=000000b0487ff538,
rip=00007ff61b3d0001, rsp=000000b0487ff3e0, rbp=00000000000000c8,
 r8=0000000000000000,  r9=000000b0487ff520, r10=00000000000000a8,
r11=000000b0487ff530, r12=000001bff8f8a550, r13=000001bfb3852b00,
r14=000001bffaaf6980, r15=0000000000000000
  28.722 Crashed in C:\Spiele\Steam\steamapps\common\Factorio\bin\x64\Factorio.exe (0x00007ff61b0a0000 - 0x00007ff61c2e9000)
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 (175): CrashHandler::SehHandler
ERROR: SymGetLineFromAddr64, GetLastError: 487 (Address: 00007FFF8BCC4F77)
00007FFF8BCC4F77 (KERNELBASE): (filename not available): UnhandledExceptionFilter
ERROR: SymGetLineFromAddr64, GetLastError: 487 (Address: 00007FFF8F65ED1B)
00007FFF8F65ED1B (ntdll): (filename not available): memset
ERROR: SymGetLineFromAddr64, GetLastError: 487 (Address: 00007FFF8F646BD6)
00007FFF8F646BD6 (ntdll): (filename not available): _C_specific_handler
ERROR: SymGetLineFromAddr64, GetLastError: 487 (Address: 00007FFF8F65AB9D)
00007FFF8F65AB9D (ntdll): (filename not available): _chkstk
ERROR: SymGetLineFromAddr64, GetLastError: 487 (Address: 00007FFF8F5F9913)
00007FFF8F5F9913 (ntdll): (filename not available): RtlImageNtHeaderEx
ERROR: SymGetLineFromAddr64, GetLastError: 487 (Address: 00007FFF8F659CBA)
00007FFF8F659CBA (ntdll): (filename not available): KiUserExceptionDispatcher
c:\cygwin64\tmp\factorio-xcajoo\src\rail\railsegment.cpp (444): RailSegment::discoverSignalDirection
c:\cygwin64\tmp\factorio-xcajoo\src\entity\rail.cpp (1134): Rail::drawTrainStopPositions
c:\cygwin64\tmp\factorio-xcajoo\src\entity\rail.cpp (161): Rail::draw
c:\cygwin64\tmp\factorio-xcajoo\src\entity\entityghost.cpp (151): EntityGhost::draw
c:\cygwin64\tmp\factorio-xcajoo\src\graphics\entityrenderer.cpp (211): EntityRenderer::prepareRow
c:\cygwin64\tmp\factorio-xcajoo\src\graphics\entityrenderer.cpp (162): EntityRenderer::threadJob
c:\cygwin64\tmp\factorio-xcajoo\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: 00007FFF8CD08364)
00007FFF8CD08364 (KERNEL32): (filename not available): BaseThreadInitThunk
ERROR: SymGetLineFromAddr64, GetLastError: 487 (Address: 00007FFF8F6170D1)
00007FFF8F6170D1 (ntdll): (filename not available): RtlUserThreadStart
  29.310 Error CrashHandler.cpp:106: Map tick at moment of crash: 454
  29.310 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.
Any ideas whats going on there? Is there something wrong with my rails? As soon as i remove them, it works like a charm.

Rseding91
Factorio Staff
Factorio Staff
Posts: 13219
Joined: Wed Jun 11, 2014 5:23 am
Contact:

Re: Grabbing a trainstop from the inventory makes the game crash

Post by Rseding91 »

What are "x", and "y" in your script? The player position?
If you want to get ahold of me I'm almost always on Discord.

Rseding91
Factorio Staff
Factorio Staff
Posts: 13219
Joined: Wed Jun 11, 2014 5:23 am
Contact:

Re: Grabbing a trainstop from the inventory makes the game crash

Post by Rseding91 »

Thanks for the report. Creating entities as ghosts through script is currently broken in 0.14 and results in problems like this. It's fixed for 0.15.
If you want to get ahold of me I'm almost always on Discord.

ElGaucho
Burner Inserter
Burner Inserter
Posts: 19
Joined: Mon Mar 27, 2017 9:27 pm
Contact:

Re: Grabbing a trainstop from the inventory makes the game crash

Post by ElGaucho »

X and y are just offsets somewhere nearby the Player. You can just replace it with the current Player Position, but it doesn't affect the bug. Thanks for the fast reply and the fix! :)

Post Reply

Return to “Resolved Problems and Bugs”