Closed paulmelis closed 2 years ago
We fixed many similar issues, but this one still persists. The reason is that the cpp-wrappers manage the handles of created objects, and those are ospRelease
d in the destructor. In your example mesh
and model
are still alive after ospShutdown
. Then both are destroyed at exit, resulting in two ospRelease
at a time when there is no OSPRay device anymore, hence the two error messages. The local scoping on the other hand releases mesh and model before shutdown and all is good.
I think the printed hints are still warranted (because there are API calls without a valid OSPRay device), but the message is a bit misleading.
While looking at #431 noticed that
ospShutdown()
gives errors when there's still alive ospray objects. E.g. running thisgives
Apparently one error line per still-alive object. Removing the comments on the braces to put the two objects in local scope makes the errors on shutdown disappear. This is with 2.1.