TriAxis-Games / RealtimeMeshComponent

Unreal Engine 5 plugin component for rendering runtime generated content.
https://rmc.triaxis.games/
Other
1.58k stars 412 forks source link

Unhandled Exception: EXCEPTION_ACCESS_VIOLATION reading address 0xffffffffffffffff #249

Closed whathty closed 1 year ago

whathty commented 1 year ago

### when i use one RealtimeMeshComponent generated the number of meshes >129 ,the ue5 will be crashed,the detail Crash repoter log like this,Is there some way to change this problem? Think you.

UnrealEditor_RealtimeMeshComponent!TMulticastDelegateBase<FDefaultDelegateUserPolicy>::CompactInvocationList() [D:\UE_5.0\Engine\Source\Runtime\Core\Public\Delegates\MulticastDelegateBase.h:191]
UnrealEditor_RealtimeMeshComponent!TMulticastDelegateBase<FDefaultDelegateUserPolicy>::AddDelegateInstance() [D:\UE_5.0\Engine\Source\Runtime\Core\Public\Delegates\MulticastDelegateBase.h:154]
UnrealEditor_RealtimeMeshComponent!RealtimeMesh::FRealtimeMeshLODData::CreateSectionGroup() [D:\UE5\loadObj\Plugins\RealtimeMeshComponent\Source\RealtimeMeshComponent\Private\Data\RealtimeMeshLOD.cpp:78]
UnrealEditor_RealtimeMeshComponent!URealtimeMeshSimple::CreateSectionGroupWithMesh() [D:\UE5\loadObj\Plugins\RealtimeMeshComponent\Source\RealtimeMeshComponent\Private\RealtimeMeshSimple.cpp:746]
UnrealEditor_RealtimeMeshComponent!URealtimeMeshSimple::execCreateSectionGroupWithMesh() [D:\UE5\loadObj\Plugins\RealtimeMeshComponent\Intermediate\Build\Win64\UnrealEditor\Inc\RealtimeMeshComponent\RealtimeMeshSimple.gen.cpp:403]
UnrealEditor_CoreUObject!UFunction::Invoke() [D:\build\++UE5\Sync\Engine\Source\Runtime\CoreUObject\Private\UObject\Class.cpp:5912]
UnrealEditor_CoreUObject!UObject::CallFunction() [D:\build\++UE5\Sync\Engine\Source\Runtime\CoreUObject\Private\UObject\ScriptCore.cpp:1012]
UnrealEditor_CoreUObject!UObject::ProcessContextOpcode() [D:\build\++UE5\Sync\Engine\Source\Runtime\CoreUObject\Private\UObject\ScriptCore.cpp:2871]
UnrealEditor_CoreUObject!UObject::execLet() [D:\build\++UE5\Sync\Engine\Source\Runtime\CoreUObject\Private\UObject\ScriptCore.cpp:2656]
UnrealEditor_CoreUObject!ProcessLocalScriptFunction() [D:\build\++UE5\Sync\Engine\Source\Runtime\CoreUObject\Private\UObject\ScriptCore.cpp:1082]
UnrealEditor_CoreUObject!ProcessScriptFunction<void (__cdecl*)(UObject *,FFrame &,void *)>() [D:\build\++UE5\Sync\Engine\Source\Runtime\CoreUObject\Private\UObject\ScriptCore.cpp:912]
UnrealEditor_CoreUObject!ProcessLocalFunction() [D:\build\++UE5\Sync\Engine\Source\Runtime\CoreUObject\Private\UObject\ScriptCore.cpp:1143]
UnrealEditor_CoreUObject!ProcessLocalScriptFunction() [D:\build\++UE5\Sync\Engine\Source\Runtime\CoreUObject\Private\UObject\ScriptCore.cpp:1082]
UnrealEditor_CoreUObject!UObject::ProcessInternal() [D:\build\++UE5\Sync\Engine\Source\Runtime\CoreUObject\Private\UObject\ScriptCore.cpp:1170]
UnrealEditor_CoreUObject!UFunction::Invoke() [D:\build\++UE5\Sync\Engine\Source\Runtime\CoreUObject\Private\UObject\Class.cpp:5912]
UnrealEditor_CoreUObject!UObject::ProcessEvent() [D:\build\++UE5\Sync\Engine\Source\Runtime\CoreUObject\Private\UObject\ScriptCore.cpp:2003]
UnrealEditor_Engine!AActor::ProcessEvent() [D:\build\++UE5\Sync\Engine\Source\Runtime\Engine\Private\Actor.cpp:1030]
UnrealEditor_Engine!AActor::BeginPlay() [D:\build\++UE5\Sync\Engine\Source\Runtime\Engine\Private\Actor.cpp:3909]
UnrealEditor_Engine!AActor::DispatchBeginPlay() [D:\build\++UE5\Sync\Engine\Source\Runtime\Engine\Private\Actor.cpp:3849]
UnrealEditor_Engine!AWorldSettings::NotifyBeginPlay() [D:\build\++UE5\Sync\Engine\Source\Runtime\Engine\Private\WorldSettings.cpp:283]
UnrealEditor_Engine!AGameMode::HandleMatchHasStarted() [D:\build\++UE5\Sync\Engine\Source\Runtime\Engine\Private\GameMode.cpp:222]
UnrealEditor_Engine!AGameMode::SetMatchState() [D:\build\++UE5\Sync\Engine\Source\Runtime\Engine\Private\GameMode.cpp:339]
UnrealEditor_Engine!AGameMode::StartMatch() [D:\build\++UE5\Sync\Engine\Source\Runtime\Engine\Private\GameMode.cpp:199]
UnrealEditor_Engine!UWorld::BeginPlay() [D:\build\++UE5\Sync\Engine\Source\Runtime\Engine\Private\World.cpp:4908]
UnrealEditor_Engine!UGameInstance::StartPlayInEditorGameInstance() [D:\build\++UE5\Sync\Engine\Source\Runtime\Engine\Private\GameInstance.cpp:500]
UnrealEditor_UnrealEd!UEditorEngine::CreateInnerProcessPIEGameInstance() [D:\build\++UE5\Sync\Engine\Source\Editor\UnrealEd\Private\PlayLevel.cpp:3052]
UnrealEditor_UnrealEd!UEditorEngine::OnLoginPIEComplete_Deferred() [D:\build\++UE5\Sync\Engine\Source\Editor\UnrealEd\Private\PlayLevel.cpp:1568]
UnrealEditor_UnrealEd!UEditorEngine::CreateNewPlayInEditorInstance() [D:\build\++UE5\Sync\Engine\Source\Editor\UnrealEd\Private\PlayLevel.cpp:1830]
UnrealEditor_UnrealEd!UEditorEngine::StartPlayInEditorSession() [D:\build\++UE5\Sync\Engine\Source\Editor\UnrealEd\Private\PlayLevel.cpp:2798]
UnrealEditor_UnrealEd!UEditorEngine::StartQueuedPlaySessionRequestImpl() [D:\build\++UE5\Sync\Engine\Source\Editor\UnrealEd\Private\PlayLevel.cpp:1148]
UnrealEditor_UnrealEd!UEditorEngine::StartQueuedPlaySessionRequest() [D:\build\++UE5\Sync\Engine\Source\Editor\UnrealEd\Private\PlayLevel.cpp:1051]
UnrealEditor_UnrealEd!UEditorEngine::Tick() [D:\build\++UE5\Sync\Engine\Source\Editor\UnrealEd\Private\EditorEngine.cpp:1665]
UnrealEditor_UnrealEd!UUnrealEdEngine::Tick() [D:\build\++UE5\Sync\Engine\Source\Editor\UnrealEd\Private\UnrealEdEngine.cpp:474]
UnrealEditor!FEngineLoop::Tick() [D:\build\++UE5\Sync\Engine\Source\Runtime\Launch\Private\LaunchEngineLoop.cpp:5215]
UnrealEditor!GuardedMain() [D:\build\++UE5\Sync\Engine\Source\Runtime\Launch\Private\Launch.cpp:183]
UnrealEditor!GuardedMainWrapper() [D:\build\++UE5\Sync\Engine\Source\Runtime\Launch\Private\Windows\LaunchWindows.cpp:147]
UnrealEditor!LaunchWindowsStartup() [D:\build\++UE5\Sync\Engine\Source\Runtime\Launch\Private\Windows\LaunchWindows.cpp:283]
UnrealEditor!WinMain() [D:\build\++UE5\Sync\Engine\Source\Runtime\Launch\Private\Windows\LaunchWindows.cpp:330]
UnrealEditor!__scrt_common_main_seh() [d:\a01\_work\6\s\src\vctools\crt\vcstartup\src\startup\exe_common.inl:288]
kernel32
ntdll
whathty commented 1 year ago

I Only use RealtimeMeshSimple blueprint f79002091e6743b53a66713d70a74aa 1a65df8578ec04231635141c437658b 19e30f18537afe6d22e5416e084332e

connorjak commented 1 year ago

Probably due to RMC's use of int8 as the section index, as per @Moddingear on the discord.

probably because it uses a char for section index, the max value is 127 there's nothing preventing you from changing that to an int, and the performance difference would be null

Notably, that's only possible with compiling the plugin from C++. Another fix would be making more components to use more mesh sections on.

Moddingear commented 1 year ago

You're creating 128+ section groups, you could try adding more sections to each section group. Each section group cant have INT16_MAX sections in it. Regarding that bug, it's because it's trying to access a negative index due to it being int8 and wrapping around. To be fair, noone uses that many sections.

whathty commented 1 year ago

@Moddingear @connorjak,Thanks a lot,It seem to work. Is there some settings to Pack this plugin? when I Packing the plugin to released game,the game can work well,But when the game exit,it will report bug Like this,I only use the example blueprints of plugins in game.

LowLevelFatalError [File:D:\build\++UE5\Sync\Engine\Source\Runtime\CoreUObject\Private\UObject\ScriptCore.cpp] [Line: 1323] 
Failed to find function OnCancel in None None.None

0x00007ff6ebb4df52 loadObj-Win64-Shipping.exe!UnknownFunction []
0x00007ff6eb09d6e3 loadObj-Win64-Shipping.exe!UnknownFunction []
0x00007ff6eb063b8a loadObj-Win64-Shipping.exe!UnknownFunction []
0x00007ff6eb8a68f4 loadObj-Win64-Shipping.exe!UnknownFunction []
0x00007ff6eb8b0a1f loadObj-Win64-Shipping.exe!UnknownFunction []
0x00007ff6ed1535ad loadObj-Win64-Shipping.exe!UnknownFunction []
0x00007ff6eb89a8b7 loadObj-Win64-Shipping.exe!UnknownFunction []
0x00007ff6eb89ad04 loadObj-Win64-Shipping.exe!UnknownFunction []
0x00007ff6eb030a76 loadObj-Win64-Shipping.exe!UnknownFunction []
0x00007ff6eb89a5f6 loadObj-Win64-Shipping.exe!UnknownFunction []
0x00007ff6eb9c63fb loadObj-Win64-Shipping.exe!UnknownFunction []
0x00007ff6eb9c67be loadObj-Win64-Shipping.exe!UnknownFunction []
0x00007ff6eb037042 loadObj-Win64-Shipping.exe!UnknownFunction []
0x00007ff6eb037606 loadObj-Win64-Shipping.exe!UnknownFunction []
0x00007ff6eb03765a loadObj-Win64-Shipping.exe!UnknownFunction []
0x00007ff6eb0388f4 loadObj-Win64-Shipping.exe!UnknownFunction []
0x00007ff6eb041314 loadObj-Win64-Shipping.exe!UnknownFunction []
0x00007ff6ee886c2e loadObj-Win64-Shipping.exe!UnknownFunction []
0x00007ffedecf7614 KERNEL32.DLL!UnknownFunction []
0x00007ffee0b226a1 ntdll.dll!UnknownFunction []

![Uploading e178a2b10e5460c27cbf7bf12fd748e.png…]()

ed2e2b194c24ff8a499a0542bf1bc38

Moddingear commented 1 year ago

Last comment is unrelated to this issue, open another issue. Marking this as resolved.