geteduroam / windows-app

Windows application for geteduroam
BSD 3-Clause "New" or "Revised" License
4 stars 3 forks source link

Attempting a refresh without internet connection causes a crash #16

Closed jornane closed 4 years ago

jornane commented 4 years ago

When Windows boots and it has missed a refresh invocation, the refresh is attempted immediately upon user logon, but no internet connection is available yet. The application crashes and the user is provided with an error dialog upon logon.

crash

How to reproduce:


Application: geteduroam.exe
Framework Version: v4.0.30319
Description: The process was terminated due to an unhandled exception.
Exception Info: EduroamConfigure.EduroamAppUserError
   at EduroamConfigure.LetsWifi.PostForm(System.Uri, System.Collections.Specialized.NameValueCollection)
   at EduroamConfigure.LetsWifi.RefreshTokens()
   at EduroamConfigure.LetsWifi.RefreshAndInstallEapConfig(Boolean, Boolean)
   at WpfApp.App.RefreshInstalledProfile(System.Func`2<System.String,Boolean>, Boolean)
   at WpfApp.App.SignalExternalCommandLineArgs(System.Collections.Generic.IList`1<System.String>)
   at SingleInstanceApp.SingleInstance`1[[System.__Canon, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]].ActivateFirstInstance(System.Collections.Generic.IList`1<System.String>)
   at SingleInstanceApp.SingleInstance`1[[System.__Canon, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]].ActivateFirstInstanceCallback(System.Object)
   at System.Windows.Threading.ExceptionWrapper.InternalRealCall(System.Delegate, System.Object, Int32)
   at System.Windows.Threading.ExceptionWrapper.TryCatchWhen(System.Object, System.Delegate, System.Object, Int32, System.Delegate)
   at System.Windows.Threading.DispatcherOperation.InvokeImpl()
   at MS.Internal.CulturePreservingExecutionContext.CallbackWrapper(System.Object)
   at System.Threading.ExecutionContext.RunInternal(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object, Boolean)
   at System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object, Boolean)
   at System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object)
   at MS.Internal.CulturePreservingExecutionContext.Run(MS.Internal.CulturePreservingExecutionContext, System.Threading.ContextCallback, System.Object)
   at System.Windows.Threading.DispatcherOperation.Invoke()
   at System.Windows.Threading.Dispatcher.ProcessQueue()
   at System.Windows.Threading.Dispatcher.WndProcHook(IntPtr, Int32, IntPtr, IntPtr, Boolean ByRef)
   at MS.Win32.HwndWrapper.WndProc(IntPtr, Int32, IntPtr, IntPtr, Boolean ByRef)
   at MS.Win32.HwndSubclass.DispatcherCallbackOperation(System.Object)
   at System.Windows.Threading.ExceptionWrapper.InternalRealCall(System.Delegate, System.Object, Int32)
   at System.Windows.Threading.ExceptionWrapper.TryCatchWhen(System.Object, System.Delegate, System.Object, Int32, System.Delegate)
   at System.Windows.Threading.Dispatcher.LegacyInvokeImpl(System.Windows.Threading.DispatcherPriority, System.TimeSpan, System.Delegate, System.Object, Int32)
   at MS.Win32.HwndSubclass.SubclassWndProc(IntPtr, Int32, IntPtr, IntPtr)
   at MS.Win32.UnsafeNativeMethods.DispatchMessage(System.Windows.Interop.MSG ByRef)
   at System.Windows.Threading.Dispatcher.PushFrameImpl(System.Windows.Threading.DispatcherFrame)
   at System.Windows.Application.RunDispatcher(System.Object)
   at System.Windows.Application.RunInternal(System.Windows.Window)
   at WpfApp.App.Main(System.String[])
jornane commented 4 years ago

Fixed in 265cd87