npruehs / ue4-rts

Real-time strategy plugin and showcase for Unreal Engine 4.
MIT License
747 stars 151 forks source link

UE4 Crashing, strange vision bug #143

Closed aqua-pro closed 3 years ago

aqua-pro commented 3 years ago

Hello!

First of all, thank you for the amazing plugin, it really is great!

We haven't really done anything special, we are just setting up the project following the Manual.

Sometimes vision doesn't load, sometimes vision loads and everything works correctly, and sometimes it crashes. It's quite random.

https://streamable.com/uchsv6

What more information could I offer to help resolve this issue? I really don't know what the issue might be

Thank you so much Best regards

Unhandled Exception: EXCEPTION_ACCESS_VIOLATION writing address 0x000002e8

UE4Editor_RealTimeStrategy_0001!ARTSVisionInfo::Initialize() [c:\ue4\skirmishonline\plugins\realtimestrategy\source\realtimestrategy\private\vision\rtsvisioninfo.cpp:42]
UE4Editor_RealTimeStrategy_0001!ARTSVisionManager::SetLocalVisionInfo() [c:\ue4\skirmishonline\plugins\realtimestrategy\source\realtimestrategy\private\vision\rtsvisionmanager.cpp:209]
UE4Editor_RealTimeStrategy_0001!ARTSPlayerController::NotifyOnVisionInfoAvailable() [c:\ue4\skirmishonline\plugins\realtimestrategy\source\realtimestrategy\private\rtsplayercontroller.cpp:1757]
UE4Editor_RealTimeStrategy_0001!ARTSPlayerController::NotifyOnTeamChanged() [c:\ue4\skirmishonline\plugins\realtimestrategy\source\realtimestrategy\private\rtsplayercontroller.cpp:1729]
UE4Editor_RealTimeStrategy_0001!ARTSPlayerState::NotifyOnTeamChanged() [c:\ue4\skirmishonline\plugins\realtimestrategy\source\realtimestrategy\private\rtsplayerstate.cpp:116]
UE4Editor_CoreUObject
UE4Editor_CoreUObject
UE4Editor_Engine
UE4Editor_Engine
UE4Editor_Engine
UE4Editor_Engine
UE4Editor_Engine
UE4Editor_Engine
UE4Editor_Engine
UE4Editor_Engine
UE4Editor_UnrealEd
UE4Editor_UnrealEd
UE4Editor
UE4Editor
UE4Editor
UE4Editor
UE4Editor
kernel32
ntdll
aqua-pro commented 3 years ago

Hello, I'm following up with some more info

I'm using UE 4 4.25.4, and I followed everything about the Manual as best as I could, multiple times even just to make sure

The project compiles successfully, inside and outside UE4

I've been testing and it seems to be something related to Multiplayer and the RTSFogOfWarActor. It only crashes in Multiplayer, and it only crashes when there's a RTSFogOfWarActor in the level. This also explains why the vision bugs out just before crashing.

As you can see, I've also followed the Manual in terms of setting up the RTSFogOfWarActor / Vision (Maps part of the Manual)

image

Again, thank you so much for the plugin, it's amazing

aqua-pro commented 3 years ago

Hello,

I've reproduced the same bug by just following the Manual (parts 1-4) again

I've uploaded the test project here in case someone wants to try it: https://easyupload.io/isnsvo

Thank you Best regards

npruehs commented 3 years ago

Hey @nope-nope !

That's odd. Are you running a listen or dedicated server? Is the game crashing on client or server side? Does this happen in editor or packaged builds?

Can you provide full log files of both client and server side for a session that crashed?

Best regards, Nick

aqua-pro commented 3 years ago

Hello @npruehs , thank you for responding!

Everything I've done yet is PIE (Play In Editor), I have not packaged the build yet.

Here are the crash log files (I think that's what you mean) https://easyupload.io/avkici

Here are my settings for PIE. However, it happens only when you do networking, it never happens in offline. I've noticed that with Listen Server, it's harder to make it crash, and that the easiest way to make it crash is with multiple clients (Play as Client) image

Thank you so much for responding, if you need any more information please let me know! Best regards

npruehs commented 3 years ago

It looks like I missed some valid checks when merging back major changes to the vision feature. I've commited a fix that prevents the crashes. Hope that helps!