pelicanmapping / rocky

3D Geospatial SDK (C++17 / Vulkan / VSG)
MIT License
91 stars 15 forks source link

Assertions cause forced exit after any MapNode or SkyNode is destroyed. #31

Open AnyOldName3 opened 3 months ago

AnyOldName3 commented 3 months ago

rocky::MapNode, rocky::SkyNode and possibly other classes copy the InstanceVSG object they're constructed with, and when they're destroyed, so is their copy of the instance. However, when an instance is destroyed, it sets rocky::Instance::_global_status to GeneralError, and as that's static, it means Instance::status() will return a failed status for all instances, and ROCKY_HARD_ASSERT_STATUS will self-destruct.

Either these nodes shouldn't be copying the instance, or the instance status shouldn't be static so the destroyed instances don't pollute the surviving ones.