porisius / FicsitRemoteMonitoring

57 stars 12 forks source link

Reoccurring crash when webserver stays on for while #95

Open saffronjam opened 1 month ago

saffronjam commented 1 month ago

Hi again,

I know the description is rather vague, sorry about that.

I have noticed 3 separate crashes that seems to relate to the same null pointer reference. 2 times it happened (seemingly at random) when it was running, the last time when I exited my world. In my use case, I am sending a relatively large amount of requests to the webserver, so that could be one way to debug it I think.

Even though I could not reliably reproduce it during the last couple of days, it could just be a a simple null-check fix.

Crash 1:

Version: 372858, IsEditor: No, IsPerforceBuild: No, BuildConfiguration: Shipping, Launcher: Steam, NetMode: Standalone, IsUsingMods: Yes, IsSaveGameEdited: No

Unhandled Exception: EXCEPTION_ACCESS_VIOLATION reading address 0x0000000000000010

FactoryGameSteam_CoreUObject_Win64_Shipping!UObject::FindFunctionChecked() [C:\BuildAgent\work\b731a33f2a691e17\UE4\Engine\Source\Runtime\CoreUObject\Private\UObject\ScriptCore.cpp:1472]
FactoryGameSteam_FicsitRemoteMonitoring_Win64_Shipping!AFicsitRemoteMonitoring::CallEndpoint() [A:\workspace\SatisfactoryModLoader\Mods\FicsitRemoteMonitoring\Source\FicsitRemoteMonitoring\Private\FicsitRemoteMonitoring.cpp:591]
FactoryGameSteam_FicsitRemoteMonitoring_Win64_Shipping!AFicsitRemoteMonitoring::HandleEndpoint() [A:\workspace\SatisfactoryModLoader\Mods\FicsitRemoteMonitoring\Source\FicsitRemoteMonitoring\Private\FicsitRemoteMonitoring.cpp:604]
FactoryGameSteam_FicsitRemoteMonitoring_Win64_Shipping!AFicsitRemoteMonitoring::HandleApiRequest() [A:\workspace\SatisfactoryModLoader\Mods\FicsitRemoteMonitoring\Source\FicsitRemoteMonitoring\Private\FicsitRemoteMonitoring.cpp:370]
FactoryGameSteam_FicsitRemoteMonitoring_Win64_Shipping!``AFicsitRemoteMonitoring::StartWebSocketServer'::`2'::<lambda_1>::operator()'::`3'::<lambda_8>::operator()<uWS::HttpResponse<0>,uWS::HttpRequest>() [A:\workspace\SatisfactoryModLoader\Mods\FicsitRemoteMonitoring\Source\FicsitRemoteMonitoring\Private\FicsitRemoteMonitoring.cpp:204]
FactoryGameSteam_FicsitRemoteMonitoring_Win64_Shipping!ofats::any_detail::handler_traits<bool,uWS::HttpRouter<uWS::HttpContextData<0>::RouterData> *>::large_handler<`uWS::HttpContext<0>::onHttp'::`2'::<lambda_1> >::call() [A:\workspace\SatisfactoryModLoader\Mods\FicsitRemoteMonitoring\Source\ThirdParty\uWebSockets\MoveOnlyFunction.h:152]
FactoryGameSteam_FicsitRemoteMonitoring_Win64_Shipping!uWS::HttpRouter<uWS::HttpContextData<0>::RouterData>::executeHandlers() [A:\workspace\SatisfactoryModLoader\Mods\FicsitRemoteMonitoring\Source\ThirdParty\uWebSockets\HttpRouter.h:188]
FactoryGameSteam_FicsitRemoteMonitoring_Win64_Shipping!``uWS::HttpContext<0>::init'::`2'::<lambda_3>::operator()'::`2'::<lambda_1>::operator()() [A:\workspace\SatisfactoryModLoader\Mods\FicsitRemoteMonitoring\Source\ThirdParty\uWebSockets\HttpContext.h:177]
FactoryGameSteam_FicsitRemoteMonitoring_Win64_Shipping!uWS::HttpParser::fenceAndConsumePostPadded<0>() [A:\workspace\SatisfactoryModLoader\Mods\FicsitRemoteMonitoring\Source\ThirdParty\uWebSockets\HttpParser.h:514]
FactoryGameSteam_FicsitRemoteMonitoring_Win64_Shipping!uWS::HttpParser::consumePostPadded() [A:\workspace\SatisfactoryModLoader\Mods\FicsitRemoteMonitoring\Source\ThirdParty\uWebSockets\HttpParser.h:698]
FactoryGameSteam_FicsitRemoteMonitoring_Win64_Shipping!`uWS::HttpContext<0>::init'::`2'::<lambda_3>::operator()() [A:\workspace\SatisfactoryModLoader\Mods\FicsitRemoteMonitoring\Source\ThirdParty\uWebSockets\HttpContext.h:143]
FactoryGameSteam_FicsitRemoteMonitoring_Win64_Shipping!us_internal_dispatch_ready_poll() [A:\workspace\vcpkg\buildtrees\usockets\src\v0.8.8-af4482ba56.clean\src\loop.c:358]
uv
uv
FactoryGameSteam_FicsitRemoteMonitoring_Win64_Shipping!`AFicsitRemoteMonitoring::StartWebSocketServer'::`2'::<lambda_1>::operator()() [A:\workspace\SatisfactoryModLoader\Mods\FicsitRemoteMonitoring\Source\FicsitRemoteMonitoring\Private\FicsitRemoteMonitoring.cpp:222]
FactoryGameSteam_FicsitRemoteMonitoring_Win64_Shipping!TAsyncRunnable<void>::Run() [A:\Unreal Engine - CSS\Engine\Source\Runtime\Core\Public\Async\Async.h:457]
FactoryGameSteam_Core_Win64_Shipping!FRunnableThreadWin::Run() [C:\BuildAgent\work\b731a33f2a691e17\UE4\Engine\Source\Runtime\Core\Private\Windows\WindowsRunnableThread.cpp:149]

Crash 2:

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

Unhandled Exception: EXCEPTION_ACCESS_VIOLATION reading address 0x0000000000000010

FactoryGameSteam_CoreUObject_Win64_Shipping!UObject::FindFunctionChecked() [C:\BuildAgent\work\b731a33f2a691e17\UE4\Engine\Source\Runtime\CoreUObject\Private\UObject\ScriptCore.cpp:1472]
FactoryGameSteam_FicsitRemoteMonitoring_Win64_Shipping!AFicsitRemoteMonitoring::CallEndpoint() [A:\workspace\SatisfactoryModLoader\Mods\FicsitRemoteMonitoring\Source\FicsitRemoteMonitoring\Private\FicsitRemoteMonitoring.cpp:591]
FactoryGameSteam_FicsitRemoteMonitoring_Win64_Shipping!AFicsitRemoteMonitoring::HandleEndpoint() [A:\workspace\SatisfactoryModLoader\Mods\FicsitRemoteMonitoring\Source\FicsitRemoteMonitoring\Private\FicsitRemoteMonitoring.cpp:604]
FactoryGameSteam_FicsitRemoteMonitoring_Win64_Shipping!AFicsitRemoteMonitoring::HandleApiRequest() [A:\workspace\SatisfactoryModLoader\Mods\FicsitRemoteMonitoring\Source\FicsitRemoteMonitoring\Private\FicsitRemoteMonitoring.cpp:370]
FactoryGameSteam_FicsitRemoteMonitoring_Win64_Shipping!``AFicsitRemoteMonitoring::StartWebSocketServer'::`2'::<lambda_1>::operator()'::`3'::<lambda_8>::operator()<uWS::HttpResponse<0>,uWS::HttpRequest>() [A:\workspace\SatisfactoryModLoader\Mods\FicsitRemoteMonitoring\Source\FicsitRemoteMonitoring\Private\FicsitRemoteMonitoring.cpp:204]
FactoryGameSteam_FicsitRemoteMonitoring_Win64_Shipping!ofats::any_detail::handler_traits<bool,uWS::HttpRouter<uWS::HttpContextData<0>::RouterData> *>::large_handler<`uWS::HttpContext<0>::onHttp'::`2'::<lambda_1> >::call() [A:\workspace\SatisfactoryModLoader\Mods\FicsitRemoteMonitoring\Source\ThirdParty\uWebSockets\MoveOnlyFunction.h:152]
FactoryGameSteam_FicsitRemoteMonitoring_Win64_Shipping!uWS::HttpRouter<uWS::HttpContextData<0>::RouterData>::executeHandlers() [A:\workspace\SatisfactoryModLoader\Mods\FicsitRemoteMonitoring\Source\ThirdParty\uWebSockets\HttpRouter.h:188]
FactoryGameSteam_FicsitRemoteMonitoring_Win64_Shipping!``uWS::HttpContext<0>::init'::`2'::<lambda_3>::operator()'::`2'::<lambda_1>::operator()() [A:\workspace\SatisfactoryModLoader\Mods\FicsitRemoteMonitoring\Source\ThirdParty\uWebSockets\HttpContext.h:177]
FactoryGameSteam_FicsitRemoteMonitoring_Win64_Shipping!uWS::HttpParser::fenceAndConsumePostPadded<0>() [A:\workspace\SatisfactoryModLoader\Mods\FicsitRemoteMonitoring\Source\ThirdParty\uWebSockets\HttpParser.h:514]
FactoryGameSteam_FicsitRemoteMonitoring_Win64_Shipping!uWS::HttpParser::consumePostPadded() [A:\workspace\SatisfactoryModLoader\Mods\FicsitRemoteMonitoring\Source\ThirdParty\uWebSockets\HttpParser.h:698]
FactoryGameSteam_FicsitRemoteMonitoring_Win64_Shipping!`uWS::HttpContext<0>::init'::`2'::<lambda_3>::operator()() [A:\workspace\SatisfactoryModLoader\Mods\FicsitRemoteMonitoring\Source\ThirdParty\uWebSockets\HttpContext.h:143]
FactoryGameSteam_FicsitRemoteMonitoring_Win64_Shipping!us_internal_dispatch_ready_poll() [A:\workspace\vcpkg\buildtrees\usockets\src\v0.8.8-af4482ba56.clean\src\loop.c:358]
uv
uv
FactoryGameSteam_FicsitRemoteMonitoring_Win64_Shipping!`AFicsitRemoteMonitoring::StartWebSocketServer'::`2'::<lambda_1>::operator()() [A:\workspace\SatisfactoryModLoader\Mods\FicsitRemoteMonitoring\Source\FicsitRemoteMonitoring\Private\FicsitRemoteMonitoring.cpp:222]
FactoryGameSteam_FicsitRemoteMonitoring_Win64_Shipping!TAsyncRunnable<void>::Run() [A:\Unreal Engine - CSS\Engine\Source\Runtime\Core\Public\Async\Async.h:457]
FactoryGameSteam_Core_Win64_Shipping!FRunnableThreadWin::Run() [C:\BuildAgent\work\b731a33f2a691e17\UE4\Engine\Source\Runtime\Core\Private\Windows\WindowsRunnableThread.cpp:149]

Crash 3:

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

Unhandled Exception: EXCEPTION_ACCESS_VIOLATION reading address 0x0000000000000008

FactoryGameSteam_FicsitRemoteMonitoring_Win64_Shipping!AFicsitRemoteMonitoring::CallEndpoint() [A:\workspace\SatisfactoryModLoader\Mods\FicsitRemoteMonitoring\Source\FicsitRemoteMonitoring\Private\FicsitRemoteMonitoring.cpp:567]
FactoryGameSteam_FicsitRemoteMonitoring_Win64_Shipping!AFicsitRemoteMonitoring::HandleEndpoint() [A:\workspace\SatisfactoryModLoader\Mods\FicsitRemoteMonitoring\Source\FicsitRemoteMonitoring\Private\FicsitRemoteMonitoring.cpp:604]
FactoryGameSteam_FicsitRemoteMonitoring_Win64_Shipping!AFicsitRemoteMonitoring::HandleApiRequest() [A:\workspace\SatisfactoryModLoader\Mods\FicsitRemoteMonitoring\Source\FicsitRemoteMonitoring\Private\FicsitRemoteMonitoring.cpp:370]
FactoryGameSteam_FicsitRemoteMonitoring_Win64_Shipping!``AFicsitRemoteMonitoring::StartWebSocketServer'::`2'::<lambda_1>::operator()'::`3'::<lambda_8>::operator()<uWS::HttpResponse<0>,uWS::HttpRequest>() [A:\workspace\SatisfactoryModLoader\Mods\FicsitRemoteMonitoring\Source\FicsitRemoteMonitoring\Private\FicsitRemoteMonitoring.cpp:204]
FactoryGameSteam_FicsitRemoteMonitoring_Win64_Shipping!ofats::any_detail::handler_traits<bool,uWS::HttpRouter<uWS::HttpContextData<0>::RouterData> *>::large_handler<`uWS::HttpContext<0>::onHttp'::`2'::<lambda_1> >::call() [A:\workspace\SatisfactoryModLoader\Mods\FicsitRemoteMonitoring\Source\ThirdParty\uWebSockets\MoveOnlyFunction.h:152]
FactoryGameSteam_FicsitRemoteMonitoring_Win64_Shipping!uWS::HttpRouter<uWS::HttpContextData<0>::RouterData>::executeHandlers() [A:\workspace\SatisfactoryModLoader\Mods\FicsitRemoteMonitoring\Source\ThirdParty\uWebSockets\HttpRouter.h:188]
FactoryGameSteam_FicsitRemoteMonitoring_Win64_Shipping!``uWS::HttpContext<0>::init'::`2'::<lambda_3>::operator()'::`2'::<lambda_1>::operator()() [A:\workspace\SatisfactoryModLoader\Mods\FicsitRemoteMonitoring\Source\ThirdParty\uWebSockets\HttpContext.h:177]
FactoryGameSteam_FicsitRemoteMonitoring_Win64_Shipping!uWS::HttpParser::fenceAndConsumePostPadded<0>() [A:\workspace\SatisfactoryModLoader\Mods\FicsitRemoteMonitoring\Source\ThirdParty\uWebSockets\HttpParser.h:514]
FactoryGameSteam_FicsitRemoteMonitoring_Win64_Shipping!uWS::HttpParser::consumePostPadded() [A:\workspace\SatisfactoryModLoader\Mods\FicsitRemoteMonitoring\Source\ThirdParty\uWebSockets\HttpParser.h:698]
FactoryGameSteam_FicsitRemoteMonitoring_Win64_Shipping!`uWS::HttpContext<0>::init'::`2'::<lambda_3>::operator()() [A:\workspace\SatisfactoryModLoader\Mods\FicsitRemoteMonitoring\Source\ThirdParty\uWebSockets\HttpContext.h:143]
FactoryGameSteam_FicsitRemoteMonitoring_Win64_Shipping!us_internal_dispatch_ready_poll() [A:\workspace\vcpkg\buildtrees\usockets\src\v0.8.8-af4482ba56.clean\src\loop.c:358]
uv
uv
FactoryGameSteam_FicsitRemoteMonitoring_Win64_Shipping!`AFicsitRemoteMonitoring::StartWebSocketServer'::`2'::<lambda_1>::operator()() [A:\workspace\SatisfactoryModLoader\Mods\FicsitRemoteMonitoring\Source\FicsitRemoteMonitoring\Private\FicsitRemoteMonitoring.cpp:222]
FactoryGameSteam_FicsitRemoteMonitoring_Win64_Shipping!TAsyncRunnable<void>::Run() [A:\Unreal Engine - CSS\Engine\Source\Runtime\Core\Public\Async\Async.h:457]
FactoryGameSteam_Core_Win64_Shipping!FRunnableThreadWin::Run() [C:\BuildAgent\work\b731a33f2a691e17\UE4\Engine\Source\Runtime\Core\Private\Windows\WindowsRunnableThread.cpp:149]
porisius commented 1 month ago

Okay, this one is getting confusing... I coded up a try/catch to try to get more information. When I release a new test, I will ask for you to abuse it to the point that it you generate this error again.

Glad to see that it isn't a Linux vs Windows issue anymore.