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 when calling "gpu:bindScreen()" #205

Closed M-Marvin closed 2 years ago

M-Marvin commented 2 years ago

I have a problem with the GPUs. I have a computer that has 3 GPUs and 3 Screens attached. On start it runs this loop:

for index,screen in pairs(productionStatusLCDs) do
 local gpu = gpus[index]
 if (gpu ~= nil) then
  print("-> Screen detected " .. index)
  gpuScreen[screen] = gpu
  gpu:bindScreen(screen)
  event.listen(gpu)
  gpu:setSize(screenSizeX, screenSizeY)
 end
end

It simply gives every screen (listed in "productionStatusLCDs") a gpu (listed in "gpus"). But since this day, it crashes even if i try to load the world, if i remove the "bindScreen" function from the GPU, it starts, but then the screens are black, because they have no gpu ...

The crash report shows the crash when bindScreen ist enabled.

[2022.01.31-18.35.23:599][512]LogThreadingWindows: Error: Runnable thread TaskGraphThreadHP 31 crashed.
[2022.01.31-18.35.23:599][512]LogWindows: Error: === Critical error: ===
[2022.01.31-18.35.23:599][512]LogWindows: Error: 
[2022.01.31-18.35.23:599][512]LogWindows: Error: Assertion failed: IsInGameThread() || IsInSlateThread() [File:D:/ws/SB-211116092526-440/UE4/Engine/Source/Runtime/SlateCore/Private/Widgets/SWidget.cpp] [Line: 1119] 
[2022.01.31-18.35.23:599][512]LogWindows: Error: Slate can only be accessed from the GameThread or the SlateLoadingThread!
[2022.01.31-18.35.23:599][512]LogWindows: Error: 
[2022.01.31-18.35.23:599][512]LogWindows: Error: 
[2022.01.31-18.35.23:599][512]LogWindows: Error: [Callstack] 0x00007ffb016b4f69 KERNELBASE.dll!UnknownFunction []
[2022.01.31-18.35.23:599][512]LogWindows: Error: [Callstack] 0x00007ffa80ade0c6 FactoryGame-Core-Win64-Shipping.dll!ReportAssert() [D:\ws\SB-211116092526-440\UE4\Engine\Source\Runtime\Core\Private\Windows\WindowsPlatformCrashContext.cpp:1634]
[2022.01.31-18.35.23:599][512]LogWindows: Error: [Callstack] 0x00007ffa80ae0866 FactoryGame-Core-Win64-Shipping.dll!FWindowsErrorOutputDevice::Serialize() [D:\ws\SB-211116092526-440\UE4\Engine\Source\Runtime\Core\Private\Windows\WindowsErrorOutputDevice.cpp:78]
[2022.01.31-18.35.23:599][512]LogWindows: Error: [Callstack] 0x00007ffa80a593dd FactoryGame-Core-Win64-Shipping.dll!FOutputDevice::LogfImpl() [D:\ws\SB-211116092526-440\UE4\Engine\Source\Runtime\Core\Private\Misc\OutputDevice.cpp:61]
[2022.01.31-18.35.23:599][512]LogWindows: Error: [Callstack] 0x00007ffa80a0fd3b FactoryGame-Core-Win64-Shipping.dll!AssertFailedImplV() [D:\ws\SB-211116092526-440\UE4\Engine\Source\Runtime\Core\Private\Misc\AssertionMacros.cpp:104]
[2022.01.31-18.35.23:599][512]LogWindows: Error: [Callstack] 0x00007ffa80a11900 FactoryGame-Core-Win64-Shipping.dll!FDebug::CheckVerifyFailedImpl() [D:\ws\SB-211116092526-440\UE4\Engine\Source\Runtime\Core\Private\Misc\AssertionMacros.cpp:461]
[2022.01.31-18.35.23:599][512]LogWindows: Error: [Callstack] 0x00007ffa7e54b22c FactoryGame-SlateCore-Win64-Shipping.dll!SWidget::Invalidate() [D:\ws\SB-211116092526-440\UE4\Engine\Source\Runtime\SlateCore\Private\Widgets\SWidget.cpp:1119]
[2022.01.31-18.35.23:599][512]LogWindows: Error: [Callstack] 0x00007ffa7e957920 FactoryGame-Slate-Win64-Shipping.dll!SScaleBox::RefreshSafeZoneScale() [D:\ws\SB-211116092526-440\UE4\Engine\Source\Runtime\Slate\Private\Widgets\Layout\SScaleBox.cpp:463]
[2022.01.31-18.35.23:599][512]LogWindows: Error: [Callstack] 0x00007ffa7e920edc FactoryGame-Slate-Win64-Shipping.dll!SScaleBox::Construct() [D:\ws\SB-211116092526-440\UE4\Engine\Source\Runtime\Slate\Private\Widgets\Layout\SScaleBox.cpp:40]
[2022.01.31-18.35.23:599][512]LogWindows: Error: [Callstack] 0x00007ffa6e0c67fb FactoryGame-FicsItNetworks-Win64-Shipping.dll!TDecl<SScaleBox,RequiredArgs::T0RequiredArgs>::operator<<=() [G:\Projects\Satisfactory\SatisfactoryUnrealEngine\Engine\Source\Runtime\SlateCore\Public\Widgets\DeclarativeSyntaxSupport.h:1122]
[2022.01.31-18.35.23:599][512]LogWindows: Error: [Callstack] 0x00007ffa6e20eceb FactoryGame-FicsItNetworks-Win64-Shipping.dll!AFINScreen::SetWidget() [G:\Projects\Satisfactory\SatisfactoryModLoader\Plugins\FicsItNetworks\Source\FicsItNetworks\Components\FINScreen.cpp:136]
[2022.01.31-18.35.23:599][512]LogWindows: Error: [Callstack] 0x00007ffa6e0f3008 FactoryGame-FicsItNetworks-Win64-Shipping.dll!AFINComputerGPU::DropWidget() [G:\Projects\Satisfactory\SatisfactoryModLoader\Plugins\FicsItNetworks\Source\FicsItNetworks\Computer\FINComputerGPU.cpp:75]
[2022.01.31-18.35.23:599][512]LogWindows: Error: [Callstack] 0x00007ffa6e0daed4 FactoryGame-FicsItNetworks-Win64-Shipping.dll!AFINComputerGPU::BindScreen() [G:\Projects\Satisfactory\SatisfactoryModLoader\Plugins\FicsItNetworks\Source\FicsItNetworks\Computer\FINComputerGPU.cpp:57]
[2022.01.31-18.35.23:599][512]LogWindows: Error: [Callstack] 0x00007ffa6e0da953 FactoryGame-FicsItNetworks-Win64-Shipping.dll!AFINScreen::BindGPU() [G:\Projects\Satisfactory\SatisfactoryModLoader\Plugins\FicsItNetworks\Source\FicsItNetworks\Components\FINScreen.cpp:120]
[2022.01.31-18.35.23:599][512]LogWindows: Error: [Callstack] 0x00007ffa6e0dae5a FactoryGame-FicsItNetworks-Win64-Shipping.dll!AFINComputerGPU::BindScreen() [G:\Projects\Satisfactory\SatisfactoryModLoader\Plugins\FicsItNetworks\Source\FicsItNetworks\Computer\FINComputerGPU.cpp:55]
[2022.01.31-18.35.23:599][512]LogWindows: Error: [Callstack] 0x00007ffa6e24a5d9 FactoryGame-FicsItNetworks-Win64-Shipping.dll!AFINComputerGPUT1::netFunc_bindScreen() [G:\Projects\Satisfactory\SatisfactoryModLoader\Plugins\FicsItNetworks\Source\FicsItNetworks\Computer\FINComputerGPUT1.cpp:308]
[2022.01.31-18.35.23:599][512]LogWindows: Error: [Callstack] 0x00007ffa6e277936 FactoryGame-FicsItNetworks-Win64-Shipping.dll!AFINComputerGPUT1::execnetFunc_bindScreen() [G:\Projects\Satisfactory\SatisfactoryModLoader\Plugins\FicsItNetworks\Intermediate\Build\Win64\FactoryGame\Inc\FicsItNetworks\FINComputerGPUT1.gen.cpp:452]
[2022.01.31-18.35.23:599][512]LogWindows: Error: [Callstack] 0x00007ffa80527019 FactoryGame-CoreUObject-Win64-Shipping.dll!UFunction::Invoke() [D:\ws\SB-211116092526-440\UE4\Engine\Source\Runtime\CoreUObject\Private\UObject\Class.cpp:5589]
[2022.01.31-18.35.23:599][512]LogWindows: Error: [Callstack] 0x00007ffa806db855 FactoryGame-CoreUObject-Win64-Shipping.dll!UObject::ProcessEvent() [D:\ws\SB-211116092526-440\UE4\Engine\Source\Runtime\CoreUObject\Private\UObject\ScriptCore.cpp:1992]
[2022.01.31-18.35.23:599][512]LogWindows: Error: [Callstack] 0x00007ffa7ee62e62 FactoryGame-Engine-Win64-Shipping.dll!AActor::ProcessEvent() [D:\ws\SB-211116092526-440\UE4\Engine\Source\Runtime\Engine\Private\Actor.cpp:917]
[2022.01.31-18.35.23:599][512]LogWindows: Error: [Callstack] 0x00007ffa6e18794b FactoryGame-FicsItNetworks-Win64-Shipping.dll!UFINUFunction::Execute() [G:\Projects\Satisfactory\SatisfactoryModLoader\Plugins\FicsItNetworks\Source\FicsItNetworks\Reflection\FINUFunction.h:50]
[2022.01.31-18.35.23:599][512]LogWindows: Error: [Callstack] 0x00007ffa6e23c8ec FactoryGame-FicsItNetworks-Win64-Shipping.dll!FicsItKernel::Lua::luaCallFINFunc() [G:\Projects\Satisfactory\SatisfactoryModLoader\Plugins\FicsItNetworks\Source\FicsItNetworks\FicsItKernel\Processor\Lua\LuaRef.cpp:48]
[2022.01.31-18.35.23:599][512]LogWindows: Error: [Callstack] 0x00007ffa6e24150f FactoryGame-FicsItNetworks-Win64-Shipping.dll!FicsItKernel::Lua::luaInstanceFuncCall() [G:\Projects\Satisfactory\SatisfactoryModLoader\Plugins\FicsItNetworks\Source\FicsItNetworks\FicsItKernel\Processor\Lua\LuaInstance.cpp:121]
[2022.01.31-18.35.23:599][512]LogWindows: Error: [Callstack] 0x00007ffa6df67116 FactoryGame-FicsItNetworks-Win64-Shipping.dll!luaD_call() [G:\Projects\eris\src\ldo.c:483]
[2022.01.31-18.35.23:599][512]LogWindows: Error: [Callstack] 0x00007ffa6df911ab FactoryGame-FicsItNetworks-Win64-Shipping.dll!luaV_execute() [G:\Projects\eris\src\lvm.c:1615]
[2022.01.31-18.35.23:599][512]LogWindows: Error: [Callstack] 0x00007ffa6df6725c FactoryGame-FicsItNetworks-Win64-Shipping.dll!luaD_call() [G:\Projects\eris\src\ldo.c:511]
[2022.01.31-18.35.23:599][512]LogWindows: Error: [Callstack] 0x00007ffa6df911ab FactoryGame-FicsItNetworks-Win64-Shipping.dll!luaV_execute() [G:\Projects\eris\src\lvm.c:1615]
[2022.01.31-18.35.23:599][512]LogWindows: Error: [Callstack] 0x00007ffa6df6725c FactoryGame-FicsItNetworks-Win64-Shipping.dll!luaD_call() [G:\Projects\eris\src\ldo.c:511]
[2022.01.31-18.35.23:599][512]LogWindows: Error: [Callstack] 0x00007ffa6df6662c FactoryGame-FicsItNetworks-Win64-Shipping.dll!luaD_rawrunprotected() [G:\Projects\eris\src\ldo.c:146]
[2022.01.31-18.35.23:599][512]LogWindows: Error: [Callstack] 0x00007ffa6df67614 FactoryGame-FicsItNetworks-Win64-Shipping.dll!lua_resume() [G:\Projects\eris\src\ldo.c:680]
[2022.01.31-18.35.23:599][512]LogWindows: Error: [Callstack] 0x00007ffa6e1d7103 FactoryGame-FicsItNetworks-Win64-Shipping.dll!UFINLuaProcessor::LuaTick() [G:\Projects\Satisfactory\SatisfactoryModLoader\Plugins\FicsItNetworks\Source\FicsItNetworks\FicsItKernel\Processor\Lua\LuaProcessor.cpp:561]
[2022.01.31-18.35.23:599][512]LogWindows: Error: [Callstack] 0x00007ffa6e2621d1 FactoryGame-FicsItNetworks-Win64-Shipping.dll!FFINLuaProcessorTick::syncTick() [G:\Projects\Satisfactory\SatisfactoryModLoader\Plugins\FicsItNetworks\Source\FicsItNetworks\FicsItKernel\Processor\Lua\LuaProcessor.cpp:169]
[2022.01.31-18.35.23:599][512]LogWindows: Error: [Callstack] 0x00007ffa6e21c76b FactoryGame-FicsItNetworks-Win64-Shipping.dll!UFINKernelSystem::Tick() [G:\Projects\Satisfactory\SatisfactoryModLoader\Plugins\FicsItNetworks\Source\FicsItNetworks\FicsItKernel\FicsItKernel.cpp:123]
[2022.01.31-18.35.23:599][512]LogWindows: Error: [Callstack] 0x00007ffa6e194567 FactoryGame-FicsItNetworks-Win64-Shipping.dll!AFINComputerCase::Factory_Tick() [G:\Projects\Satisfactory\SatisfactoryModLoader\Plugins\FicsItNetworks\Source\FicsItNetworks\Computer\FINComputerCase.cpp:146]
[2022.01.31-18.35.23:599][512]LogWindows: Error: [Callstack] 0x00007ffa6fd85274 FactoryGame-FactoryGame-Win64-Shipping.dll!<lambda_9a1b75034c50804c2f23014618340d68>::operator()() [D:\ws\SB-211116092526-440\UE4\Games\FactoryGame\Source\FactoryGame\Private\FGBuildableSubsystem.cpp:532]
[2022.01.31-18.35.23:599][512]LogWindows: Error: [Callstack] 0x00007ffa6fd6aad3 FactoryGame-FactoryGame-Win64-Shipping.dll!ParallelForImpl::TParallelForData<TFunctionRef<void __cdecl(int)> >::Process() [D:\ws\SB-211116092526-440\UE4\Engine\Source\Runtime\Core\Public\Async\ParallelFor.h:177]
[2022.01.31-18.35.23:599][512]LogWindows: Error: [Callstack] 0x00007ffa6fd51535 FactoryGame-FactoryGame-Win64-Shipping.dll!TGraphTask<ParallelForImpl::TParallelForTask<TFunctionRef<void __cdecl(int)> > >::ExecuteTask() [D:\ws\SB-211116092526-440\UE4\Engine\Source\Runtime\Core\Public\Async\TaskGraphInterfaces.h:886]
[2022.01.31-18.35.23:599][512]LogWindows: Error: [Callstack] 0x00007ffa808c74c7 FactoryGame-Core-Win64-Shipping.dll!FTaskThreadAnyThread::ProcessTasksUntilQuit() [D:\ws\SB-211116092526-440\UE4\Engine\Source\Runtime\Core\Private\Async\TaskGraph.cpp:887]
[2022.01.31-18.35.23:599][512]LogWindows: Error: [Callstack] 0x00007ffa808ca822 FactoryGame-Core-Win64-Shipping.dll!FTaskThreadBase::Run() [D:\ws\SB-211116092526-440\UE4\Engine\Source\Runtime\Core\Private\Async\TaskGraph.cpp:541]
[2022.01.31-18.35.23:599][512]LogWindows: Error: [Callstack] 0x00007ffa80af4387 FactoryGame-Core-Win64-Shipping.dll!FRunnableThreadWin::Run() [D:\ws\SB-211116092526-440\UE4\Engine\Source\Runtime\Core\Private\Windows\WindowsRunnableThread.cpp:86]
[2022.01.31-18.35.23:599][512]LogWindows: Error: [Callstack] 0x00007ffa80aed741 FactoryGame-Core-Win64-Shipping.dll!FRunnableThreadWin::GuardedRun() [D:\ws\SB-211116092526-440\UE4\Engine\Source\Runtime\Core\Private\Windows\WindowsRunnableThread.cpp:35]
[2022.01.31-18.35.23:599][512]LogWindows: Error: [Callstack] 0x00007ffb02b07034 KERNEL32.DLL!UnknownFunction []
[2022.01.31-18.35.23:599][512]LogWindows: Error: [Callstack] 0x00007ffb03b02651 ntdll.dll!UnknownFunction []
[2022.01.31-18.35.23:599][512]LogWindows: Error: 
[2022.01.31-18.35.23:599][512]LogWindows: Error: Crash in runnable thread TaskGraphThreadHP 31
[2022.01.31-18.35.23:619][512]LogExit: Executing StaticShutdownAfterError
[2022.01.31-18.35.23:619][512]LogWindows: FPlatformMisc::RequestExit(1)
[2022.01.31-18.35.23:619][512]LogCore: Engine exit requested (reason: Win RequestExit)
[2022.01.31-18.35.23:628][512]Log file closed, 01/31/22 19:35:23
ss8913 commented 2 years ago

@Panakotta00 this is exactly the problem I was having that I reported a couple weeks ago on the Discord server. This appears to still persist in the current version, at least up through the one released just before SFU6 came out. It's pretty critical as it can not only crash the game but also prevent saves from loading once the game has gotten into a bad state and been saved that way.

M-Marvin commented 2 years ago

Yes, I lost already 3 saves that way, but since in all 3 cases I was coding (and code gets saved seperatly) I could recover them with the autosaves.

ss8913 commented 2 years ago

any update on this? would be great if this could be addressed with the new build at it is catastrophic (game crashes, invalidates saves, etc). I notice in FINComputerGPU.cpp that there are some potential pointer dereferencing issues, ie, calling methods without checking for NULL, etc, but it's not a SEGV error so maybe unrelated. Didn't see anything "obvious" (I know C++ but I'm not super familiar with your code obviously)