specklesystems / speckle-sharp

.NET SDK, Schema and Connectors: Revit, Rhino, Grasshopper, Dynamo, ETABS, AutoCAD, Civil3D & more.
https://speckle.systems
Apache License 2.0
377 stars 171 forks source link

bug(navisworks): Host application crashes caused by a closed/disposed websocket #2361

Closed jsdbroughton closed 1 year ago

jsdbroughton commented 1 year ago

This issue arose inside the GraphQL inside DUI.

Screenshot 2023-03-29 112926

It affects Revit also.

Manifests on UI interactions with DUI and application close.

Proposed Fix

In the first instance, handle the Exception in the Connector so as not to propagate to the host application.

Ideally, not swallow this error if in handling it, a remedy is needed.

jsdbroughton commented 1 year ago

Is this worth tackling in light of DUI3 work?

It is a problem I'd like to crack before having many more eyes on the Connector following a marketing shove. I can always capture it as a debug, but I haven't a clear way to trigger it consistently.

@teocomi @paloknapo

teocomi commented 1 year ago

Yes, I think we should def tackle it before DUI3. In Revit I noticed that this bit prevents an exception that was being thrown when closing the app: https://github.com/specklesystems/speckle-sharp/blob/main/ConnectorRevit/ConnectorRevit/UI/ConnectorBindingsRevit.Events.cs#L74-L81

But ideally, we'd come up with a better fix in Core or DUI directly.

AlanRynne commented 1 year ago

closing after connectors review in favor of #2574