Hello,
Unfortunately, we experienced an exception when one of our customers dealt with many (and maybe larger) files that they wanted to add to the index.
We got the exception via this event:
pIndex.Events.ErrorOccurred += OnFileAddingErrorOccurred
It was probably triggered during this call, but maybe also during the Optimize() call…
pIndex.Add(...)
The exception:
System.OverflowException: Arithmetic operation resulted in an overflow.\r\n at \u0008\u0017\u0003.\u0003(Int32 \u0002)\r\n at \u0008\u0017\u0003.\u0002(String \u0002, Int32 \u0003)\r\n at \u0002\u001A\u000F.\u0002()\r\n at \u000F\u0017\u0010.\u0002(\u0002\u0010\u000F \u0002, \u0008\u0010\u000F \u0003)\r\n at \u0006\u0017\u000F.\u0002\u0016\u000F\u0016\u0005\u0003()\r\n at \u000F\u0017\u0010.\u0002(\u0003\u0005\u0005 \u0002, \u0003\u000F\u0005 \u0003, \u000F\u0018\u0010 \u0005, \u000E\u0003\u0017 \u0008)\r\n at \u0003\u001A\u000F.\u0002(Boolean \u0002, Int32 \u0003, \u0003\u0005\u0005 \u0005, \u0003\u000F\u0005 \u0008, \u000F\u0018\u0010 \u0006, OperationType \u000E)
(once again with unescaped charaters):
System.OverflowException: Arithmetic operation resulted in an overflow.
at .(Int32 )
at .(String , Int32 )
at .()
at .( , )
at .()
at .( , , , )
at .(Boolean , Int32 , , , , OperationType )
Some time after that exception, we also got this exception from the same error event. I highly assume that they are related (e.g. one causes the other):
System.ObjectDisposedException: Cannot access a closed file.\r\n at \u0003\u0005\u0010.\u0002\u0005\u0010\u0016\u0005\u0002(Byte[] \u0002, Int32 \u0003, Int32 \u0005)\r\n at \u0006\u0018\u000F.\u0002()\r\n at \u0006\u0018\u000F.\u0005()\r\n at \u0003\u0016\u000F.\u0002(String \u0002, String \u0003)\r\n at \u0003\u0016\u000F.\u0002(\u0002\u0005\u0005 \u0002)\r\n at \u0006\u0017\u000F.\u0002(Document \u0002, IFieldExtractor \u0003, String \u0005, IWordSplitter \u0008)\r\n at \u0006\u0017\u000F.\u0002(Document \u0002)\r\n at \u0006\u0017\u000F.\u0002()
(once again with unescaped characters):
System.ObjectDisposedException: Cannot access a closed file.
at .(Byte[] , Int32 , Int32 )
at .()
at .()
at .(String , String )
at .( )
at .(Document , IFieldExtractor , String , IWordSplitter )
at .(Document )
at .()
Unfortunately, we don’t know how to reproduce this. Maybe, with large files or many files… We hope that you are able to track the problematic location via the call stack we provided.
I know, I just reported multiple exceptions, but this one is currently the most critical for us…