@Geont
I thought about providing you with yet a newer build that may address this, but come to think of it you are seeing these disconnections after hours at a time. It may take significant effort to reproduce, and we haven't had any fixes since the last preview version meant to target such soak-in crashes.
This error :
[10:32:41] [Warning] The device has entered Robust Mode to compensate for external sources of infrared light.
[10:32:41] [Critical] Unhandled exception: bad allocation
[10:32:41] [Critical] An unhandled exception occurred in a device context: bad allocation
means that for some reason a new
or malloc
failed, but of note is that it happens on a transition to robust mode. If you don't believe robust mode is necessary for your setup, and just happens occasionally due to the aluminum doors, you can disable robust mode via the Leap Motion Control Panel (and it would show up in config.json as "robust_mode_enabled": false
Whereas this error is a different signature:
[21:13:20] [Critical] Unhandled exception: resource unavailable try again: resource unavailable try again
[21:13:21] [Info] Tracking paused
This is the text of the EAGAIN error code, but it could be any Windows system call that caused it. Hopefully your setup has enough RAM, does not run an enormous number of processes, and has a reasonably fast disk (ideally an SSD). Those precautions might mitigate how often this happens, but since it can take hours or days it's very hard to troubleshoot.
It seems like you are making a museum-like installation that must be running for a very long time. Since we won't be able to make this rock solid to stay up for days anytime soon, perhaps you should have a fallback script that restarts the service when frames stop streaming?