[2.0.57] Crash when trying to clone rolling stock

Bugs that we were not able to reproduce, and/or are waiting for more detailed info.
Natha
Filter Inserter
Filter Inserter
Posts: 268
Joined: Sun Mar 15, 2015 1:48 pm
Contact:

[2.0.57] Crash when trying to clone rolling stock

Post by Natha »

Trief this in my mod:

Code: Select all

local e = carriage.clone{position = teleport_pos, surface = v.surface, force = carriage.force}
The carriage is moving.

The game crashed with the following message:

Code: Select all

C:\Users\build\AppData\Local\Temp\factorio-build-CUjDhu\src\Util\ReleaseAssert.cpp(7): ReleaseAssertFailed
C:\Users\build\AppData\Local\Temp\factorio-build-CUjDhu\src\Entity\RollingStock.cpp(1431): RollingStock::checkConsistency
C:\Users\build\AppData\Local\Temp\factorio-build-CUjDhu\src\Map\ConsistencyScraper.cpp(41): ConsistencyScraper::step
C:\Users\build\AppData\Local\Temp\factorio-build-CUjDhu\src\Game.cpp(175): Game::update
C:\Users\build\AppData\Local\Temp\factorio-build-CUjDhu\src\Scenario\Scenario.cpp(1130): Scenario::updateStep
C:\Users\build\AppData\Local\Temp\factorio-build-CUjDhu\src\MainLoop.cpp(1478): MainLoop::gameUpdateStep
C:\Users\build\AppData\Local\Temp\factorio-build-CUjDhu\src\MainLoop.cpp(1273): MainLoop::gameUpdateLoop
C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Tools\MSVC\14.29.30133\include\functional(823): std::_Func_impl_no_alloc<`MainLoop::mainLoopStep'::`2'::<lambda_1>,void>::_Do_call
C:\Users\build\AppData\Local\Temp\factorio-build-CUjDhu\src\Util\WorkerThread.cpp(71): WorkerThread::loop
C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Tools\MSVC\14.29.30133\include\thread(56): std::thread::_Invoke<std::tuple<void (__cdecl WorkerThread::*)(void),WorkerThread *>,0,1>
minkernel\crts\ucrt\src\appcrt\startup\thread.cpp(97): thread_start<unsigned int (__cdecl*)(void *),1>
ERROR: SymGetLineFromAddr64, GetLastError: 487 (Address: 00007FFB98607374)
00007FFB98607374 (KERNEL32): (filename not available): BaseThreadInitThunk
ERROR: SymGetLineFromAddr64, GetLastError: 487 (Address: 00007FFB98F9CC91)
00007FFB98F9CC91 (ntdll): (filename not available): RtlUserThreadStart
Rseding91
Factorio Staff
Factorio Staff
Posts: 15881
Joined: Wed Jun 11, 2014 5:23 am
Contact:

Re: [2.0.57] Crash when trying to clone rolling stock

Post by Rseding91 »

Thanks for the report. I'm trying to reproduce the crash however I haven't been successful. Do you have any kind of minimal reproduction?
If you want to get ahold of me I'm almost always on Discord.
Natha
Filter Inserter
Filter Inserter
Posts: 268
Joined: Sun Mar 15, 2015 1:48 pm
Contact:

Re: [2.0.57] Crash when trying to clone rolling stock

Post by Natha »

Actually I cannot reproduce it outside of my mod.
Creating the carriage via create_entity on the same position works fine, with clone it crashes. But when I output some "breakpoint messages" after this line to a file, it shows that the code runs through the end of the tick loop (variable e is [LuaEntity: locomotive at [gps=143.0,5.4,nauvis_subsurface_1]]).

The corresponding code is https://github.com/NathaU/factorio-subs ... trains.lua line 117

My suggestion would be that cloned rolling stocks behaves differently than that from create_entity?

Could you give me a hint what RollingStock::checkConsistency and ReleaseAssert do?
Rseding91
Factorio Staff
Factorio Staff
Posts: 15881
Joined: Wed Jun 11, 2014 5:23 am
Contact:

Re: [2.0.57] Crash when trying to clone rolling stock

Post by Rseding91 »

It’s checking that the speed is 0 or the doors are closing. It’s never supposed to have the doors in the opening state when moving.
If you want to get ahold of me I'm almost always on Discord.
Post Reply

Return to “Pending”