我们在生产环境中遇到了奇怪的错误,我们无法调试也无法注入日志记录代码。我试图找出这个,但下面的堆栈跟踪混淆了我。在什么情况下System.Collections.ArrayList.Add抛出IndexOutOfRangeException?
System.IndexOutOfRangeException: Index was outside the bounds of the array.
at System.Collections.ArrayList.Add(Object value)
at ...
According to the MSDNAdd
方法时才抛出NotSupportedException
。
我不知道这里发生了什么。你做?
你可以发布一些完整的stacktrace吗? – shahkalpesh 2010-09-25 14:25:05
只是猜测:ArrayList用于多线程操作? – 2010-09-25 14:28:28
您可能能够通过在发生异常时在调试器中检查其他线程状态来确认并发错误。检查当时是否有其他人正在更换容器。 – 2010-09-25 15:47:59