Multiple issues at opening PowerPoint presentations

I am trying to process a bunch of powerpoint files using Aspose Slides. But unfortunately getting too many errors on different files. Here are some of them:


1. once.
Index was out of range. Must be non-negative and less than the size of the collection.
Parameter name: index
at System.Collections.ArrayList.get_Item(Int32 index)
at Aspose.Slides.Pptx.TableEx.(‚ frame, ppt)
at Aspose.Slides.Pptx.TableEx…ctor(ShapeExCollection parent, ‚ source, ppt)
at Aspose.Slides.Pptx.ShapesEx.(BaseSlideEx slide, ž frame, Boolean isGroup, ppt)
at Aspose.Slides.Pptx.ShapesEx.(BaseSlideEx slide, ž frame, ppt)
at Aspose.Slides.Pptx.GroupShapeEx…ctor(BaseSlideEx parent, ArrayList shapes, ppt)
at Aspose.Slides.Pptx.BaseSlideEx.(ArrayList shapesSource, ArrayList placeholdersSource, ppt)
at Aspose.Slides.Pptx.SlideEx.( slide, ppt, & ppt2003Slide)
at Aspose.Slides.Pptx.PresentationEx.(Stream inputStream)
at Aspose.Slides.Pptx.PresentationEx.a(Stream stream)
at Aspose.Slides.Pptx.PresentationEx.(Stream stream, LoadOptions loadOptions)
at Aspose.Slides.Pptx.PresentationEx…ctor(Stream stream)

2. five times:
Object reference not set to an instance of an object.
at Aspose.Slides.Pptx.PresentationEx.( package)
at Aspose.Slides.Pptx.PresentationEx.a(Stream stream)
at Aspose.Slides.Pptx.PresentationEx.(Stream stream, LoadOptions loadOptions)
at Aspose.Slides.Pptx.PresentationEx…ctor(Stream stream)

3. five times:
Object reference not set to an instance of an object.
at Aspose.Slides.Pptx.GroupShapeEx…ctor(ShapeExCollection parent, ‚ esgc, ppt)
at Aspose.Slides.Pptx.ShapesEx.(BaseSlideEx slide, ž frame, Boolean isGroup, ppt)
at Aspose.Slides.Pptx.ShapesEx.(BaseSlideEx slide, ž frame, ppt)
at Aspose.Slides.Pptx.GroupShapeEx…ctor(BaseSlideEx parent, ArrayList shapes, ppt)
at Aspose.Slides.Pptx.BaseSlideEx.(ArrayList shapesSource, ArrayList placeholdersSource, ppt)
at Aspose.Slides.Pptx.SlideEx.( slide, ppt, & ppt2003Slide)
at Aspose.Slides.Pptx.PresentationEx.(Stream inputStream)
at Aspose.Slides.Pptx.PresentationEx.a(Stream stream)
at Aspose.Slides.Pptx.PresentationEx.(Stream stream, LoadOptions loadOptions)
at Aspose.Slides.Pptx.PresentationEx…ctor(Stream stream)

In total 11 documents from 63 failed to load. That is very frustrating. I can attach sample documents if needed. I am using version 5.6.0.0. Product version 2011.10.07

Hi Alexey,

Thanks for your interest in Aspose.Slides.

It would be great, If you can share your documents/code with us for investigation purpose. Please also share some more information about your issue, what exactly you are trying to do.
We are really keen to help you but need further details from your side.

We apologize for your inconvenience.

Hi Tahir,

Thank you for a quick reply.

Attached is a small test app with 3 test files. One file per each issue.

Right now the code fails at a very first line:
PresentationEx document = new PresentationEx(reader);
where reader is FileStream .


Hi Alexey,

Thanks for sharing the information. I have tested the scenario
and I am able to reproduce the same problem. For the sake of correction,
I have logged this issue as SLIDESNET-31407 in our issue tracking system. Our
team will look into this issue and you will be updated via this forum
thread once it is resolved.

You can use Presentation class for PPT files and this will work fine. I have modified your code, please find code in attachment.

We apologize for your inconvenience.

Indeed, Presentation class for ppt works much better. Thank you!


I am still getting the “Object reference not set to an instance of an object.” for pptx files although.
What is an approximate ETA for this issue?

Also, i am getting a strange exception:

Not a Microsoft PowerPoint 2007 presentation.
at .…ctor(Stream stream, Boolean privateStream)
at Aspose.Slides.Pptx.PresentationEx.a(Stream stream)
at Aspose.Slides.Pptx.PresentationEx.(Stream stream, LoadOptions loadOptions)
at Aspose.Slides.Pptx.PresentationEx…ctor(Stream stream)
with a file attached. Which looks like a valid 2007 powerpoint presentation. At least Office 2010 opens it without any problems.
Could you please take a look at it too?
Another question.

Could you please explain me the limitations of using Slides component in multi-threaded environment?
Here is what i see right now. I have a sample set of documents of about 150 documents (i expanded it a little bit from my previous tests today).
If I render them all one by one in one thread the memory consumption looks good at stays below 300Mb for the process. However, if I run 3 or 4 working threads (each thread is rendering same set of documents in parallel, again one by one), it grows up to 800Mb and more and stays there. With 10 working threads and more it takes up to 3Gb... and again stays there.

Question, why it behaves this way? Is it some sort of Thread Local Storage used in Aspose library which is not cleaned up properly? Or is it a memory leak?

Kind Regards,
Alexey

Stumbled upon another issue on a couple of documents (3 documents for now).


Object reference not set to an instance of an object.
at Aspose.Slides.Pptx.DiagramEx.()
at Aspose.Slides.Pptx.ShapesEx.(ShapeEx value)
at Aspose.Slides.Pptx.GroupShapeEx…ctor(BaseSlideEx parent, € spElem)
at Aspose.Slides.Pptx.BaseSlideEx.(Ž slideElement)
at Aspose.Slides.Pptx.SlideEx…ctor(PresentationEx parent,  elem)
at Aspose.Slides.Pptx.PresentationEx.( package)
at Aspose.Slides.Pptx.PresentationEx.a(Stream stream)
at Aspose.Slides.Pptx.PresentationEx.(Stream stream, LoadOptions loadOptions)
at Aspose.Slides.Pptx.PresentationEx…ctor(Stream stream)

Could you please take a look at it too?

Apparently, it looks like Slides component is NOT thread safe.


For example, i am rendering one document in 5 threads simultaneously. 3 threads render it correctly, but 2 threads fail with exceptions…

error at rendering 05_mobile_internet_for_itu_conference.PPTX
Item has already been added. Key in dictionary: ‘PptHeight’ Key being added: ‘ShapeFillColor’
at System.Collections.SortedList.Add(Object key, Object value)
at Aspose.Slides.Pptx.Animation.BehaviorEx…ctor()
at Aspose.Slides.Pptx.Animation.SequenceEx.(œ node)
at Aspose.Slides.Pptx.Animation.SequenceEx.(œ node)
at Aspose.Slides.Pptx.Animation.SequenceEx.(œ node)
at Aspose.Slides.Pptx.Animation.SequenceEx.a(œ node)
at Aspose.Slides.Pptx.Animation.TimeLineEx.(Πtl)
at Aspose.Slides.Pptx.SlideEx.( elem)
at Aspose.Slides.Pptx.PresentationEx.( package)
at Aspose.Slides.Pptx.PresentationEx.a(Stream stream)
at Aspose.Slides.Pptx.PresentationEx.(Stream stream, LoadOptions loadOptions)
at Aspose.Slides.Pptx.PresentationEx…ctor(Stream stream)

error at rendering 05_mobile_internet_for_itu_conference.PPTX
Item has already been added. Key in dictionary: ‘NotDefined’ Key being added: ‘NotDefined’
at System.Collections.SortedList.Add(Object key, Object value)
at Aspose.Slides.Pptx.Animation.BehaviorEx…ctor()
at Aspose.Slides.Pptx.Animation.SequenceEx.(œ node)
at Aspose.Slides.Pptx.Animation.SequenceEx.(œ node)
at Aspose.Slides.Pptx.Animation.SequenceEx.(œ node)
at Aspose.Slides.Pptx.Animation.SequenceEx.a(œ node)
at Aspose.Slides.Pptx.Animation.TimeLineEx.(Πtl)
at Aspose.Slides.Pptx.SlideEx.( elem)
at Aspose.Slides.Pptx.PresentationEx.( package)
at Aspose.Slides.Pptx.PresentationEx.a(Stream stream)
at Aspose.Slides.Pptx.PresentationEx.(Stream stream, LoadOptions loadOptions)

And this bug is stable enough. 1 or 2 threads are falling with exception (keyname differs however a bit, it was ‘None’, ‘Color’, ‘Opacity’…).

Note, all this happens on the same document.

Since I am using Aspose components in web environment, multi-threading is very important for me.

Please help.

Hi Alexey,

I have also attached the
WaterResourcesAg.pptx file with SLIDESNET-31407. Please share your multi-threading code with us for investigation purposes.

Attached is my sample multi-threaded app. Note it is 64bit app and we need to keep it 64bit.

Hi Alexey,

Thanks for sharing the information. I have tested the scenario
and I am able to reproduce the same problem. For the sake of correction,
I have logged this issue as SLIDESNET-31428 in our issue tracking system. Our
team will look into this issue and you will be updated via this forum
thread once it is resolved.

We apologize for your inconvenience.

Hi Tahir,


Thank you!

What about huge memory consumption in multithreaded environment?
Could you please advise me on this issue?

Kind Regards,
Alexey

Hi Alexey,

Please accept my apology for late response. There is a problem with slide at position 47 related to Aspose.Slides and this issue had already been logged in our issue tracking system.

I have deleted the slide at position 47 and executed your code and have not faced any issue related with memory. Please do the same scenario and let me know, If you have any more queries.

Could you please update me on the status of two tickets above?

SLIDESNET-31407
SLIDESNET-31428
?

Hi Alexey,

Please accept my apology for late response. I have verified from our issue tracking system and like to share with you that the issue with ID SLIDESNET-31407 has been resolved and issue SLIDESNET-
31428 is not resolved yet.
However, I have asked for the ETA of SLIDESNET-31428 from our development team. As soon as, any information is shared by them, I will be more then happy to share that with you.

Thank you for the update.
tahir.manzoor:
Hi Alexey,
SLIDESNET-31407 has been resolved

Does that mean that I can download the latest build & it will have this issue fixed?

Hi Alexey,

The resolved issues will be available in next release of Aspose.Slides for .NET. The new release of
Aspose.Slides for .NET will be available by the end of this month.

So, what about ETA for SLIDESNET-31428 ?

Hi Alexey,

I regret to share with you that I have not received response from our development team about this issue. As soon as, any information is shared by them, I will be more then happy to share that with you.

We apologize for your inconvenience.