o3de / o3de-multiplayersample

Multiplayer sample project for the Open 3D Engine
https://o3de.org
Other
79 stars 56 forks source link

Multiplayer Client Spam: "unsigned expected, got negative" #459

Closed AMZN-Gene closed 1 year ago

AMZN-Gene commented 1 year ago

The game client has a lot of log spam coming from a script (not sure which one)

Steps to reproduce Steps to reproduce the behavior:

  1. Open Editor
  2. Open NewStarbase
  3. Play the level (CTRL+G)

Expected behavior No log spam

Actual behavior

[Warning] (Script) - unsigned expected, got negative
[Warning] (Script) - number was too small for numerical limits
[Warning] (Script) - unsigned expected, got negative
[Warning] (Script) - number was too small for numerical limits
[Warning] (Script) - unsigned expected, got negative

The callstack is coming from Popcorn Fx, I noticed my PFX aren't working either so it's probably related.

>   MultiplayerSample.GameLauncher.exe!AZ::RestrictLuaNumbersToCpp(lua_State * lua, AZStd::basic_string_view<char,AZStd::char_traits<char>> msg) Line 1030  C++
    MultiplayerSample.GameLauncher.exe!AZ::ScriptValue<unsigned int>::StackRead(lua_State * l, int stackIndex) Line 1180    C++
    MultiplayerSample.GameLauncher.exe!AZ::Internal::LuaScriptNumber<unsigned int>::FromStack(lua_State * lua, int stackIndex, AZ::BehaviorArgument & value, AZ::BehaviorClass * valueClass, AZStd::static_buffer_allocator<256,16> * tempAllocator) Line 2425  C++
    MultiplayerSample.GameLauncher.exe!AZ::LuaScriptCaller::Call(lua_State * lua) Line 3499 C++
    [External Code] 
    ScriptCanvas.dll!ScriptCanvas::Execution::InterpretedSafeCall(lua_State * lua, int argCount, int returnValueCount) Line 424 C++
    ScriptCanvas.dll!ScriptCanvas::Execution::OutInterpreted::operator()(AZ::BehaviorArgument * __formal, AZ::BehaviorArgument * argsBVPs, int numArguments) Line 82    C++
    [Inline Frame] Multiplayer_ScriptCanvas.dll!AZStd::function_intermediate<void,AZ::BehaviorArgument *,AZ::BehaviorArgument *,int>::operator()(AZ::BehaviorArgument * &&) Line 604    C++
    [Inline Frame] Multiplayer_ScriptCanvas.dll!AZStd::function<void __cdecl(AZ::BehaviorArgument *,AZ::BehaviorArgument *,int)>::operator()(AZ::BehaviorArgument * <args_0>, AZ::BehaviorArgument * <args_1>, int <args_2>) Line 684   C++
    Multiplayer_ScriptCanvas.dll!ScriptCanvas::Nodeable::CallOut(unsigned __int64 index, AZ::BehaviorArgument * resultBVP, AZ::BehaviorArgument * argsBVPs, int numArguments) Line 34   C++
    [Inline Frame] Multiplayer_ScriptCanvas.dll!ScriptCanvas::Nodeable::ExecutionOut(unsigned __int64) Line 113 C++
    Multiplayer_ScriptCanvas.dll!ScriptCanvasMultiplayer::IfAgentTypeNodeable::CallIfClientType() Line 44   C++
    [Inline Frame] Multiplayer_ScriptCanvas.dll!AZ::Internal::CallMethodMember(void(AZStd::vector<AZ::EntityId,AZStd::allocator>::*)()) Line 41 C++
    [Inline Frame] Multiplayer_ScriptCanvas.dll!AZ::Internal::BehaviorMethodImpl::{ctor}::__l2::<lambda_1>::operator()(AZ::BehaviorArgument *) Line 90  C++
    [Inline Frame] Multiplayer_ScriptCanvas.dll!AZStd::Internal::INVOKE(AZ::Internal::BehaviorMethodImpl::{ctor}::__l2::<lambda_1> &) Line 208  C++
    [Inline Frame] Multiplayer_ScriptCanvas.dll!AZStd::invoke(AZ::Internal::BehaviorMethodImpl::{ctor}::__l2::<lambda_1> &) Line 54 C++
    [Inline Frame] Multiplayer_ScriptCanvas.dll!AZStd::Internal::function_util::invoke_void_return_wrapper<void>::call(AZ::Internal::BehaviorMethodImpl::{ctor}::__l2::<lambda_1> &) Line 41    C++
    Multiplayer_ScriptCanvas.dll!AZStd::Internal::function_util::get_invoker<void __cdecl(AZ::BehaviorArgument *,AZStd::span<AZ::BehaviorArgument,-1>),AZStd::Internal::function_util::function_obj_tag,AZStd::allocator>::call<`AZ::Internal::BehaviorMethodImpl::BehaviorMethodImpl<void,AZStd::vector<AZ::EntityId,AZStd::allocator>>'::`2'::<lambda_1>>(AZStd::Internal::function_util::function_buffer & function_obj_ptr, AZ::BehaviorArgument * && <args_0>, AZStd::span<AZ::BehaviorArgument,-1> && <args_1>) Line 172  C++
    [Inline Frame] Multiplayer_ScriptCanvas.dll!AZStd::function_intermediate<void,AZ::BehaviorArgument *,AZStd::span<AZ::BehaviorArgument,-1>>::operator()(AZ::BehaviorArgument * &&) Line 604  C++
    [Inline Frame] Multiplayer_ScriptCanvas.dll!AZStd::function<void __cdecl(AZ::BehaviorArgument *,AZStd::span<AZ::BehaviorArgument,-1>)>::operator()(AZ::BehaviorArgument * <args_0>, AZStd::span<AZ::BehaviorArgument,-1>) Line 684  C++
    Multiplayer_ScriptCanvas.dll!AZ::Internal::BehaviorMethodImpl::Call(AZStd::span<AZ::BehaviorArgument,-1> arguments, AZ::BehaviorArgument * result) Line 76  C++
    MultiplayerSample.GameLauncher.exe!AZ::BehaviorMethod::Call(AZ::BehaviorArgument * arguments, unsigned int numArguments, AZ::BehaviorArgument * result) Line 347    C++
    MultiplayerSample.GameLauncher.exe!AZ::LuaScriptCaller::Call(lua_State * lua) Line 3536 C++
    [External Code] 
    ScriptCanvas.dll!ScriptCanvas::Execution::InterpretedSafeCall(lua_State * lua, int argCount, int returnValueCount) Line 424 C++
    ScriptCanvas.dll!ScriptCanvas::Execution::OutInterpreted::operator()(AZ::BehaviorArgument * __formal, AZ::BehaviorArgument * argsBVPs, int numArguments) Line 82    C++
    [Inline Frame] PopcornFX.dll!AZStd::function_intermediate<void,AZ::BehaviorArgument *,AZ::BehaviorArgument *,int>::operator()(AZ::BehaviorArgument * &&) Line 604   C++
    [Inline Frame] PopcornFX.dll!AZStd::function<void __cdecl(AZ::BehaviorArgument *,AZ::BehaviorArgument *,int)>::operator()(AZ::BehaviorArgument * <args_0>, AZ::BehaviorArgument * <args_1>, int <args_2>) Line 684  C++
    PopcornFX.dll!ScriptCanvas::Nodeable::CallOut(unsigned __int64 index, AZ::BehaviorArgument * resultBVP, AZ::BehaviorArgument * argsBVPs, int numArguments) Line 34  C++
    [Inline Frame] PopcornFX.dll!ScriptCanvas::Nodeable::ExecutionOut(unsigned __int64) Line 113    C++
    PopcornFX.dll!ScriptCanvas::Nodeables::Core::RepeaterNodeable::CallComplete() Line 46   C++
    PopcornFX.dll!ScriptCanvas::Nodeables::Time::BaseTimer::OnTick(float delta, AZ::ScriptTimePoint __formal) Line 74   C++
    [Inline Frame] MultiplayerSample.GameLauncher.exe!AZStd::Internal::INVOKE(void(AZ::TickEvents::*)(float, AZ::ScriptTimePoint) &) Line 177   C++
    [Inline Frame] MultiplayerSample.GameLauncher.exe!AZStd::invoke(void(AZ::TickEvents::*)(float, AZ::ScriptTimePoint) &) Line 54  C++
    [Inline Frame] MultiplayerSample.GameLauncher.exe!AZ::EBusEventProcessingPolicy::Call(void(AZ::TickEvents::*)(float, AZ::ScriptTimePoint) &) Line 437   C++
    MultiplayerSample.GameLauncher.exe!AZ::Internal::EBusContainer<AZ::TickEvents,AZ::TickEvents,0,2>::Dispatcher<AZ::EBus<AZ::TickEvents,AZ::TickEvents>>::Broadcast<void (__cdecl AZ::TickEvents::*)(float,AZ::ScriptTimePoint),float const &,AZ::ScriptTimePoint>(void(AZ::TickEvents::*)(float, AZ::ScriptTimePoint) && func, const float & <args_0>, AZ::ScriptTimePoint && <args_1>) Line 1360    C++
    MultiplayerSample.GameLauncher.exe!AZ::ComponentApplication::Tick() Line 1513   C++
    [Inline Frame] MultiplayerSample.GameLauncher.exe!?A0xf794850f::RunMainLoop(AzGameFramework::GameApplication &) Line 113    C++
    MultiplayerSample.GameLauncher.exe!O3DELauncher::Run(const O3DELauncher::PlatformMainInfo & mainInfo) Line 582  C++
    MultiplayerSample.GameLauncher.exe!WinMain(HINSTANCE__ * hInstance, HINSTANCE__ * hPrevInstance, char * lpCmdLine, int nCmdShow) Line 29    C++

Found in Branch development

AMZN-Gene commented 1 year ago

I was using the wrong version of popcorn fx.