Hi,
We have a WPF application running with Rhino.Inside, started with the following arguments:
RhinoInside = new RhinoCore(new string[] { "/nosplash", "/netfx" }, RhWindowStyle.Hidden, MainWindowWrapper.Handle);
The app then runs absolutely fine but when we close, despite attempting to clean up properly with the following:
protected override void OnExit(ExitEventArgs e)
{
RhinoApp.Exit();
RhinoInside?.Dispose();
RhinoInside = null;
base.OnExit(e);
}
There are a few threads that seem to continue running perpetually and therefore keep the application alive. Assuming they’re all part of the same stack, from the leftover threads it appears that the CloudZooManager
is launching a Timer
than runs indefinitely and is never cancelled. The Task.Delay
in the image below never lasts for more than a few seconds so I assume the Timer
must be re-upping it.
We’ve done a bit of fiddling to see if we can get something to resolve the issue and found:
- Closing works fine if we run the same app with Rhino 7 as the underlying instance.
- Despite being warned off it (Rhino.Inside Panels not Showing - #18 by stevebaer), I did a quick test with the
-appmode
flag and it appears to resolve the issue. However, we “definitely don’t want” to rely on that flag.
We believe this is a semi-new issue, we haven’t traced back when it was introduced, but we are pretty sure it worked once upon a time.
Any thoughts, suggestions? Or if I can provide additional information, please just let me know.
Thanks,
Seb