Fail to load ppt file when running multi thread with Aspose Slide 18.4


#1

Hi,

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
    at Aspose.Slides.Presentation.Dispose()
    at Aspose.Slides.Presentation.Finalize()
  • 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.

Regards,
Dung Nguyen


#2

@dunghnguyen,

I have observed the information shared by you and in order to investigate the issue further on our end we request you to please provide the sample project being used along with source presentation deck reproducing the issue on your end. Please share the requested information so that we may proceed further to help you.


#3

Hi,

The source code is simple as above. I just use Aspose Slide to load the ppt file and the error occurred.
I cannot share the sample file because the issue does not happen with a single sample. It happened when running in multi-thread mode with various samples.
I am clear that it would be hard to reproduce but this is an extremely serious issue with Aspose Slide 18.4.

Regards,
Dung Nguyen


#4

@dunghnguyen,

I have observed your comments and like to share that we require the source sample presentation that is reproducing issue on your end so that we may log that in our issue tracking system for investigation.


#6

Hi,

I tried to create a small tool that using Aspose Slide to loading a ppt file, and the issue happened. I added a zip files contain all source code, log files and dataset for you. (Because of the size of zip file, so I uploaded them to dropbox. Please checkout there https://www.dropbox.com/s/lg10s0ccd74nhi3/LoadAsposeSlide.zip?dl=0)

You can see the source code inside folder “ConsoleApplication1”, I only use multi thread to load ppt file and write out to console. In folder “dataset” is some ppt file I downloaded randomly in the Internet, and in folder “TestingTool” is the testing tool I built from the source code above (Because I can’t upload directly the zip file here, so I removed file Aspose.Total.lic for privacy information, please add them back)

You can reproduce the problem by running command: TestingLoadPpt.exe <data_set_path> <pool_size>, replacing <data_set_path> to the path of folder “dataset” and <pool_size> to 21. This tool will run 100 times with 20 input files of dataset. I tried to running it in local 4 times, and some errors message had been threw:

  • Index was outside the bounds of the array.
  • Collection was modified; enumeration operation may not execute.

Beside that, when you run the TestingTool with pool_size is 1, no error was reported. Please help us investigate this issue.

Thanks,
Dung H. Nguyen


#7

@dunghnguyen,

Thank you for sharing the information. An issue with ID SLIDESJAVA-37025 has been created in our issue tracking system to further investigate and resolve the issue. We will share the good news with you as soon as the issue will be resolved.


#8

Hi @mudassir.fayyaz, we met the problem with Aspose Slide .NET 18.4. Can you please test and log a ticket with Aspose Slide .NET too?

Thanks,
Dung Nguyen


#9

@dunghnguyen,

I have added an issue with ID SLIDESNET-40159 in our issue tracking system for fixing .NET related issue as well.


#10

Hi,

Do you have any update on this issue?

Thanks,
Dung Nguyen


#11

@dunghnguyen,

I have verified the issue status and regret to share that at present the issue is still unresolved. We request for your patience till the time the issue gets resolved.


#12

Any update on this issue?


#13

@metascan,

I have verified from our issue tracking system and regret to share that the issue is still unresolved. We will share the feedback with you as soon as the issue will be fixed and request for your patience.


#14

@metascan,

We have initiated the investigation on our end and request you to please provide the Operating System and environment details on your end.


#15

Any update on this issue?

We have the same exception stacktrace with version 17.11. It kills our program because the exception is thrown in the finalizer thread.

System.NullReferenceException: Object reference not set to an instance of an object.
   at Aspose.Slides.Presentation.Dispose()
   at Aspose.Slides.Presentation.Finalize()

#16

@kaiwachter,

I have observed your comments. Can you please try to use Aspose.Slides latest version 18.11 and if there is still an issue than please share sample project to reproduce issue.