[0.17.59] LuaSurface.request_path crash

This subforum contains all the issues which we already resolved.
Post Reply
dorfl
Inserter
Inserter
Posts: 44
Joined: Mon May 28, 2018 12:49 am
Contact:

[0.17.59] LuaSurface.request_path crash

Post by dorfl »

While playing around with the path finder, I found path_resolution_modifier = 8 caused a full process lockup and eventually a crash. Lower values work OK.

I tried 8 only because UnitAISettings mentions an -8 to 8 range for an int8 parameter of the same name, and LuaSurface.request_path doesn't specify anything except int (int32).

This occurred while randomly clicking path targets. Can try to distil a test case if necessary.

Code: Select all

request = car.surface.request_path({
	bounding_box = car.prototype.collision_box,
	collision_mask = car.prototype.collision_mask,
	start = car.position,
	goal = click_position,
	force = car.force,
	entity_to_ignore = car,
	path_resolution_modifier = 8,
	pathfind_flags = {
		allow_destroy_friendly_entities = false,
		prefer_straight_paths = true,
	},
})

Factorio crashed. Generating symbolized stacktrace, please wait ...
Raw stacktrace: 0x9c6911, 0x9c7068, 0x9e310f, 0xba81eb, 0xba846e, 0xba87f3, 0xba88a7, 0xbaaeea, 0xd615cd, 0x132ddaa, 0x155257b, 0x1563aac, 0x1552778, 0x15527c9, 0x1552829, 0x154d026, 0x6fec6c, 0xe23412, 0x1385a8f, 0x7add5c, 0xc9ed94, 0x80bbbc, 0xab983c, 0xf845e3, 0xf84b62, 0xb27fb1, 0x1921e9f, 0x76db, 0
  29.640 Warning Logger.cpp:518: Symbols.size() == 36, usedSize == 28
#0  0x00000000009c7068 in Logging::flush() at /tmp/factorio-build-yalJPT/src/Util/Logging.cpp:66
#1  0x00000000009e310f in Logging::logAndAbortOrThrow(char const*, unsigned int, LogLevel, std::string const&) at /tmp/factorio-build-yalJPT/src/Util/Logging.cpp:97
#2  0x0000000000ba81eb in Logging::logAndAbortOrThrow(char const*, unsigned int, LogLevel, char const*, ...) at /tmp/factorio-build-yalJPT/src/Util/Logging.cpp:90
#3  0x0000000000ba846e in PathFindData::insertGoalNodesAtRadius(double, PathFinder::NodeProvider&, int) [clone .constprop.67841] at /tmp/factorio-build-yalJPT/src/AI/PathFindData.cpp:279
#4  0x0000000000ba87f3 in PathFindData::prepareGoalNodes(double, double, PathFinder::NodeProvider&, int) at /tmp/factorio-build-yalJPT/src/AI/PathFindData.cpp:260
#5  0x0000000000ba88a7 in PathFindData::PathFindData(MapPosition, MapPosition, double, double, PathFindSubject const&, unsigned int, unsigned int, PathFinder::NodeProvider&, PathFinderSettings const&, unsigned int, unsigned int) at /tmp/factorio-build-yalJPT/src/AI/PathFindData.cpp:43
#6  0x0000000000baaeea in FixedPointNumberTemplate<int, 8u>::getDouble() const at /tmp/factorio-build-yalJPT/src/Util/FixedPointNumber.hpp:33
#7  0x0000000000d615cd in PathFinder::calcDiagonalHeuristic(MapPosition, MapPosition) at /tmp/factorio-build-yalJPT/src/AI/PathFinder.cpp:675
#8  0x000000000132ddaa in SimpleTask::SimpleTask(MapPosition, MapPosition, double, double, PathFindSubject const&, unsigned int, PathFinder&, PathFinder::NodeProvider&, PathFinderSettings const&) at /tmp/factorio-build-yalJPT/src/AI/PathFindTask.cpp:43
#9  0x000000000155257b in PathFinder::requestPathFind(MapPosition, MapPosition, double, double, PathFindSubject const&, PathFindClient&, unsigned int, unsigned int) at /tmp/factorio-build-yalJPT/src/AI/PathFinder.cpp:329
#10 0x0000000001563aac in LuaSurface::luaRequestPath(lua_State*) at /tmp/factorio-build-yalJPT/src/Script/LuaSurface.cpp:3109
#11 0x0000000001552778 in LuaBinder<LuaSurface>::callWrapper(lua_State*) at /tmp/factorio-build-yalJPT/src/Script/LuaBinder.hpp:327 (discriminator 4)
#12 0x00000000015527c9 in luaD_precall(lua_State*, lua_TValue*, int) at /tmp/factorio-build-yalJPT/libraries/Lua/ldo.c:350
#13 0x0000000001552829 in luaV_execute(lua_State*) at /tmp/factorio-build-yalJPT/libraries/Lua/lvm.c:710 (discriminator 3)
#14 0x000000000154d026 in luaD_call(lua_State*, lua_TValue*, int, int) at /tmp/factorio-build-yalJPT/libraries/Lua/ldo.c:424
#15 0x00000000006fec6c in luaD_rawrunprotected(lua_State*, void (*)(lua_State*, void*), void*) at /tmp/factorio-build-yalJPT/libraries/Lua/ldo.c:165
#16 0x0000000000e23412 in luaD_pcall(lua_State*, void (*)(lua_State*, void*), void*, long, long) at /tmp/factorio-build-yalJPT/libraries/Lua/ldo.c:623
#17 0x0000000001385a8f in lua_pcallk at /tmp/factorio-build-yalJPT/libraries/Lua/lapi.c:1071
#18 0x00000000007add5c in LuaHelper::pCallWithStackTrace(lua_State*, int, int) at /tmp/factorio-build-yalJPT/src/Util/LuaHelper.cpp:3379
#19 0x0000000000c9ed94 in LuaGameScript::signallingPCall(lua_State*, int, int) at /tmp/factorio-build-yalJPT/src/Script/LuaGameScript.cpp:6068
#20 0x000000000080bbbc in LuaGameScript::runEventHandler(unsigned int, int) at /tmp/factorio-build-yalJPT/src/Script/LuaGameScript.cpp:944
#21 0x0000000000ab983c in TimeUtil::CpuTimer::elapsed() const at /tmp/factorio-build-yalJPT/src/Util/TimeUtil.hpp:44
#22 0x0000000000f845e3 in void LuaEventDispatcher::run<GameAction>(unsigned int, unsigned int, bool (LuaGameScript::*)(GameAction const&), GameAction const&) at /tmp/factorio-build-yalJPT/src/Script/LuaEventDispatcher.cpp:542
#23 0x0000000000f84b62 in GameActionDispatcher::sendToListeners(GameAction const&) at /tmp/factorio-build-yalJPT/src/GameActionDispatcher.cpp:14
#24 0x0000000000b27fb1 in GameActionHandler::selectArea(InputAction const&, Controller*) at /tmp/factorio-build-yalJPT/src/GameActionHandler.cpp:2912
#25 0x0000000001921e9f in GameActionHandler::actionPerformed(InputAction const&) at /tmp/factorio-build-yalJPT/src/GameActionHandler.cpp:331 (discriminator 1)
#26 0x00000000000076db in InputHandler::flushToListeners(InputAction const&, bool) at /tmp/factorio-build-yalJPT/src/Input/InputHandler.cpp:72
#27 (nil) in InputHandler::flushActions(bool, unsigned int) at /tmp/factorio-build-yalJPT/src/Input/InputHandler.cpp:64
#28 (nil) in GameActionHandler::update() at /tmp/factorio-build-yalJPT/src/GameActionHandler.cpp:371
#29 (nil) in MainLoop::gameUpdateStep(MultiplayerManagerBase*, Scenario*, AppManager*, MainLoop::HeavyMode) at /tmp/factorio-build-yalJPT/src/MainLoop.cpp:1146
#30 0x00007f3e00ca9af0 in MainLoop::gameUpdateLoop(MainLoop::HeavyMode) at /tmp/factorio-build-yalJPT/src/MainLoop.cpp:1021
#31 0x00007f3e00c65990 in std::function<void ()>::operator=(decltype(nullptr)) at /usr/include/c++/8/bits/std_function.h:495
#32 0x00007f3df4599c20 in WorkerThread::loop() at /tmp/factorio-build-yalJPT/src/Util/WorkerThread.cpp:42
#33 0x00007f3e00ca9af0 in execute_native_thread_routine at blake2s.c:?
#34 0x00007f3e00c65a50 in ?? at ??:0
#35 0x00007f3e916a6960 in ?? at ??:0
Stack trace logging done

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

Re: [0.17.59] LuaSurface.request_path crash

Post by Rseding91 »

Thanks for the report. Can you please post the full log file?
If you want to get ahold of me I'm almost always on Discord.

dorfl
Inserter
Inserter
Posts: 44
Joined: Mon May 28, 2018 12:49 am
Contact:

Re: [0.17.59] LuaSurface.request_path crash

Post by dorfl »

factorio-current.log
(20.84 KiB) Downloaded 183 times

User avatar
Klonan
Factorio Staff
Factorio Staff
Posts: 5150
Joined: Sun Jan 11, 2015 2:09 pm
Contact:

Re: [0.17.59] LuaSurface.request_path crash

Post by Klonan »

Thanks for the report,

It is fixed for the next release

Post Reply

Return to “Resolved Problems and Bugs”