Panakotta00 / FicsIt-Networks

Control, Monitor, Manage and Automate your Satisfactory.
https://ficsit.app/mod/FicsItNetworks
GNU General Public License v3.0
156 stars 51 forks source link

crash report #188

Closed kfpopeye closed 2 years ago

kfpopeye commented 2 years ago

Had Satisfactory crash today. Seems to happen at an different moment in the game each time. I made a script yesterday that displays the cargo of a train. If I run this script on 2 computers connected to 2 different train stations, could it cause problems if they both try to access the trains inventory?

Version: 174799, IsEditor: No, IsPerforceBuild: No, BuildConfiguration: Shipping, Launcher: Steam, NetMode: Listen Server, IsUsingMods: Yes

Unhandled Exception: EXCEPTION_ACCESS_VIOLATION reading address 0x0000000000000038

FactoryGame_CoreUObject_Win64_Shipping!UStruct::IsChildOf() [d:\ws\sb-211116092526-440\ue4\engine\source\runtime\coreuobject\public\uobject\class.h:485] FactoryGame_FactoryGame_Win64_Shipping!FSortByStackItemType::operator()() [d:\ws\sb-211116092526-440\ue4\games\factorygame\source\factorygame\private\fginventorycomponent.cpp:61] FactoryGame_FactoryGame_Win64_Shipping!AlgoImpl::IntroSortInternal<FInventoryStack,int,FIdentityFunctor,TDereferenceWrapper<FInventoryStack,FSortByStackItemType> >() [d:\ws\sb-211116092526-440\ue4\engine\source\runtime\core\public\algo\introsort.h:63] FactoryGame_FactoryGame_Win64_Shipping!UFGInventoryComponent::SortInventory() [d:\ws\sb-211116092526-440\ue4\games\factorygame\source\factorygame\private\fginventorycomponent.cpp:338] FactoryGame_FicsItNetworks_Win64_Shipping!::operator()() [C:\Jenkins\workspace\FicsIt-Networks_development\SatisfactoryModLoader\Plugins\FicsItNetworks\Source\FicsItNetworks\Reflection\FINStaticReflectionSource.cpp:152] FactoryGame_FicsItNetworks_Win64_Shipping!UE4Function_Private::TFunctionRefCaller<,TArray<FFINAnyNetworkValue,TSizedDefaultAllocator<32> > cdecl(FFINExecutionContext const &,TArray<FFINAnyNetworkValue,TSizedDefaultA() [C:\Jenkins\workspace\FicsIt-Networks_development\ue4\lb\win\Engine\Source\Runtime\Core\Public\Templates\Function.h:539] FactoryGame_FicsItNetworks_Win64_Shipping!UFINFunction::Execute() [C:\Jenkins\workspace\FicsIt-Networks_development\SatisfactoryModLoader\Plugins\FicsItNetworks\Source\FicsItNetworks\Reflection\FINFunction.h:65] FactoryGame_FicsItNetworks_Win64_Shipping!FicsItKernel::Lua::luaCallFINFunc() [C:\Jenkins\workspace\FicsIt-Networks_development\SatisfactoryModLoader\Plugins\FicsItNetworks\Source\FicsItNetworks\FicsItKernel\Processor\Lua\LuaRef.cpp:48] FactoryGame_FicsItNetworks_Win64_Shipping!FicsItKernel::Lua::luaInstanceFuncCall() [C:\Jenkins\workspace\FicsIt-Networks_development\SatisfactoryModLoader\Plugins\FicsItNetworks\Source\FicsItNetworks\FicsItKernel\Processor\Lua\LuaInstance.cpp:121] FactoryGame_FicsItNetworks_Win64_Shipping!luaD_call() FactoryGame_FicsItNetworks_Win64_Shipping!luaV_execute() FactoryGame_FicsItNetworks_Win64_Shipping!luaD_call() FactoryGame_FicsItNetworks_Win64_Shipping!luaV_execute() FactoryGame_FicsItNetworks_Win64_Shipping!luaD_call() FactoryGame_FicsItNetworks_Win64_Shipping!luaV_execute() FactoryGame_FicsItNetworks_Win64_Shipping!luaD_call() FactoryGame_FicsItNetworks_Win64_Shipping!luaV_execute() FactoryGame_FicsItNetworks_Win64_Shipping!luaD_callnoyield() FactoryGame_FicsItNetworks_Win64_Shipping!luaD_rawrunprotected() FactoryGame_FicsItNetworks_Win64_Shipping!lua_resume() FactoryGame_FicsItNetworks_Win64_Shipping!UFINLuaProcessor::LuaTick() [C:\Jenkins\workspace\FicsIt-Networks_development\SatisfactoryModLoader\Plugins\FicsItNetworks\Source\FicsItNetworks\FicsItKernel\Processor\Lua\LuaProcessor.cpp:556] FactoryGame_FicsItNetworks_Win64_Shipping!FFINLuaProcessorTick::syncTick() [C:\Jenkins\workspace\FicsIt-Networks_development\SatisfactoryModLoader\Plugins\FicsItNetworks\Source\FicsItNetworks\FicsItKernel\Processor\Lua\LuaProcessor.cpp:168] FactoryGame_FicsItNetworks_Win64_Shipping!UFINKernelSystem::Tick() [C:\Jenkins\workspace\FicsIt-Networks_development\SatisfactoryModLoader\Plugins\FicsItNetworks\Source\FicsItNetworks\FicsItKernel\FicsItKernel.cpp:123] FactoryGame_FicsItNetworks_Win64_Shipping!AFINComputerCase::Factory_Tick() [C:\Jenkins\workspace\FicsIt-Networks_development\SatisfactoryModLoader\Plugins\FicsItNetworks\Source\FicsItNetworks\Computer\FINComputerCase.cpp:146] FactoryGame_FactoryGame_Win64_Shipping!::operator()() [d:\ws\sb-211116092526-440\ue4\games\factorygame\source\factorygame\private\fgbuildablesubsystem.cpp:532] FactoryGame_FactoryGame_Win64_Shipping!ParallelForImpl::ParallelForInternal<TFunctionRef<void __cdecl(int)> >() [d:\ws\sb-211116092526-440\ue4\engine\source\runtime\core\public\async\parallelfor.h:227] FactoryGame_FactoryGame_Win64_Shipping!AFGBuildableSubsystem::TickFactoryActors() [d:\ws\sb-211116092526-440\ue4\games\factorygame\source\factorygame\private\fgbuildablesubsystem.cpp:547] FactoryGame_FactoryGame_Win64_Shipping!AFGBuildableSubsystem::TickFactory() [d:\ws\sb-211116092526-440\ue4\games\factorygame\source\factorygame\private\fgbuildablesubsystem.cpp:475] FactoryGame_FactoryGame_Win64_Shipping!FFactoryTickFunction::ExecuteTick() [d:\ws\sb-211116092526-440\ue4\games\factorygame\source\factorygame\private\factorytick.cpp:110] FactoryGame_Engine_Win64_Shipping!FTickFunctionTask::DoTask() [d:\ws\sb-211116092526-440\ue4\engine\source\runtime\engine\private\ticktaskmanager.cpp:289] FactoryGame_Engine_Win64_Shipping!TGraphTask::ExecuteTask() [d:\ws\sb-211116092526-440\ue4\engine\source\runtime\core\public\async\taskgraphinterfaces.h:891] FactoryGame_Core_Win64_Shipping!FNamedTaskThread::ProcessTasksUntilIdle() [d:\ws\sb-211116092526-440\ue4\engine\source\runtime\core\private\async\taskgraph.cpp:611] FactoryGame_Engine_Win64_Shipping!FTickTaskSequencer::ReleaseTickGroup() [d:\ws\sb-211116092526-440\ue4\engine\source\runtime\engine\private\ticktaskmanager.cpp:585] FactoryGame_Engine_Win64_Shipping!FTickTaskManager::RunTickGroup() [d:\ws\sb-211116092526-440\ue4\engine\source\runtime\engine\private\ticktaskmanager.cpp:1590] FactoryGame_Engine_Win64_Shipping!UWorld::Tick() [d:\ws\sb-211116092526-440\ue4\engine\source\runtime\engine\private\leveltick.cpp:1480] FactoryGame_Engine_Win64_Shipping!UGameEngine::Tick() [d:\ws\sb-211116092526-440\ue4\engine\source\runtime\engine\private\gameengine.cpp:1802] FactoryGame_FactoryGame_Win64_Shipping!UFGGameEngine::Tick() [d:\ws\sb-211116092526-440\ue4\games\factorygame\source\factorygame\private\fggameengine.cpp:16] FactoryGame_Win64_Shipping!FEngineLoop::Tick() [d:\ws\sb-211116092526-440\ue4\engine\source\runtime\launch\private\launchengineloop.cpp:4896] FactoryGame_Win64_Shipping!GuardedMain() [d:\ws\sb-211116092526-440\ue4\engine\source\runtime\launch\private\launch.cpp:169] FactoryGame_Win64_Shipping!GuardedMainWrapper() [d:\ws\sb-211116092526-440\ue4\engine\source\runtime\launch\private\windows\launchwindows.cpp:137] FactoryGame_Win64_Shipping!WinMain() [d:\ws\sb-211116092526-440\ue4\engine\source\runtime\launch\private\windows\launchwindows.cpp:268] FactoryGame_Win64_Shipping!scrt_common_main_seh() [d:\agent_work\2\s\src\vctools\crt\vcstartup\src\startup\exe_common.inl:288] kernel32 ntdll

kfpopeye commented 2 years ago

I noticed something else. When I reloaded my game, I noticed the large sign was completely blank. Usually means my Lua script has crashed but when I checked it was still running. In the end, I had to rebuild the large screen before it would start displaying info again.

Panakotta00 commented 2 years ago

Plz follow the exact instructions on how to report a bug providing everything as listed and make that new issue a new issue report

kfpopeye commented 2 years ago

I'm not sure how to replicate the crash. It happens at a different point in the game. I'm not even sure if it was the script I created but the crashes did start after I made the script. You can view it here: https://github.com/kfpopeye/Satisfactory/blob/main/Lua/train%20sign.lua. The script prints the next stop info to a large screen and then prints the inventory of the train to the screen tab in the computer. I have this script running at each train station.

Panakotta00 commented 2 years ago

try to minimize the code down to some few lines that can cause the isse and describe in detail what you do to recreate the issue, also maybe provide a debug file etc

kfpopeye commented 2 years ago

My script is most likely the source of the crash. I stopped all the computers running the script and the crashes stopped. I have 5 railstations each has a computer attached to it running the same script. Each computer has cpu, ram X1, screen driver, eeprom, gpu x2 and a large screen. I just leave the computers running while I build stuff or whatever and at some point Satisfactory crashes. I've had problems with a different script crashing the game but that was when I dismantled a codeable splitter connected to the running computer, so I'm careful about what I dismantle now.

This link has the crash log that Satisfactory generates: https://mega.nz/file/9RonXQwT#ZQ6Gxjm2YKt6VVw82S9Lr5b2U-f9rA2E4qYG1jX8tOc. I was using the same code when it was generated. I will try to cut down the script (or comment it more fully) next and get that to you.

kfpopeye commented 2 years ago

I've narrowed the crash down to the print inventory function. Commenting out the call to this function stopped the crashes.

--print the rail car inventory and # of slots used to a column on the tab screen
function printInventory(invs, col)
 local i = 0
 local row = 6
 invs:sort()
 gpu2:setText(0, 5, "Inventories -----------------------------------------------------------------------------------------------")
 while (i < invs.Size) do
  local t = nil
  local stack = invs:getStack(i)
  if (stack.item) then t = stack.item.type end
  if(t) then
   local c = stack.count
   local m = t.max
   local n = string.sub(t.name, 1, 20)
   gpu2:setText(col, row, n .. ": " .. c .. "/" .. m)
   row = row + 1
  end
  i = i + 1
  if(i == invs.Size and row > 6) then gpu2:setText(col, row, "Slots used: " .. (row - 6) .. "/32") end
 end
 return row > 6
end
VoltairesPuppet commented 2 years ago

Try commenting out just the invs:sort() see if it remains stable.

kfpopeye commented 2 years ago

Yup. That got it. Switched all the computers and have been running them for a good 1/2 hour now without a crash.