x

Search in
Sort by:

Question Status:

Search help

  • Simple searches use one or more words. Separate the words with spaces (cat dog) to search cat,dog or both. Separate the words with plus signs (cat +dog) to search for items that may contain cat but must contain dog.
  • You can further refine your search on the search results page, where you can search by keywords, author, topic. These can be combined with each other. Examples
    • cat dog --matches anything with cat,dog or both
    • cat +dog --searches for cat +dog where dog is a mandatory term
    • cat -dog -- searches for cat excluding any result containing dog
    • [cats] —will restrict your search to results with topic named "cats"
    • [cats] [dogs] —will restrict your search to results with both topics, "cats", and "dogs"

Office Holiday

Epic Games' offices will be on holiday from June 22nd to July 7th. During this period support will be limited. Our offices will reopen on Monday, July 8th. 

Find path runtime ERR

I use this code to find actor's turn point in his path https://answers.unrealengine.com/questions/288755/findpathsync-finds-only-2-points.html

 FPathFindingQuery Query;
         FAIMoveRequest MoveReq(destination);
         MoveReq.SetUsePathfinding(true);
 
         bool bValidQuery = ((AAIController*)viking->GetController())->PreparePathfinding(MoveReq, Query);
 
         if (bValidQuery)
         {
             const FNavAgentProperties navAgetProp = FNavAgentProperties(34, 176);
 
             UNavigationSystem* NavSys = UNavigationSystem::GetCurrent(GetWorld());
             FPathFindingResult PathResult;
             
 
             PathResult = NavSys->FindPathSync(navAgetProp, Query);
             PathResult.Path.Get()->CastPath<FNavMeshPath>()->PerformStringPulling(viking->GetActorLocation(), destination);
 
             for (int i = 1; i < PathResult.Path->GetPathPoints().Num(); i++)
             {
                 Result.AddUnique(PathResult.Path->GetPathPoints()[i].Location);
             }
         }

The problem is that the engine crashes when destination is in unreachable point which the engine cannot build valid path for it : alt text

Here is the crash window:

MachineId:80046BB240F2576A6B7181B41DEBFE72 EpicAccountId:986026d98d7e497fae05cf1844d2919b

Access violation - code c0000005 (first/second chance not available)

""

UE4Editor_Navmesh!dtNavMeshQuery::findStraightPath() [d:\buildfarm\buildmachine_++depot+ue4-releases+4.8\engine\source\runtime\navmesh\private\detour\detournavmeshquery.cpp:2160] UE4Editor_Engine!FPImplRecastNavMesh::FindStraightPath() [d:\buildfarm\buildmachine_++depot+ue4-releases+4.8\engine\source\runtime\engine\private\ai\navigation\pimplrecastnavmesh.cpp:1084] UE4Editor_Engine!FNavMeshPath::PerformStringPulling() [d:\buildfarm\buildmachine_++depot+ue4-releases+4.8\engine\source\runtime\engine\private\ai\navigation\navigationpath.cpp:458] UE4Editor_ANordicTale!AVikingWalkGroup::SearchTurnPoints() [c:\users\udi\documents\unreal projects\anordictale\source\anordictale\vikingwalkgroup.cpp:182] UE4Editor_ANordicTale!AVikingWalkGroup::Tick() [c:\users\udi\documents\unreal projects\anordictale\source\anordictale\vikingwalkgroup.cpp:35] UE4Editor_Engine!AActor::TickActor() [d:\buildfarm\buildmachine_++depot+ue4-releases+4.8\engine\source\runtime\engine\private\actor.cpp:670] UE4Editor_Engine!FActorTickFunction::ExecuteTick() [d:\buildfarm\buildmachine_++depot+ue4-releases+4.8\engine\source\runtime\engine\private\actor.cpp:105] UE4Editor_Engine!FTickTaskSequencer::FTickFunctionTask::DoTask() [d:\buildfarm\buildmachine_++depot+ue4-releases+4.8\engine\source\runtime\engine\private\ticktaskmanager.cpp:113] UE4Editor_Engine!TGraphTask::ExecuteTask() [d:\buildfarm\buildmachine_++depot+ue4-releases+4.8\engine\source\runtime\core\public\async\taskgraphinterfaces.h:753] UE4Editor_Core!FTaskThread::ProcessTasks() [d:\buildfarm\buildmachine_++depot+ue4-releases+4.8\engine\source\runtime\core\private\async\taskgraph.cpp:430] UE4Editor_Core!FTaskThread::ProcessTasksUntilQuit() [d:\buildfarm\buildmachine_++depot+ue4-releases+4.8\engine\source\runtime\core\private\async\taskgraph.cpp:273] UE4Editor_Core!FTaskGraphImplementation::WaitUntilTasksComplete() [d:\buildfarm\buildmachine_++depot+ue4-releases+4.8\engine\source\runtime\core\private\async\taskgraph.cpp:991] UE4Editor_Engine!FTickTaskSequencer::ReleaseTickGroup() [d:\buildfarm\buildmachine_++depot+ue4-releases+4.8\engine\source\runtime\engine\private\ticktaskmanager.cpp:243] UE4Editor_Engine!FTickTaskManager::RunTickGroup() [d:\buildfarm\buildmachine_++depot+ue4-releases+4.8\engine\source\runtime\engine\private\ticktaskmanager.cpp:643] UE4Editor_Engine!UWorld::RunTickGroup() [d:\buildfarm\buildmachine_++depot+ue4-releases+4.8\engine\source\runtime\engine\private\leveltick.cpp:697] UE4Editor_Engine!UWorld::Tick() [d:\buildfarm\buildmachine_++depot+ue4-releases+4.8\engine\source\runtime\engine\private\leveltick.cpp:1185] UE4Editor_UnrealEd!UEditorEngine::Tick() [d:\buildfarm\buildmachine_++depot+ue4-releases+4.8\engine\source\editor\unrealed\private\editorengine.cpp:1339] UE4Editor_UnrealEd!UUnrealEdEngine::Tick() [d:\buildfarm\buildmachine_++depot+ue4-releases+4.8\engine\source\editor\unrealed\private\unrealedengine.cpp:366] UE4Editor!FEngineLoop::Tick() [d:\buildfarm\buildmachine_++depot+ue4-releases+4.8\engine\source\runtime\launch\private\launchengineloop.cpp:2359] UE4Editor!GuardedMain() [d:\buildfarm\buildmachine_++depot+ue4-releases+4.8\engine\source\runtime\launch\private\launch.cpp:142] UE4Editor!GuardedMainWrapper() [d:\buildfarm\buildmachine_++depot+ue4-releases+4.8\engine\source\runtime\launch\private\windows\launchwindows.cpp:126] UE4Editor!WinMain() [d:\buildfarm\buildmachine_++depot+ue4-releases+4.8\engine\source\runtime\launch\private\windows\launchwindows.cpp:200]

Product Version: UE 4.8
Tags:
more ▼

asked Aug 28 '15 at 02:27 PM in Bug Reports

avatar image

Darkstorm1997
82 9 15 26

avatar image Shadowriver Aug 28 '15 at 03:03 PM

It's controlled crash, it a assert fail, m_nav is null which is set on init(), so it might be internal bug

https://github.com/EpicGames/UnrealEngine/blob/4.8/Engine/Source/Runtime/Navmesh/Private/Detour/DetourNavMeshQuery.cpp#L2158

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

1 answer: sort voted first

One thing that strikes me is that you're using PathResult blindly without any conditions checking if it's any good. This in general is not a good practice. Can you see if that's the case here?

Cheers,

--mieszko

more ▼

answered Sep 02 '15 at 10:44 PM

avatar image

MieszkoZ STAFF
7.3k 223 57 412

avatar image Darkstorm1997 Sep 03 '15 at 08:24 AM

You right, I have added check with IsSuccessful() and now the runtime error does not appear anymore. Thank you for pointing this out.

(comments are locked)
10|2000 characters needed characters left
Viewable by all users
Your answer
toggle preview:

Up to 5 attachments (including images) can be used with a maximum of 5.2 MB each and 5.2 MB total.

Follow this question

Once you sign in you will be able to subscribe for any updates here

Answers to this question