Error message:
customermessage:999999- System exception. exceptionid:ab4fde6a-d4a6-4ba0-8148-26e494ee8be3data:ttrackid>> Better.Infrastructures.Log.TrackIDBetter.Infrastructures.Log.AppException: Split analysis anomaly---> System.ArgumentOutOfRangeException: Index out of range. Must be non-negative and less than the collection size. Parameter name: Index in System.ThrowHelper.ThrowArgumentOutOfRangeException () in System.Collections.Generic.List ' 1 . RemoveAt (Int32 index) in System.Collections.Generic.List ' 1. Remove (T Item) in Better517Na.InterB2CFirstAnalyzePro.AnalysisProcess.MainProcess.TaskProcess (Object objtask) Location MainProcess.cs: Line number 118---the end of the inner exception stack trace---
Following the code discovery is the phrase: Dealingtasklist is List<string>,taskid is a string.
Dealingtasklist.remove (TaskID);
There's no problem with it, but the result is a problem, so I'll change to the following
if null && dealingtasklist.exists (sa = sa = = TaskID)) { dealingtasklist.remove (TaskID);}
The result or error, there is no way, had to remember the log to see if it appears in this place. But halfway I think of them as if it is a thread to do, will not be multi-threaded when there is a problem? So I changed the code to look like this. To prevent the case, I will keep a diary.
lock (Lockobj) { if (dealingtasklist! = null && dealingtasklist.exists (sa = SA == TaskID) {temp + = " [ex Enter] + = [ex removal succeeded" " ; else {temp + = [ex does not meet the criteria" " ; }}
So far, no such bug has occurred.
Index out of range bug (1)