Opened 10 years ago

Closed 10 years ago

#174 closed Bug (fixed)

AutoUpdate produces crash-report under WindowsXP

Reported by: Arno Wacker Owned by: sauer
Priority: Must have Milestone: CrypTool 2.0 BETA 4
Component: AutoUpdate Keywords:
Cc:

Description

When clicking "restart and install now" for an available update, CT2 closes and produces an crash-report (which irritates, since only the process which is anyhow terminating crashed). However, the updater starts normally and if you click away the crash-report quick enough, the update works completely. If not, the updater will ask to kill a non-terminated instance of CrypTool and if you agree the update also works.

The crash also happens if an update is available and you restart CT2 manually, i.e. close CT2 when an update is available. Start it, and it will produce the same effects as described above.

Hence, the update-functionlity basically works, but the occuring crash-report is highly irritating.

This behavior could be observed only unde WindowsXP, not Win7 oder Vista.

Change History (12)

comment:1 Changed 10 years ago by Arno Wacker

Component: GeneralAutoUpdate

comment:2 Changed 10 years ago by sauer

Status: newaccepted

comment:3 Changed 10 years ago by Arno Wacker

Today, the update from 2347 to 2355 worked without the crash-report also on WinXP (even though nothing was changed?).

We'll wait a few more days we should try the autoupdate every day on XP - if the behaviour does not reoccur, this might be already fixed.

comment:4 Changed 10 years ago by Arno Wacker

Also today, the update worked (almost) flawlessly (on all OS-versions). In one (out of 8 performed updates) situation however, there was again a crash-report under WinXP. This was a very strange one:

  • The autoupdate was set to check only at startup, and it found an update, which no longer was the newest one.
  • Restarted CT2 and denied the update (so that CT2 should download the newest update)
  • Restartetd again and accepted the update - update worked but it crashed when restarting, i.e. the crash-report (CrypWin) came to the foreground while CT2 was still loading in the background. When I canceled the crash-report CT2 was also gone.
  • Restartetd again, and everything worked fine.

Another update later (I manually created a new nightly build), the above described did not occur anymore. This indicates some kind of race-condition. Maybe it always crashes when the CrypWin.exe does not close fast enough?

comment:5 Changed 10 years ago by Arno Wacker

Resolution: cantreproduce
Status: acceptedclosed

Again, the autoupdate worked flawlessly on some XP-machines, hence the effect could no longer be observed.

Hence, closing for now - reopen, if the effect reoccurs.

comment:6 Changed 10 years ago by Arno Wacker

Milestone: CrypTool 2.0 BETA 3CrypTool 2.0 BETA 4
Resolution: cantreproduce
Status: closedreopened

Unfotunately it occured again...

  • CT2 was started, and an update was detecteed and downloaded
  • Closed CT2 and started again.
  • It poped up with the question if the update should be installed
  • Answered with yes and there ist was: the mysterious crash-report
  • The update still finished ok, after simply clicking the crash-report away.

This happend on a very slow machine.

comment:7 Changed 10 years ago by Matthäus Wander

Workaround: get a faster machine ;)

comment:8 Changed 10 years ago by Arno Wacker

Here is the exception which leads to the crash-report (WinXP, CrypWin):

System.NullReferenceException was unhandled

Message=Object reference not set to an instance of an object. Source=CrypWin StackTrace:

at Cryptool.CrypWin.MainWindow.StopDemo_CanExecute(Object sender, CanExecuteRoutedEventArgs e) at System.Windows.Input.CommandBinding.OnCanExecute(Object sender, CanExecuteRoutedEventArgs e) at System.Windows.Input.CommandManager.FindCommandBinding(CommandBindingCollection commandBindings, Object sender, RoutedEventArgs e, ICommand command, Boolean execute) at System.Windows.Input.CommandManager.FindCommandBinding(Object sender, RoutedEventArgs e, ICommand command, Boolean execute) at System.Windows.Input.CommandManager.OnCanExecute(Object sender, CanExecuteRoutedEventArgs e) at System.Windows.UIElement.OnCanExecuteThunk(Object sender, CanExecuteRoutedEventArgs e) at System.Windows.Input.CanExecuteRoutedEventArgs.InvokeEventHandler(Delegate genericHandler, Object target) at System.Windows.RoutedEventArgs.InvokeHandler(Delegate handler, Object target) at System.Windows.RoutedEventHandlerInfo.InvokeHandler(Object target, RoutedEventArgs routedEventArgs) at System.Windows.EventRoute.InvokeHandlersImpl(Object source, RoutedEventArgs args, Boolean reRaised) at System.Windows.UIElement.RaiseEventImpl(DependencyObject sender, RoutedEventArgs args) at System.Windows.UIElement.RaiseEvent(RoutedEventArgs args, Boolean trusted) at System.Windows.Input.RoutedCommand.CriticalCanExecuteWrapper(Object parameter, IInputElement target, Boolean trusted, CanExecuteRoutedEventArgs args) at System.Windows.Input.RoutedCommand.CanExecuteImpl(Object parameter, IInputElement target, Boolean trusted, Boolean& continueRouting) at System.Windows.Input.RoutedCommand.CriticalCanExecute(Object parameter, IInputElement target, Boolean trusted, Boolean& continueRouting) at DevComponents.WpfRibbon.ButtonDropDown.UpdateCanExecute() at DevComponents.WpfRibbon.ButtonDropDown.x832508dfd926834d(ICommand x2b89a0041fe96077) at DevComponents.WpfRibbon.ButtonDropDown.x2b1f4f4697e5ae02(DependencyObject x73f821c71fe1e676, DependencyPropertyChangedEventArgs xfbf34718e704c6bc) at System.Windows.DependencyObject.OnPropertyChanged(DependencyPropertyChangedEventArgs e) at System.Windows.FrameworkElement.OnPropertyChanged(DependencyPropertyChangedEventArgs e) at System.Windows.DependencyObject.NotifyPropertyChange(DependencyPropertyChangedEventArgs args) at System.Windows.DependencyObject.UpdateEffectiveValue(EntryIndex entryIndex, DependencyProperty dp, PropertyMetadata metadata, EffectiveValueEntry oldEntry, EffectiveValueEntry& newEntry, Boolean coerceWithDeferredReference, Boolean coerceWithCurrentValue, OperationType operationType) at System.Windows.DependencyObject.SetValueCommon(DependencyProperty dp, Object value, PropertyMetadata metadata, Boolean coerceWithDeferredReference, Boolean coerceWithCurrentValue, OperationType operationType, Boolean isInternal) at System.Windows.DependencyObject.SetValue(DependencyProperty dp, Object value) at System.Windows.Baml2006.WpfMemberInvoker.SetValue(Object instance, Object value) at MS.Internal.Xaml.Runtime.ClrObjectRuntime.SetValue(XamlMember member, Object obj, Object value) at MS.Internal.Xaml.Runtime.ClrObjectRuntime.SetValue(Object inst, XamlMember property, Object value) at MS.Internal.Xaml.Runtime.PartialTrustTolerantRuntime.SetValue(Object obj, XamlMember property, Object value) at System.Xaml.XamlObjectWriter.SetValue(Object inst, XamlMember property, Object value) at System.Xaml.XamlObjectWriter.Logic_ApplyPropertyValue(ObjectWriterContext ctx, XamlMember prop, Object value, Boolean onParent) at System.Xaml.XamlObjectWriter.Logic_DoAssignmentToParentProperty(ObjectWriterContext ctx) at System.Xaml.XamlObjectWriter.Logic_AssignProvidedValue(ObjectWriterContext ctx) at System.Xaml.XamlObjectWriter.WriteEndMember() at System.Xaml.XamlWriter.WriteNode(XamlReader reader) at System.Windows.Markup.WpfXamlLoader.TransformNodes(XamlReader xamlReader, XamlObjectWriter xamlWriter, Boolean onlyLoadOneNode, Boolean skipJournaledProperties, Boolean shouldPassLineNumberInfo, IXamlLineInfo xamlLineInfo, IXamlLineInfoConsumer xamlLineInfoConsumer, XamlContextStack`1 stack, IStyleConnector styleConnector) at System.Windows.Markup.WpfXamlLoader.Load(XamlReader xamlReader, IXamlObjectWriterFactory writerFactory, Boolean skipJournaledProperties, Object rootObject, XamlObjectWriterSettings settings, Uri baseUri) at System.Windows.Markup.WpfXamlLoader.LoadBaml(XamlReader xamlReader, Boolean skipJournaledProperties, Object rootObject, XamlAccessLevel accessLevel, Uri baseUri) at System.Windows.Markup.XamlReader.LoadBaml(Stream stream, ParserContext parserContext, Object parent, Boolean closeStream) at System.Windows.Application.LoadBamlStreamWithSyncInfo(Stream stream, ParserContext pc) at System.Windows.Application.LoadComponent(Uri resourceLocator, Boolean bSkipJournaledProperties) at System.Windows.Application.DoStartup() at System.Windows.Application.<.ctor>b1(Object unused) 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.Dispatcher.Run() at System.Windows.Application.RunDispatcher(Object ignore) at System.Windows.Application.RunInternal(Window window) at System.Windows.Application.Run(Window window) at Cryptool.CrypWin.App.Main()

InnerException:

comment:9 Changed 10 years ago by Matthäus Wander

Which variable has been null? I assume demoController and will add a sanity check in a second...

comment:10 Changed 10 years ago by Matthäus Wander

Resolution: fixed
Status: reopenedclosed

(In [2429]) CrypWin:

  • added sanity check, probably closes #174 (please re-open if it did not)

comment:11 Changed 10 years ago by Arno Wacker

Resolution: fixed
Status: closedreopened

Unfotunately, this is not resolved. It accurs again with a current update.

Observation: This happen ONLY if doing the update after starting CT2 and clicking yes in the message-box whics asks whetehr to install the update. If I let CT2 to fully start and then go to updates and click there Restart and install, this error does not occur.

Here the new stacktrace: System.Windows.Markup.XamlParseException was unhandled

Message=Provide value on 'System.Windows.StaticResourceExtension' threw an exception. Source=PresentationFramework LineNumber=0 LinePosition=0 StackTrace:

at System.Windows.Markup.XamlReader.RewrapException(Exception e, IXamlLineInfo lineInfo, Uri baseUri) at System.Windows.Markup.WpfXamlLoader.Load(XamlReader xamlReader, IXamlObjectWriterFactory writerFactory, Boolean skipJournaledProperties, Object rootObject, XamlObjectWriterSettings settings, Uri baseUri) at System.Windows.Markup.WpfXamlLoader.LoadBaml(XamlReader xamlReader, Boolean skipJournaledProperties, Object rootObject, XamlAccessLevel accessLevel, Uri baseUri) at System.Windows.Markup.XamlReader.LoadBaml(Stream stream, ParserContext parserContext, Object parent, Boolean closeStream) at System.Windows.Application.LoadBamlStreamWithSyncInfo(Stream stream, ParserContext pc) at System.Windows.Application.LoadComponent(Uri resourceLocator, Boolean bSkipJournaledProperties) at System.Windows.Application.DoStartup() at System.Windows.Application.<.ctor>b1(Object unused) 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.Dispatcher.Run() at System.Windows.Application.RunDispatcher(Object ignore) at System.Windows.Application.RunInternal(Window window) at System.Windows.Application.Run(Window window) at Cryptool.CrypWin.App.Main()

InnerException:

Message=Cannot find resource named 'ListViewStyle'. Resource names are case sensitive. Source=PresentationFramework StackTrace:

at System.Windows.StaticResourceExtension.ProvideValueInternal(IServiceProvider serviceProvider, Boolean allowDeferredReference) at System.Windows.StaticResourceExtension.ProvideValue(IServiceProvider serviceProvider) at MS.Internal.Xaml.Runtime.ClrObjectRuntime.CallProvideValue(MarkupExtension me, IServiceProvider serviceProvider)

InnerException:

It seems the reasone for this is, that the main-window is beeing closed before it could be loaded completely, i.e. using close inside loading.

comment:12 Changed 10 years ago by sauer

Resolution: fixed
Status: reopenedclosed

(In [2451]) Some XAML resources loaded dynamically were not loaded when CT2 attempted to update (after clicking YES) fixes #174

Note: See TracTickets for help on using tickets.