|Title||»||IndexOutOfRangeException bringing up GraphFullScan immediately after modifying the document|
|Assigned To||»||Rita Chupalov|
If the user manages to click a chromatogram curve immediately after adjusting peak boundaries, there can be an IndexOutOfRangeException in GraphFullScan.CreateSingleScan
I was able to get this to happen using the document and raw files in:
I would click and drag below the X-axis to adjust peak boundaries, and then immediately move the mouse a bit and click on one of the chromatogram curves to bring up the full scan viewer.
The IndexOutOfRangeException happens on the line of code:
var currentTransition =
The problem is that "Transitions" is an empty list, and the reason that it's an empty array is that "_scanProvider" is null, and the getter for the "Transitions" property returns an empty array if _scanProvider is null.
When the document changes as a result of the peak boundary change, "_scanProvider" gets set to null by GraphFullScan.OnDocumentUIChanged.
I am not sure what the correct fix should be. I don't think the class "BackgroundScanProvider" has a clear idea of what states it should transition between when things change.