Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

if f1:matches(table.unpack(e)) then XXX is crashing Satisfactory #361

Open
Rexx-Maxx opened this issue Nov 22, 2024 · 2 comments
Open

if f1:matches(table.unpack(e)) then XXX is crashing Satisfactory #361

Rexx-Maxx opened this issue Nov 22, 2024 · 2 comments

Comments

@Rexx-Maxx
Copy link

When introduced the line "f1:matches(table.unpack(eventData))" and execute. The app crashes (dump at bottom)

Code used:
splitter = component.proxy("C14E820A40B5AF1FDC549C94BCF0CD44")
Item_Storage = component.proxy(component.findComponent("Storage"))
panel = component.proxy("BB99DDB8457D5E0AB5FD04B3DAB6099F")

function Main()
while true do
local eventData = { event.pull(0) }

    if f1:matches(table.unpack(eventData)) then
		print("The event matches f1")
end
    
    if switch.state then 
    	splitter:transferItem(1) 
    end
end

end

function getModules()
switch = panel:getModule(0, 0)
switch.state = false
f1 = event.filter{sender=switch}

indicator = panel:getModule(0, 2)
indicator:setColor(1, 0, 0, 1)

text_output = panel:getModule(1, 0)

event.listen(switch)

end

function Init()
event.ignoreAll()
event.clear()

getModules()

end

function handle_switch()
if switch.state == true then
indicator:setColor(0, 1, 0, 1)
else
indicator:setColor(1, 0, 0, 1)
end
end

Init()
Main()

Generated Dump:
Version: 379322, IsEditor: No, IsPerforceBuild: No, BuildConfiguration: Shipping, Launcher: Steam, NetMode: Standalone, IsUsingMods: Yes, IsSaveGameEdited: No

Unhandled Exception: EXCEPTION_ACCESS_VIOLATION reading address 0x00000004ffffffff

FactoryGameSteam_FicsItReflection_Win64_Shipping!FFIRInstancedStruct::operator=() [C:\CI_work\FicsIt-Networks\FicsIt-Networks\SatisfactoryModLoader\Mods\FicsItNetworks\Source\FicsItReflection\Private\FIRInstancedStruct.cpp:46]
FactoryGameSteam_FicsItReflection_Win64_Shipping!<lambda_186c880e3f1223b116924519773bd36a>::operator()() [C:\CI_work\FicsIt-Networks\FicsIt-Networks\SatisfactoryModLoader\Mods\FicsItNetworks\Source\FicsItReflection\Private\Reflection\Source\FIRSourceStatic.cpp:302]
FactoryGameSteam_FicsItReflection_Win64_Shipping!UE::Core::Private::Function::TFunctionRefCaller<<lambda_186c880e3f1223b116924519773bd36a>,TArray<FFIRAnyValue,TSizedDefaultAllocator<32> > __cdecl(FFIRExecutionContext const &,TArray<FFIRAnyValue,TSizedDefault() [C:\CI_work\FicsIt-Networks\FicsIt-Networks\ue\Engine\Source\Runtime\Core\Public\Templates\Function.h:470]
FactoryGameSteam_FicsItReflection_Win64_Shipping!UFIRFunction::Execute() [C:\CI_work\FicsIt-Networks\FicsIt-Networks\SatisfactoryModLoader\Mods\FicsItNetworks\Source\FicsItReflection\Private\Reflection\FIRFunction.cpp:6]
FactoryGameSteam_FicsItNetworksLua_Win64_Shipping!FINLua::luaFIN_callReflectionFunctionDirectly() [C:\CI_work\FicsIt-Networks\FicsIt-Networks\SatisfactoryModLoader\Mods\FicsItNetworks\Source\FicsItNetworksLua\Private\FINLua\Reflection\LuaRef.cpp:201]
FactoryGameSteam_FicsItNetworksLua_Win64_Shipping!FINLua::luaFIN_callReflectionFunction() [C:\CI_work\FicsIt-Networks\FicsIt-Networks\SatisfactoryModLoader\Mods\FicsItNetworks\Source\FicsItNetworksLua\Private\FINLua\Reflection\LuaRef.cpp:219]
FactoryGameSteam_FicsItNetworksLua_Win64_Shipping!FINLua::luaFIN_callReflectionFunction() [C:\CI_work\FicsIt-Networks\FicsIt-Networks\SatisfactoryModLoader\Mods\FicsItNetworks\Source\FicsItNetworksLua\Private\FINLua\Reflection\LuaRef.cpp:251]
FactoryGameSteam_Eris_Win64_Shipping!luaD_call() [C:\CI_work\FicsIt-Networks\FicsIt-Networks\SatisfactoryModLoader\Mods\FicsItNetworks\ThirdParty\eris\src\ldo.c:485]
FactoryGameSteam_Eris_Win64_Shipping!luaV_execute() [C:\CI_work\FicsIt-Networks\FicsIt-Networks\SatisfactoryModLoader\Mods\FicsItNetworks\ThirdParty\eris\src\lvm.c:1615]
FactoryGameSteam_Eris_Win64_Shipping!resume() [C:\CI_work\FicsIt-Networks\FicsIt-Networks\SatisfactoryModLoader\Mods\FicsItNetworks\ThirdParty\eris\src\ldo.c:648]
FactoryGameSteam_Eris_Win64_Shipping!luaD_rawrunprotected() [C:\CI_work\FicsIt-Networks\FicsIt-Networks\SatisfactoryModLoader\Mods\FicsItNetworks\ThirdParty\eris\src\ldo.c:148]
FactoryGameSteam_Eris_Win64_Shipping!lua_resume() [C:\CI_work\FicsIt-Networks\FicsIt-Networks\SatisfactoryModLoader\Mods\FicsItNetworks\ThirdParty\eris\src\ldo.c:682]
FactoryGameSteam_FicsItNetworksLua_Win64_Shipping!UFINLuaProcessor::LuaTick() [C:\CI_work\FicsIt-Networks\FicsIt-Networks\SatisfactoryModLoader\Mods\FicsItNetworks\Source\FicsItNetworksLua\Private\FINLuaProcessor.cpp:579]
FactoryGameSteam_FicsItNetworksLua_Win64_Shipping!FFINLuaProcessorTick::syncTick() [C:\CI_work\FicsIt-Networks\FicsIt-Networks\SatisfactoryModLoader\Mods\FicsItNetworks\Source\FicsItNetworksLua\Private\FINLuaProcessor.cpp:177]
FactoryGameSteam_FicsItNetworksComputer_Win64_Shipping!AFINComputerCase::Factory_Tick() [C:\CI_work\FicsIt-Networks\FicsIt-Networks\SatisfactoryModLoader\Mods\FicsItNetworks\Source\FicsItNetworksComputer\Private\FINComputerCase.cpp:172]
FactoryGameSteam_FactoryGame_Win64_Shipping!UE::Core::Private::Function::TFunctionRefCaller<AFGBuildableSubsystem::TickFactoryActors'::24'::<lambda_1>,void __cdecl(int)>::Call() [C:\BuildAgent\work\b731a33f2a691e17\UE4\Engine\Source\Runtime\Core\Public\Templates\Function.h:479]
FactoryGameSteam_FactoryGame_Win64_Shipping!ParallelForImpl::ParallelForInternal<TFunctionRef<void __cdecl(int)>,ParallelFor'::2'::<lambda_1>,std::nullptr_t>'::2'::FParallelExecutor::operator()() [C:\BuildAgent\work\b731a33f2a691e17\UE4\Engine\Source\Runtime\Core\Public\Async\ParallelFor.h:116]
FactoryGameSteam_FactoryGame_Win64_Shipping!LowLevelTasks::TTaskDelegate<LowLevelTasks::FTask * __cdecl(bool),48>::TTaskDelegateImpl<LowLevelTasks::FTask::Init<ParallelForImpl::ParallelForInternal<TFunctionRef<void __cdecl(int)>,ParallelFor'::2'::<lambda() [C:\BuildAgent\work\b731a33f2a691e17\UE4\Engine\Source\Runtime\Core\Public\Async\Fundamental\TaskDelegate.h:171]
FactoryGameSteam_Core_Win64_Shipping!LowLevelTasks::FTask::ExecuteTask() [C:\BuildAgent\work\b731a33f2a691e17\UE4\Engine\Source\Runtime\Core\Public\Async\Fundamental\Task.h:627]
FactoryGameSteam_Core_Win64_Shipping!LowLevelTasks::FScheduler::TryExecuteTaskFrom<LowLevelTasks::TLocalQueueRegistry<1024>::TLocalQueue,&LowLevelTasks::TLocalQueueRegistry<1024>::TLocalQueue::DequeueGlobal,0>() [C:\BuildAgent\work\b731a33f2a691e17\UE4\Engine\Source\Runtime\Core\Private\Async\Fundamental\Scheduler.cpp:349]
FactoryGameSteam_Core_Win64_Shipping!LowLevelTasks::FScheduler::WorkerMain() [C:\BuildAgent\work\b731a33f2a691e17\UE4\Engine\Source\Runtime\Core\Private\Async\Fundamental\Scheduler.cpp:378]
FactoryGameSteam_Core_Win64_Shipping!UE::Core::Private::Function::TFunctionRefCaller<LowLevelTasks::FScheduler::CreateWorker'::2'::<lambda_1>,void __cdecl(void)>::Call() [C:\BuildAgent\work\b731a33f2a691e17\UE4\Engine\Source\Runtime\Core\Public\Templates\Function.h:480]
FactoryGameSteam_Core_Win64_Shipping!FThreadImpl::Run() [C:\BuildAgent\work\b731a33f2a691e17\UE4\Engine\Source\Runtime\Core\Private\HAL\Thread.cpp:68]
FactoryGameSteam_Core_Win64_Shipping!FRunnableThreadWin::Run() [C:\BuildAgent\work\b731a33f2a691e17\UE4\Engine\Source\Runtime\Core\Private\Windows\WindowsRunnableThread.cpp:149]

@Rexx-Maxx
Copy link
Author

Was able to bypass by changing:
local eventData = { event.pull(0) }
to
local eventData = { event.pull() }

So am guessing the high tick volume is the problem perhaps. Though kinda guessing means the splitter might not be handled in the main loop - so perhaps would need to handle the splitter:transferItem(1) in a standalone thread perhaps to get around that....??

@Rexx-Maxx
Copy link
Author

out of curiosity tried to set local eventData = { event.pull(1) } i.e. 1 second ticks. Crashed again, but after about 20 secs.

So seems to be something around that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant