<?xml version="1.0"?>
<ArrayOfFBEvent xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
  <FBEvent>
    <User>Dan McFadden</User>
    <Comment />
    <StatusString>Edited</StatusString>
    <TimeStamp>2023-05-24T20:48:27Z</TimeStamp>
    <ZendeskNumber>0</ZendeskNumber>
    <Status>UNKNOWN</Status>
  </FBEvent>
  <FBEvent>
    <User>Justin Richardson</User>
    <Comment>Tested by arming an ecm and a sim  recording and then navigating to download all and downaload roi and pressing run right away to attempt to reproduce an exception . Was not able to reproduce.
 
Tested importing the attached test setup and swapping out with my hw .
 
DP 4.1.194 and dp 3.3</Comment>
    <StatusString>Closed</StatusString>
    <TimeStamp>2023-02-07T21:18:10Z</TimeStamp>
    <ZendeskNumber>0</ZendeskNumber>
    <Status>Closed</Status>
  </FBEvent>
  <FBEvent>
    <User>Justin Richardson</User>
    <Comment />
    <StatusString>Assigned</StatusString>
    <TimeStamp>2023-02-02T00:17:32Z</TimeStamp>
    <ZendeskNumber>0</ZendeskNumber>
    <Status>UNKNOWN</Status>
  </FBEvent>
  <FBEvent>
    <User>Dan McFadden</User>
    <Comment />
    <StatusString>Edited</StatusString>
    <TimeStamp>2023-01-31T21:03:06Z</TimeStamp>
    <ZendeskNumber>0</ZendeskNumber>
    <Status>UNKNOWN</Status>
  </FBEvent>
  <FBEvent>
    <User>Dan McFadden</User>
    <Comment />
    <StatusString>ReleaseNoted</StatusString>
    <TimeStamp>2023-01-31T21:03:02Z</TimeStamp>
    <ZendeskNumber>0</ZendeskNumber>
    <Status>UNKNOWN</Status>
  </FBEvent>
  <FBEvent>
    <User>Dan McFadden</User>
    <Comment />
    <StatusString>Edited</StatusString>
    <TimeStamp>2023-01-31T16:59:57Z</TimeStamp>
    <ZendeskNumber>0</ZendeskNumber>
    <Status>UNKNOWN</Status>
  </FBEvent>
  <FBEvent>
    <User>Dan McFadden</User>
    <Comment>3.3/4.1@48156</Comment>
    <StatusString>Resolved</StatusString>
    <TimeStamp>2023-01-31T16:26:54Z</TimeStamp>
    <ZendeskNumber>0</ZendeskNumber>
    <Status>Resolved</Status>
  </FBEvent>
  <FBEvent>
    <User>Dan McFadden</User>
    <Comment>don't know of a way to purpose recreate customer's situation, so just recommend testing that download works without exception including whether automatic mode is on or not, whether you press run as soon as you can or not.</Comment>
    <StatusString>Edited</StatusString>
    <TimeStamp>2023-01-31T16:26:14Z</TimeStamp>
    <ZendeskNumber>0</ZendeskNumber>
    <Status>UNKNOWN</Status>
  </FBEvent>
  <FBEvent>
    <User>Dan McFadden</User>
    <Comment>4.1 needed a more complicated patch</Comment>
    <StatusString>Edited</StatusString>
    <TimeStamp>2023-01-31T16:24:12Z</TimeStamp>
    <ZendeskNumber>0</ZendeskNumber>
    <Status>UNKNOWN</Status>
  </FBEvent>
  <FBEvent>
    <User>Dan McFadden</User>
    <Comment>Farshid, John,
 
I've submitted a patch for DP MAINT 3.3 for
 
30113
 Exception thrown during download
 
I wasn't actually able to duplicate the customer's issue, but looking at the log you see this exception right after the user presses the run button on the download tab:
 
 
 
2023-01-19 14:54:35.877 User Admin pressed Record_RunButton
 2023-01-19 14:54:35.883 !!  An exception of type: System.ArgumentNullException occurred Module: System.Core.dll, Name: AnyMessage: 值不能为 null。 参数名: source StackTrace:    在 System.Linq.Enumerable.Any[TSource](IEnumerable`1 source, Func`2 predicate) StackTrace:    在 DataPROWin7.SubControls.Download.StartDownloading()    在 DataPROWin7.SubControls.Download.RunCurStep()    在 DataPROWin7.RunTestBase.NavStepActionButtonFired(String id)    在 DataPROWin7.Controls.CustomUIElements.NavStepActionButton.actionButton_Click(Object sender, RoutedEventArgs e)    在 System.Windows.EventRoute.InvokeHandlersImpl(Object source, RoutedEventArgs args, Boolean reRaised)    在 System.Windows.UIElement.RaiseEventImpl(DependencyObject sender, RoutedEventArgs args)    在 System.Windows.Controls.Primitives.ButtonBase.OnClick()    在 System.Windows.Controls.Button.OnClick()    在 System.Windows.Controls.Primitives.ButtonBase.OnMouseLeftButtonUp(MouseButtonEventArgs e)    在 System.Windows.RoutedEventArgs.InvokeHandler(Delegate handler, Object target)    在 System.Windows.RoutedEventHandlerInfo.InvokeHandler(Object target, RoutedEventArgs routedEventArgs)    在 System.Windows.EventRoute.InvokeHandlersImpl(Object source, RoutedEventArgs args, Boolean reRaised)    在 System.Windows.UIElement.ReRaiseEventAs(DependencyObject sender, RoutedEventArgs args, RoutedEvent newEvent)    在 System.Windows.UIElement.OnMouseUpThunk(Object sender, MouseButtonEventArgs e)    在 System.Windows.RoutedEventArgs.InvokeHandler(Delegate handler, Object target)    在 System.Windows.RoutedEventHandlerInfo.InvokeHandler(Object target, RoutedEventArgs routedEventArgs)    在 System.Windows.EventRoute.InvokeHandlersImpl(Object source, RoutedEventArgs args, Boolean reRaised)    在 System.Windows.UIElement.RaiseEventImpl(DependencyObject sender, RoutedEventArgs args)    在 System.Windows.UIElement.RaiseTrustedEvent(RoutedEventArgs args)    在 System.Windows.Input.InputManager.ProcessStagingArea()    在 System.Windows.Input.InputManager.ProcessInput(InputEventArgs input)    在 System.Windows.Input.InputProviderSite.ReportInput(InputReport inputReport)    在 System.Windows.Interop.HwndMouseInputProvider.ReportInput(IntPtr hwnd, InputMode mode, Int32 timestamp, RawMouseActions actions, Int32 x, Int32 y, Int32 wheel)    在 System.Windows.Interop.HwndMouseInputProvider.FilterMessage(IntPtr hwnd, WindowMessage msg, IntPtr wParam, IntPtr lParam, Boolean&amp; handled)    在 System.Windows.Interop.HwndSource.InputFilterMessage(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean&amp; handled)    在 MS.Win32.HwndWrapper.WndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean&amp; handled)    在 MS.Win32.HwndSubclass.DispatcherCallbackOperation(Object o)    在 System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)    在 System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Int32 numArgs, Delegate catchHandler)
 
looking into the code it seems this line:
 
 
in StartDownloading is the most likely culprit.
 
This EventsToDownload structure is populate separately by code that runs when you enter into the page (in the Reset() method).  Looking in the logs it's possible to see some of the queryconfig information is going on when the run button is pressed:
 
 
 
 
I wasn't able to duplicate the issue, but if you purposely set the EventsToDownload structure to null, you get a log very similar to the customer's:
 
 
I tried to address this issue in two ways;
 
1) by catching the exception in StartDownloading and avoiding the exception.  When this happens it will now put up a warning to the user:
 
Failed to start downloading.  Please try running download again.
 
however, in the customer complaint they stated they were actually able to download, so I didn't want to confuse them if we could avoid this error, so I also;
 
2)use a sentinel that gets set when we start checking the DAS for event info and gets unset when completed, and then don't process start downloading in this situation.
 
neither of the callers to StartDownloading appear to wait on it, so the result hopefully the result is just that it doesn't download.  I tested this myself by just not letting _bInInitialization to get unset (so that start downloading always returns), which resulted in exactly that, you press the button and it'll just not start downloading.  It will log why it didn't start downloading however.
 
without a way to duplicate the patch testing should just make sure that downloads still work as expected either through run test, download tab, or when using automatic mode.  Additionally it should work whether you hit run as fast as you can in the download tab, or you wait for it to finish querying the devices.</Comment>
    <StatusString>Assigned</StatusString>
    <TimeStamp>2023-01-25T22:23:40Z</TimeStamp>
    <ZendeskNumber>0</ZendeskNumber>
    <Status>UNKNOWN</Status>
  </FBEvent>
  <FBEvent>
    <User>Dan McFadden</User>
    <Comment>putting back as active while I work on TEMA</Comment>
    <StatusString>Assigned</StatusString>
    <TimeStamp>2023-01-25T15:23:20Z</TimeStamp>
    <ZendeskNumber>0</ZendeskNumber>
    <Status>UNKNOWN</Status>
  </FBEvent>
  <FBEvent>
    <User>Dan McFadden</User>
    <Comment />
    <StatusString>Edited</StatusString>
    <TimeStamp>2023-01-25T00:12:20Z</TimeStamp>
    <ZendeskNumber>0</ZendeskNumber>
    <Status>UNKNOWN</Status>
  </FBEvent>
  <FBEvent>
    <User>Dan McFadden</User>
    <Comment>checking out
 
I haven't had luck duplicating the issue (does look timing related) but I can force the issue by setting Event structure to null on purpose
 
 
 
 
 
I can at least add some exception handling here to prevent the crash.</Comment>
    <StatusString>Assigned</StatusString>
    <TimeStamp>2023-01-24T23:39:04Z</TimeStamp>
    <ZendeskNumber>0</ZendeskNumber>
    <Status>UNKNOWN</Status>
  </FBEvent>
  <FBEvent>
    <User>Dan McFadden</User>
    <Comment />
    <StatusString>Assigned</StatusString>
    <TimeStamp>2023-01-19T15:17:17Z</TimeStamp>
    <ZendeskNumber>0</ZendeskNumber>
    <Status>UNKNOWN</Status>
  </FBEvent>
  <FBEvent>
    <User>Dan McFadden</User>
    <Comment>ZD11334
 
likely the Run button is pressed before structures are populated.</Comment>
    <StatusString>Opened</StatusString>
    <TimeStamp>2023-01-19T15:17:17Z</TimeStamp>
    <ZendeskNumber>0</ZendeskNumber>
    <Status>Opened</Status>
  </FBEvent>
</ArrayOfFBEvent>