I’m having an issue when opening ppt file when running multi thread. If you run single thread, this test is ok. But if you run multi thread with pool size is 10, some exception will be throw like:
- Exception Info: System.NullReferenceException
- The presentation stream position is set to the end of stream. For properly loading set the stream.Position to the stream beginning.
- Bad state (invalid block type)
- Index was outside the bounds of the array.
Please note that the files can be opened properly with no error and exception in case of single thread, so it is not the problem with the file.
You can reproduce this problem when using this code, running in multi-thread mode. Number of files should be about 2000 files. Number of threads should be about 10 threads.
FileStream fStream = new FileStream(input, FileMode.Open, FileAccess.Read, FileShare.ReadWrite); Presentation presentation = new Presentation(fStream); presentation.Save(output, SaveFormat.Ppt);
Please also note that this issue happens with Aspose Slide 18.4 but does not with Aspose 16.12. I have not had chance to test with other versions.
Please help investigate as soon as possible. This issue is damaging drastically our production.