--Bug fixes: Navmesh building and reconfigure in viewer.py#1632
--Bug fixes: Navmesh building and reconfigure in viewer.py#1632jturner65 merged 3 commits intofacebookresearch:mainfrom
Conversation
| CORRADE_ASSERT( | ||
| joinedMesh->vbo.size() > 0, | ||
| "::recomputeNavMesh: " | ||
| "Unable to compute a navmesh upon a non-existent mesh - " | ||
| "the underlying joined collision mesh has no vertices. This is " | ||
| "probably due to the current scene being NONE.", | ||
| false); |
There was a problem hiding this comment.
Do we want to have this assert if the joinedMesh is empty? Or just fail? This will probably not occur often - would primarily happen if someone attempts to build a navmesh on the NONE scene, so just failing without the assertion would probably be fine, but I am not sure if there are possible situations where an assertion would be best (i.e. training and somehow an expected collision mesh is empty).
| ESP_CHECK(joinedMesh->vbo.size() > 0, | ||
| "::recomputeNavMesh: " | ||
| "Unable to compute a navmesh upon a non-existent mesh - " | ||
| "the underlying joined collision mesh has no vertices. This is " | ||
| "probably due to the current scene being NONE. Aborting"); |
There was a problem hiding this comment.
...or is it better to have ESP_CHECK for this, which will throw in python and can be trapped in a try if necessary.
There was a problem hiding this comment.
I like this approach, thanks for adding this check. I've seen the resulting issue a couple times and the current crash message response is non-obvious.
Motivation and Context
This small PR fixes 2 bugs :
How Has This Been Tested
Locally all python and c++ tests pass
Types of changes
Checklist