Sporadic `corrupted memory` error when resolving Tasks speckle-sharp

This is a preemptive bug report because I haven’t pinned down a reproducible minimal example to report as an issue on the repo yet, but I have been getting on client.CommitCreate( new CommitCreateInput() {…}).Result calls.

There is always a long trace message centred around the Task

While I continue to seek it out, is there any gotcha’s that are known about? Nested nulls and the like? Perhaps a geometry issue, incorrect Base object etc…?

I have started to weed out a bunch of primitive and non-primitive types that don’t serialize which was causing problems but it’s not that.

We did run into some issues, but they were mostly around await-ing the call instead of calling .Result. Maybe @AlanRynne has some tricky cases.

Did the send operation for which you want to create the commit for succeed?

Anyhow, if you have a failing example I can take a look.

From memory, I think it did actually complete each time. I ended up try-catching all server calls and this went away enough to get a hackathon demo done. I’ll check if it was an async-await.

1 Like

Hmm, not sure what could be going on here but would be happy to look into it when you have more details about it!

We’ve had issues with Async/await in the past (specially Grasshopper…) but .Result seemed to be the way to go.

Also, wrapping your tasks in a Task.Run() seemed to make GH happy. Not sure if it would be applicable to your case though.

1 Like