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.