Crash when too many attackers?

Place to get help with not working mods / modding interface.
Peppe
Fast Inserter
Fast Inserter
Posts: 223
Joined: Fri Nov 28, 2014 6:48 pm
Contact:

Crash when too many attackers?

Post by Peppe »

So I am trying to trigger an attack whenever I launch a rocket.

My test was just to find enemies around the launch area and set them to attack:
rocket.surface.find_enemy_units(rocket.position, 500*score)
I tell each one find the rocket and attack with minor ADD:
set_command({type = defines.command.attack_area, destination = rocket.position, radius = 5*score, distraction = defines.distraction.by_enemy})

My test run finds ~7000 units.

First run crashes after a few minutes.
I cap the units a few times and now at 2000 units it still crashes. I can keep going lower, but wonder if the crash may be something else:

Full log: http://pastebin.com/s0PkhN0U

End of log:

Code: Select all

boost::detail::function::void_function_obj_invoker0<boost::_bi::bind_t<void,void (__cdecl*)(ThreadBarrier * __ptr64,boost::chrono::time_point<boost::chrono::steady_clock,boost::chrono::duration<__int64,boost::ratio<1,1000000000> > > * __ptr64,boost::chrono::time_point<boost::chrono::steady_clock,boost::chrono::duration<__int64,boost::ratio<1,1000000000> > > * __ptr64,bool * __ptr64,bool),boost::_bi::list5<boost::_bi::value<ThreadBarrier * __ptr64>,boost::_bi::value<boost::chrono::time_point<boost::chrono::steady_clock,boost::chrono::duration<__int64,boost::ratio<1,1000000000> > > * __ptr64>,boost::_bi::value<boost::chrono::time_point<boost::chrono::steady_clock,boost::chrono::duration<__int64,boost::ratio<1,1000000000> > > * __ptr64>,boost::_bi::value<bool * __ptr64>,boost::_bi::value<bool> > >,void>::invoke
c:\cygwin64\tmp\factorio-llngfe\src\util\thread.cpp (34): Thread::loop
ERROR: SymGetLineFromAddr64, GetLastError: 487 (Address: 00007FF7B1921553)
00007FF7B1921553 (Factorio): (filename not available): boost::`anonymous namespace'::thread_start_function
f:\dd\vctools\crt\crtw32\startup\threadex.c (376): _callthreadstartex
f:\dd\vctools\crt\crtw32\startup\threadex.c (354): _threadstartex
ERROR: SymGetLineFromAddr64, GetLastError: 487 (Address: 00007FF846B58102)
00007FF846B58102 (KERNEL32): (filename not available): BaseThreadInitThunk
ERROR: SymGetLineFromAddr64, GetLastError: 487 (Address: 00007FF84890C5B4)
00007FF84890C5B4 (ntdll): (filename not available): RtlUserThreadStart
 324.778 Error Util.cpp:78: Unexpected error occurred. You can help us to solve the problem by posting the contents of the log file on the Factorio forums.

User avatar
DedlySpyder
Filter Inserter
Filter Inserter
Posts: 253
Joined: Fri Jun 20, 2014 11:42 am
Contact:

Re: Crash when too many attackers?

Post by DedlySpyder »

So, having no idea how the game handles biters, just throwing this out there, doesn't the game consider biters as "groups"? Could you try to find every group of biters within range?

As it stands I think you are just telling every biter within range to find its way to the rocket, so that's 7000 pathfinder calls (which IIRC was stated as being resource intensive atm)

Post Reply

Return to “Modding help”