darbycostello / Nav3D

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

Crash on Closing PIE - Async? #5

Closed dom452 closed 3 years ago

dom452 commented 3 years ago

Me again! Seems there's a crash that happens when stopping the Play In Editor in UE4 4.26.

Crash note here: LoginId:6a1bbb5d4653cd5d3ad216bf32d6f7e6 EpicAccountId:06717951032a464eafe83530c299cadb

Unhandled Exception: EXCEPTION_ACCESS_VIOLATION reading address 0x0000024d7e643d9c

UE4Editor_Nav3D!UNav3DComponent::ExecutePathFinding() [C:\battletide_repo\Battletide\Plugins\Nav3D-main\Nav3D-main\Source\Nav3D\Private\Nav3DComponent.cpp:605] UE4Editor_Nav3D!FNav3DFindPathTask::DoWork() [C:\battletide_repo\Battletide\Plugins\Nav3D-main\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!FQueuedThread::Run() [D:\Build++UE4\Sync\Engine\Source\Runtime\Core\Private\HAL\ThreadingBase.cpp:992] UE4Editor_Core!FRunnableThreadWin::Run() [D:\Build++UE4\Sync\Engine\Source\Runtime\Core\Private\Windows\WindowsRunnableThread.cpp:86]

It's somewhat sporadic - my guess is that is happens when the PIE is stopped while a unit is in the act of finding an Async path? Let me know if I can help track this one down :)

darbycostello commented 3 years ago

Hi. I threw in some additional conditions to check validity of the octree volume, the current node and neighbouring edges, so it should hopefully catch any issues with closing PIE during a pathfinding task.

dom452 commented 3 years ago

Seems to be fixed! Thanks again! You're a legend :)