System.InvalidOperationException: "Invoke or BeginInvoke cannot be called on a control until the window handle has been created."
Stack Trace:
at System.Windows.Forms.Control.MarshaledInvoke(Control caller, Delegate method, Object[] args, Boolean synchronous)
at System.Windows.Forms.Control.Invoke(Delegate method, Object[] args)
at wyDay.Controls.AutomaticUpdater.auBackend_ClosingAborted(Object sender, EventArgs e)
at wyDay.Controls.AutomaticUpdaterBackend.updateHelper_PipeServerDisconnected(Object sender, UpdateHelperData e)
at wyDay.Controls.UpdateHelper.bw_RunWorkerCompleted(Object sender, RunWorkerCompletedEventArgs e)
at System.ComponentModel.BackgroundWorker.OnRunWorkerCompleted(RunWorkerCompletedEventArgs e)
at System.ComponentModel.BackgroundWorker.AsyncOperationCompleted(Object arg)
at System.Threading._ThreadPoolWaitCallback.WaitCallback_Context(Object state)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
at System.Threading._ThreadPoolWaitCallback.PerformWaitCallbackInternal(_ThreadPoolWaitCallback tpWaitCallBack)
at System.Threading._ThreadPoolWaitCallback.PerformWaitCallback(Object state)
Looks like AutomaticUpdater calls Invoke on the owner form before the form's handle is created. You should wait until ownerForm.IsHandleCreated returns true before doing anything with the ownerForm. Please check this link:
http://msdn.microsoft.com/en-us/library/system.windows.forms.control.invokerequired.aspx
"In the case where the control's handle has not yet been created, you should not simply call properties, methods, or events on the control. This might cause the control's handle to be created on the background thread, isolating the control on a thread without a message pump and making the application unstable."
Waiting for a fix