Momentary hang when quitting application using a Service Provider

#1716 · closed · 3 comments

View on GitHub ↗

rblenkinsopp

**Describe the bug** When quitting a built application, or stopping the editor, when using a Service Provider, the application/editor hangs for approximately 1-2 seconds. **To Reproduce** Steps to reproduce the behaviour: 1. Create a new project 2. Import Ultraleap Tracking 7.3.0 or latest develop 3. Enter Play Mode 4. Stop Play mode **Expected behavior** Application/editor stops back to Editor immediately. **Actual behaviour** The applications/editor hangs for 1-2 seconds (and shows the beachball on macOS). This only occurs when the Service Provider is in the scene. **Project details** - Unity version: 6.0 - Plugin/package version: 7.3.0/develop - Installation method: Local Git Checkout - Packages affected: Tracking **Environment** - OS: macOS

Comments

rblenkinsopp

I believe I've located the cause of this issue, it's the `LeapGetServerStatus` call waiting for it's long 1 second timeout internally, Unity can't shut down a native thread that's in-progress (at least not cleanly). I think this will require a native side/LeapC API change to fix properly.

rblenkinsopp

This should be fixed by (Internal PR): https://github.com/WeAreROLI/libtrack/pull/75 and further improved by: https://github.com/WeAreROLI/libtrack/pull/74

MaxPalmer-UH

Confirmed that this is fixed.