Small cross-threading exception problemSolved

I've managed to get the Automatic Updater control working on the host form of an app to which I add some controls (AU among them) from my plugin.

It looks and works great, but I do get a cross-threading exception when AU closes the main app to perform an update. The user never really sees it because AU shuts down the app and starts installing the update so quickly.

Is there any workaround you can suggest?

What's the exception (please paste the full exception message and stack trace) and what version of the AutomaticUpdater are you using?

Sam-

System.InvalidOperationException was unhandled Message=Cross-thread operation not valid: Control 'FormOpenDental' accessed from a thread other than the thread it was created on. Source=System.Windows.Forms StackTrace: at System.Windows.Forms.Control.get_Handle() at System.Windows.Forms.Form.UpdateMenuHandles(MainMenu menu, Boolean forceRedraw) at System.Windows.Forms.Form.UpdateMenuHandles() at System.Windows.Forms.Form.MenuChanged(Int32 change, Menu menu) at System.Windows.Forms.Form.set_Menu(MainMenu value) at System.Windows.Forms.MainMenu.Dispose(Boolean disposing) at System.ComponentModel.Component.Dispose() at System.ComponentModel.Container.Dispose(Boolean disposing) at System.ComponentModel.Container.Dispose() at OpenDental.FormOpenDental.Dispose(Boolean disposing) in C:\Users\wjs\Desktop\ODVersions\opendental8.0b\opendental8.0\OpenDental\Main Modules\FormOpenDental.cs:line 325 at System.ComponentModel.Component.Dispose() at OpenDental.FormOpenDental.FormOpenDental_FormClosed(Object sender, FormClosedEventArgs e) in C:\Users\wjs\Desktop\ODVersions\opendental8.0b\opendental8.0\OpenDental\Main Modules\FormOpenDental.cs:line 4606 at System.Windows.Forms.Form.OnFormClosed(FormClosedEventArgs e) at System.Windows.Forms.Form.RaiseFormClosedOnAppExit() at System.Windows.Forms.Application.ExitInternal() at System.Windows.Forms.Application.Exit(CancelEventArgs e) at System.Windows.Forms.Application.Exit() at wyDay.Controls.AutomaticUpdaterBackend.updateHelper_ProgressChanged(Object sender, UpdateHelperData e) at wyDay.Controls.UpdateHelper.ProcessReceivedMessage(UpdateHelperData data) at wyDay.Controls.UpdateHelper.SafeProcessReceivedMessage(Byte[] message) at wyDay.Controls.PipeClient.Read() at System.Threading.ThreadHelper.ThreadStart_Context(Object state) at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state) at System.Threading.ThreadHelper.ThreadStart() InnerException:

AutomaticUpdater 2.6.13

One last question: are you using the AutomaticUpdater or the AutomaticUpdaterBackend?

The AutomaticUpdater.

Ok, this is our fault. We'll fix it for the AutomaticUpdater 2.6.14.

Thanks Sam.

This is fixed in the AutomaticUpdater 2.6.14, now out.