AutoUpdater (WPF) 2.6.11: unhandled exceptionSolved

Hi there,

I have a WPF project with automated update functionality included. I just upgraded the AutomaticUpdaterWPF.dll to version 2.6.11. Unfortunately that causes the updater to throw unhandled exceptions. I tried with two machines, which behave somehow different:* machine 1 throws exceptions only once I invoke the menu item "check for updates"* machine 2 throws exceptions periodically (all 10 seconds or so)

Both machines are running Windows 7, 64 bit version.

Studying the stack trace I think the root cause ist the same for both incidents.I'll attach the stack trace below.Any help is highly appreciated.

Archaeopteryx

------************** Exception Text **************System.Reflection.TargetParameterCountException: Parameter count mismatch. at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture, Boolean skipVisibilityChecks) at System.Delegate.DynamicInvokeImpl(Object[] args) at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs) at MS.Internal.Threading.ExceptionFilterHelper.TryCatchWhen(Object source, Delegate method, Object args, Int32 numArgs, Delegate catchHandler) at System.Windows.Threading.DispatcherOperation.InvokeImpl() at System.Windows.Threading.DispatcherOperation.InvokeInSecurityContext(Object state) at System.Threading.ExecutionContext.runTryCode(Object userData) at System.Runtime.CompilerServices.RuntimeHelpers.ExecuteCodeWithGuaranteedCleanup(TryCode code, CleanupCode backoutCode, Object userData) at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state) at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean ignoreSyncCtx) at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state) at System.Windows.Threading.DispatcherOperation.Invoke() at System.Windows.Threading.Dispatcher.ProcessQueue() at System.Windows.Threading.Dispatcher.WndProcHook(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled) at MS.Win32.HwndWrapper.WndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled) at MS.Win32.HwndSubclass.DispatcherCallbackOperation(Object o) at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs) at MS.Internal.Threading.ExceptionFilterHelper.TryCatchWhen(Object source, Delegate method, Object args, Int32 numArgs, Delegate catchHandler) at System.Windows.Threading.Dispatcher.InvokeImpl(DispatcherPriority priority, TimeSpan timeout, Delegate method, Object args, Int32 numArgs) at MS.Win32.HwndSubclass.SubclassWndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam) at MS.Win32.UnsafeNativeMethods.DispatchMessage(MSG& msg) at System.Windows.Threading.Dispatcher.PushFrameImpl(DispatcherFrame frame) at System.Windows.Threading.Dispatcher.PushFrame(DispatcherFrame frame) at System.Windows.Threading.DispatcherOperation.Wait(TimeSpan timeout) at System.Windows.Threading.Dispatcher.InvokeImpl(DispatcherPriority priority, TimeSpan timeout, Delegate method, Object args, Int32 numArgs) at wyDay.Controls.AutomaticUpdater.auBackend_BeforeChecking(Object sender, BeforeArgs e) at wyDay.Controls.AutomaticUpdaterBackend.ForceCheckForUpdate(Boolean recheck) at wyDay.Controls.AutomaticUpdater.tmrWaitBeforeCheck_Tick(Object sender, EventArgs e) at System.Windows.Forms.Timer.OnTick(EventArgs e) at System.Windows.Forms.Timer.TimerNativeWindow.WndProc(Message& m) at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)

************** Loaded Assemblies **************mscorlib Assembly Version: 4.0.0.0 Win32 Version: 4.0.30319.1 (RTMRel.030319-0100) CodeBase: file:///C:/Windows/Microsoft.NET/Framework/v4.0.30319/mscorlib.dll----------------------------------------FlashManagerPlus Assembly Version: 0.21.0.0 Win32 Version: 0.21.0.0 CodeBase: file:///C:/Program%20Files%20(x86)/FoersterTechnik/FlashManagerPlus/FlashManagerPlus.exe----------------------------------------PresentationFramework Assembly Version: 4.0.0.0 Win32 Version: 4.0.30319.1 CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/PresentationFramework/v4.0_4.0.0.0__31bf3856ad364e35/PresentationFramework.dll----------------------------------------WindowsBase Assembly Version: 4.0.0.0 Win32 Version: 4.0.30319.1 built by: RTMRel CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/WindowsBase/v4.0_4.0.0.0__31bf3856ad364e35/WindowsBase.dll----------------------------------------System Assembly Version: 4.0.0.0 Win32 Version: 4.0.30319.1 built by: RTMRel CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System/v4.0_4.0.0.0__b77a5c561934e089/System.dll----------------------------------------PresentationCore Assembly Version: 4.0.0.0 Win32 Version: 4.0.30319.1 built by: RTMRel CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_32/PresentationCore/v4.0_4.0.0.0__31bf3856ad364e35/PresentationCore.dll----------------------------------------System.Xaml Assembly Version: 4.0.0.0 Win32 Version: 4.0.30319.1 built by: RTMRel CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Xaml/v4.0_4.0.0.0__b77a5c561934e089/System.Xaml.dll----------------------------------------NLog Assembly Version: 2.0.0.0 Win32 Version: 2.0.0.0 CodeBase: file:///C:/Program%20Files%20(x86)/FoersterTechnik/FlashManagerPlus/NLog.DLL----------------------------------------Infralution.Localization.Wpf Assembly Version: 2.1.1.0 Win32 Version: 2.1.0.0 CodeBase: file:///C:/Program%20Files%20(x86)/FoersterTechnik/FlashManagerPlus/Infralution.Localization.Wpf.DLL----------------------------------------System.Configuration Assembly Version: 4.0.0.0 Win32 Version: 4.0.30319.1 (RTMRel.030319-0100) CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Configuration/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Configuration.dll----------------------------------------System.Xml Assembly Version: 4.0.0.0 Win32 Version: 4.0.30319.1 built by: RTMRel CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Xml/v4.0_4.0.0.0__b77a5c561934e089/System.Xml.dll----------------------------------------System.Windows.Forms Assembly Version: 4.0.0.0 Win32 Version: 4.0.30319.1 built by: RTMRel CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Windows.Forms/v4.0_4.0.0.0__b77a5c561934e089/System.Windows.Forms.dll----------------------------------------System.Drawing Assembly Version: 4.0.0.0 Win32 Version: 4.0.30319.1 built by: RTMRel CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Drawing/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Drawing.dll----------------------------------------System.ServiceModel Assembly Version: 4.0.0.0 Win32 Version: 4.0.30319.1 built by: RTMRel CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.ServiceModel/v4.0_4.0.0.0__b77a5c561934e089/System.ServiceModel.dll----------------------------------------System.Core Assembly Version: 4.0.0.0 Win32 Version: 4.0.30319.1 built by: RTMRel CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Core/v4.0_4.0.0.0__b77a5c561934e089/System.Core.dll----------------------------------------System.Data Assembly Version: 4.0.0.0 Win32 Version: 4.0.30319.1 (RTMRel.030319-0100) CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_32/System.Data/v4.0_4.0.0.0__b77a5c561934e089/System.Data.dll----------------------------------------System.Runtime.Serialization Assembly Version: 4.0.0.0 Win32 Version: 4.0.30319.1 (RTMRel.030319-0100) CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Runtime.Serialization/v4.0_4.0.0.0__b77a5c561934e089/System.Runtime.Serialization.dll----------------------------------------FlashManagerPlus.resources Assembly Version: 0.20.0.0 Win32 Version: 0.20.0.0 CodeBase: file:///C:/Program%20Files%20(x86)/FoersterTechnik/FlashManagerPlus/de/FlashManagerPlus.resources.DLL----------------------------------------Microsoft.Practices.Unity.Configuration Assembly Version: 2.0.414.0 Win32 Version: 2.0.414.0 CodeBase: file:///C:/Program%20Files%20(x86)/FoersterTechnik/FlashManagerPlus/Microsoft.Practices.Unity.Configuration.DLL----------------------------------------Magellan Assembly Version: 1.1.36885.4801 Win32 Version: 1.1.36885.4801 CodeBase: file:///C:/Program%20Files%20(x86)/FoersterTechnik/FlashManagerPlus/Magellan.DLL----------------------------------------Microsoft.Practices.Unity Assembly Version: 2.0.414.0 Win32 Version: 2.0.414.0 CodeBase: file:///C:/Program%20Files%20(x86)/FoersterTechnik/FlashManagerPlus/Microsoft.Practices.Unity.DLL----------------------------------------Magellan.Transitionals Assembly Version: 1.1.36885.4801 Win32 Version: 1.1.36885.4801 CodeBase: file:///C:/Program%20Files%20(x86)/FoersterTechnik/FlashManagerPlus/Magellan.Transitionals.DLL----------------------------------------Transitionals Assembly Version: 1.2.0.0 Win32 Version: 1.2.0.0 CodeBase: file:///C:/Program%20Files%20(x86)/FoersterTechnik/FlashManagerPlus/Transitionals.DLL----------------------------------------Cinch.WPF Assembly Version: 1.0.0.0 Win32 Version: 1.0.0.0 CodeBase: file:///C:/Program%20Files%20(x86)/FoersterTechnik/FlashManagerPlus/Cinch.WPF.DLL----------------------------------------AutomaticUpdaterWPF Assembly Version: 2.6.11.0 Win32 Version: 2.6.11.0 CodeBase: file:///C:/Program%20Files%20(x86)/FoersterTechnik/FlashManagerPlus/AutomaticUpdaterWPF.DLL----------------------------------------PresentationFramework.Aero Assembly Version: 4.0.0.0 Win32 Version: 4.0.30319.1 built by: RTMRel CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/PresentationFramework.Aero/v4.0_4.0.0.0__31bf3856ad364e35/PresentationFramework.Aero.dll----------------------------------------WindowsFormsIntegration Assembly Version: 4.0.0.0 Win32 Version: 4.0.30319.1 built by: RTMRel CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/WindowsFormsIntegration/v4.0_4.0.0.0__31bf3856ad364e35/WindowsFormsIntegration.dll----------------------------------------UIAutomationProvider Assembly Version: 4.0.0.0 Win32 Version: 4.0.30319.1 built by: RTMRel CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/UIAutomationProvider/v4.0_4.0.0.0__31bf3856ad364e35/UIAutomationProvider.dll----------------------------------------GalaSoft.MvvmLight Assembly Version: 3.0.0.29216 Win32 Version: 3.0.0.29216 CodeBase: file:///C:/Program%20Files%20(x86)/FoersterTechnik/FlashManagerPlus/GalaSoft.MvvmLight.DLL----------------------------------------FoersterTechnik Assembly Version: 0.21.0.0 Win32 Version: 0.21.0.0 CodeBase: file:///C:/Program%20Files%20(x86)/FoersterTechnik/FlashManagerPlus/FoersterTechnik.DLL----------------------------------------System.Management Assembly Version: 4.0.0.0 Win32 Version: 4.0.30319.1 (RTMRel.030319-0100) CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Management/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Management.dll----------------------------------------System.Numerics Assembly Version: 4.0.0.0 Win32 Version: 4.0.30319.1 built by: RTMRel CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Numerics/v4.0_4.0.0.0__b77a5c561934e089/System.Numerics.dll----------------------------------------

Shoot. Let me check into this - it's probably caused by invoking the UI thread before the window handle has been created.

There a few bugs in the WPF version of the AutomaticUpdater, we'll release a fixed version (2.6.11.1) today.

This is genuinely exciting, finally I can update my clients without having to use logmein.I'll be a free man!!

We've released wyBuild 2.6.11.1. We've rolled back the WPF AutomaticUpdater to 2.6.10 as a temporary measure. As far as the WPF AutomaticUpdater goes, the 2.6.10 version is identical (feature-wise) to the 2.6.11 version, except that the threading doesn't throw an exception. All non-WPF versions of the AutomaticUpdater remain at 2.6.11.

We're fixing the WPF bugs and we'll release it with wyBuild 2.6.12. Sorry about this.

We've release the AutomaticUpdater 2.6.11.2, this fixes the threading bugs in the WPF versions of the AutomaticUpdater. Just get the latest wyBuild.

Sorry about the bug.

Hi,

I have an app with AutomaticWPFUpdater.dll (version 2.6.3) included, which just works fine. I now updated the updater dll to version 2.6.11.2. the rest was left unchanged. Unfortunately that breaks the updater, I'm not getting:Auto updater exited prematurely, Auto updater ended before the current update step could be completed.I deleted both "%appdata%\wyUpdate AU" and "%userprofile%\wc"", to no avail.What's wrong with that? How can I get further information in order to track that error down?

Thanks for your reply

Andreas

NB: Windows XP was used as OS.

This shouldn't happen. What version of wyUpdate.exe are you using?

Oops, my fault. I forgot to put wyUpdate.exe into the root directory of my app. Everything seems to work fine now.

However: couldn't this incident be handled more gracefully? The auto updater can update and replace wyupdate.exe if necessar. So why doesn't it download the latest wyupdate.exe if the file does not exist in the root directory?

RegardsAndreas

The auto updater can update and replace wyupdate.exe if necessar. So why doesn't it download the latest wyupdate.exe if the file does not exist in the root directory?

The AutomaticUpdater doesn't have the downloading, updating, and extracting algorithms; that's all in wyUpdate.exe. The AutomaticUpdater is like a remote control for a Television. The TV does all the work, the remote just tells it what to do.

However: couldn't this incident be handled more gracefully?

Yes, we're going to make the error more descriptive so you can actually debug the problem.