Bug crashes Rhino & GH

Crash log:

[ERROR] FATAL UNHANDLED EXCEPTION: System.InvalidOperationException: The calling thread cannot access this object because a different thread owns it.
at System.Windows.Threading.Dispatcher.VerifyAccess()
at System.Windows.Threading.Dispatcher.DisableProcessing()
at System.Windows.Documents.TextContainer.BeginChange(Boolean undo)
at System.Windows.Documents.TextContainer.System.Windows.Documents.ITextContainer.BeginChange()
at System.Windows.Documents.TextRangeBase.SetText(ITextRange thisRange, String textData)
at System.Windows.Controls.Primitives.TextBoxBase.AppendText(String textData)
at Eto.Wpf.Forms.Controls.TextAreaHandler`3.Append(String text, Boolean scrollToCursor) in D:\BuildAgent\work\dujour\src4\DotNetSDK\Eto\src\Eto.Wpf\Forms\Controls\TextAreaHandler.cs:line 173
at Grasshopper.GUI.GH_YakDownloadFormEto.WriteLine(String line)
at Grasshopper.GUI.GH_YakDownloadFormEto.VB$StateMachine_12_DownloadPackages.MoveNext()
— End of stack trace from previous location where exception was thrown —
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
at System.Threading.QueueUserWorkItemCallback.System.Threading.IThreadPoolWorkItem.ExecuteWorkItem()
at System.Threading.ThreadPoolWorkQueue.Dispatch()

ENDERROR

What I was doing:

I was opening an old .gh file. The Elefront version did not match, so GH pops up to ask if I want to install updates. I clicked Download and Install. Then Rhino & GH crashed with the log above.

We understand there are some problem with the Elefront team’s version control and dropping some components from their latest versions, not fully backward compatible. Everyone suffers because of that. But at least it is Elefront’s end, and Rhino /GH should add error handler to bypass such conditions without crashing the main app.

elefront

When upgrading eleFront for Rhino 7+, we couldn’t maintain backward compatibility and still take advantage of the powerful new document-related features in Rhino. For that reason, yes, there is limited backward compatibility between v4 (“Legacy”) and v5. However within all the v5 releases, I am pretty confident we don’t have breaking changes from release to release.

There’s an overview of the main changes here:
https://elefront.via.inc/docs/eleFront%20Primer/Notes%20for%20Existing%20Users

If you are trying to revive an old script, I would recommend you install the eleFront Legacy version, which is available on the Package Manager and can be used side-by-side with v5. If the new features in eleFront v5 are not worth the effort to migrate, then of course you can always stick with the legacy version, it should still work just fine.

I really hope “everyone suffers” is not true, as I have not received much feedback along these lines. Happy to hear what issues you are having and try to resolve them, if you’d like to DM or reach out.