microsoft / jacdac

Device and service catalogs for Jacdac.
https://aka.ms/jacdac
Creative Commons Attribution 4.0 International
66 stars 25 forks source link

Server simulator leaks into devices, cannot be stopped #513

Closed pelikhan closed 3 years ago

pelikhan commented 3 years ago

A simulator is started for servers and I cannot stop it:

image

The simulator shows up under devices instead of simulator, so there is no close icon on it.

image

tballmsft commented 3 years ago

yeah, I still don't understand why it shows up as a physical device.

pelikhan commented 3 years ago

The why is here: https://github.com/microsoft/jacdac-docs/blob/main/src/components/dashboard/Dashboard.tsx#L85 . If there is a service provider on the bus for the given device id, it is treated as a simulator.

tballmsft commented 3 years ago

thanks

tballmsft commented 3 years ago

But there is another path in which this leak is happening, since Dashboard.tsx is not active when the serviceProvider the VM spins up is added. Somehow, it's leaking via another path. Ideas?

pelikhan commented 3 years ago

Hack stack, needle, go!

(Add logging to the locations you start a service producer to trap the leak)

tballmsft commented 3 years ago

yep....

tballmsft commented 3 years ago

fixed