darbycostello / Nav3D

3D Pathfinding and cover system plugin for UE4, using Sparse Voxel Octrees.
MIT License
118 stars 31 forks source link

Crash Report #4

Closed dom452 closed 3 years ago

dom452 commented 3 years ago

Getting strange crash when closing PIE Same project also correctly works in PIE, but does not work when built.

Editor crash report reads:

Assertion failed: (Index >= 0) & (Index < ArrayNum) [File:C:\Program Files\Epic Games\UE_4.26\Engine\Source\Runtime\Core\Public\Containers/Array.h] [Line: 674] Array index out of bounds: 1911904 from an array of size 56369

UE4Editor_Core UE4Editor_Core UE4Editor_Nav3D!DispatchCheckVerify<void, >() [C:\Program Files\Epic Games\UE_4.26\Engine\Source\Runtime\Core\Public\Misc\AssertionMacros.h:165] UE4Editor_Nav3D!ANav3DVolume::GetAdjacentLeafs() [C:\battletide_repo\Battletide\Plugins\Nav3D-main\Source\Nav3D\Private\Nav3DVolume.cpp:468] UE4Editor_Nav3D!UNav3DComponent::ExecutePathFinding() [C:\battletide_repo\Battletide\Plugins\Nav3D-main\Source\Nav3D\Private\Nav3DComponent.cpp:607] UE4Editor_Nav3D!FNav3DFindPathTask::DoWork() [C:\battletide_repo\Battletide\Plugins\Nav3D-main\Source\Nav3D\Public\Nav3DFindPathTask.h:46] UE4Editor_Nav3D!FAutoDeleteAsyncTask::DoWork() [C:\Program Files\Epic Games\UE_4.26\Engine\Source\Runtime\Core\Public\Async\AsyncWork.h:100] UE4Editor_Core UE4Editor_Core UE4Editor_Core kernel32 ntdll

thoughts?

darbycostello commented 3 years ago

I've added a common sense condition to that bit of code. That should prevent the crash. Be sure to delete your intermediates / binaries folders after downloading, to rebuild from latest source.

dom452 commented 3 years ago

I, I see! Got a type mismatch on that line (468) - so changed it to ..."< uint_fast32_t (Octree.Leafs.Num()))" and it built successfully - was that the right move? Asking cos when I tested it - it popped the below and crashed on exiting PIE and don't know if it's my fault?

Unhandled Exception: EXCEPTION_ACCESS_VIOLATION reading address 0x0000025427d95d08

UE4Editor_Nav3D!ANav3DVolume::GetEdgeLocation() [C:\battletide_repo\Battletide\Plugins\Nav3D-main\Source\Nav3D\Private\Nav3DVolume.cpp:409] UE4Editor_Nav3D!UNav3DComponent::HeuristicScore() [C:\battletide_repo\Battletide\Plugins\Nav3D-main\Source\Nav3D\Private\Nav3DComponent.cpp:661] UE4Editor_Nav3D!UNav3DComponent::ExecutePathFinding() [C:\battletide_repo\Battletide\Plugins\Nav3D-main\Source\Nav3D\Private\Nav3DComponent.cpp:642] UE4Editor_Nav3D!FNav3DFindPathTask::DoWork() [C:\battletide_repo\Battletide\Plugins\Nav3D-main\Source\Nav3D\Public\Nav3DFindPathTask.h:46] UE4Editor_Nav3D!FAutoDeleteAsyncTask::DoWork() [C:\Program Files\Epic Games\UE_4.26\Engine\Source\Runtime\Core\Public\Async\AsyncWork.h:100] UE4Editor_Core UE4Editor_Core UE4Editor_Core kernel32 ntdll

really appreciate your time, btw. This plugin is awesome and we'll have to figure out some usage rights thing at some point!

darbycostello commented 3 years ago

That's what I get for editing directly in Github without testing. I'll pull it up later but essentially yes, I probably needed to static cast that array count. There are no usage rights for this plugin, everything I put up here is GPL, so fill your boots. My commercial work is not public.

dom452 commented 3 years ago

Fixed! TY!