Presentation corrupted after deleting object with animation and adding new(C#)

Dear Aspose Support Team,

We are upgrading our Aspose integration from version 18.2.1. to the most recent one and ran into an issue with animated object deletion that we hadn’t experienced before.

The issue seems to be present with every newer version of Aspose above 18.2.1.

Could you please help us resolving this issue?

What we experience is the following:

  1. we create an object on a slide
  2. add an animation to it
  3. remove the animation (this step seems to be a prerequisite that hasn’t been one previously, without it PowerPoint crashes even at this point!)
  4. remove the object (changing the order of step 3) and 4) doesn’t seem to matter)
  5. add another object
  6. add animation to that newly added object

-> at that point we got the attached error message from PowerPoint.
powerpoint_crash1.png (46.7 KB)
powerpoint_crash.png (43.2 KB)

I’m also copying a shortened example code that produces the issue below - it’s a refresh function, running it on an empty slide it runs properly, running it for the second time (since it had the animated object on it previously) it produces the issue:
animation_refresh.zip (642 Bytes)

public void Animation_CreateOrRefresh()
{
// Remove old shapes
var shapesToDelete = slide.Shapes.Where(s => s.Name?.Contains(“animation_group”) ?? false).ToArray();

foreach(var shape in shapesToDelete)
{
	slide.Shapes.Remove(shape);
}

// Remove all sequences from the slide (skipping this step makes presentation corrupt as well)
slide.Timeline.InteractiveSequences.Clear();

// Add new shapes
var group1 = slide.Shapes.AddGroupShape();
var group2 = slide.Shapes.AddGroupShape();
group1.Shapes.AddAutoShape(ShapeType.Rectangle, 10, 10, 40, 40);
group1.Shapes.AddAutoShape(ShapeType.Rectangle, 10, 100, 40, 40);
group2.Shapes.AddAutoShape(ShapeType.Rectangle, 10, 200, 40, 40);
group2.Shapes.AddAutoShape(ShapeType.Rectangle, 10, 300, 40, 40);

group1.Name = "animation_group_1";
group2.Name = "animation_group_2";

// Add new sequence
var sequence = slide.Timeline.InteractiveSequences.Add(group1);
var effect = sequence.AddEffect(group2, EffectType.PathRight, EffectSubtype.None, EffectTriggerType.OnClick);
effect.Timing.Duration = 1f;
var behavior = effect.Behaviors[0] as IMotionEffect;
behavior.Path[1].Points[0].X = 1.2f;
behavior.Timing.Duration = 1f;
behavior.Timing.TriggerType = EffectTriggerType.OnClick;

}

Please let me know what we should do or how we should implement the order of actions/logic in order to avoid this issue!

Thanks for your help in advance!

Best,
Zoltan

@kozozo,

I have worked with sample code shared by you using Aspose.Slides for .NET 19.3 and unable to observe any issue. I have also shared my generated result with you. Can you please share your generated result. Also please share which Aspose.Slides version you are using on your end.testani.zip (22.6 KB)

Thanks for your reply!

We’ve put together some additional explanatory material:

  • this console application contains only this functionality, run it twice (!) on a whole new presentation after overwriting the filepath,
  • input_pres.pptx: the result of the first run -> created 2 groups of objects with an animation,
  • output_pres.pptx: the output of the second run is a corrupt presentation -> tried to delete the 2 groups and the animation created in the first run and tried to create new groups and objects and an animation
  • Aspose version 19.3, .NET Framework 4.6.1.

Please note that you need to run it 2x in order to see the effect taking place.

Aspose_Animation_Refresh.zip (4.5 KB)
input_and_output_pres.zip (52.4 KB)

Let me know if there’s anything else we can send you or hop on a call to further discuss the issue at hand.

Thanks,
Zoltan

@kozozo,

I have worked with source files and sample code shared by you and have been able to observe the issue. A ticket with ID SLIDESNET-41082 has been created in our issue tracking system to further investigate issue in detail. This thread has been linked with issue so that you may be automatically notified once issue will be fixed.

Thank you @Adnan.Ahmad!

What are the next steps moving forward? In what time-frame can we expect a resolution and is there anything we can do in the meantime?

@kozozo

I regret to share that we can not give you ETA right now. Actually, in Aspose.Slides forum the issues are selected for investigation on first come first serve basis. Also the first priority for scheduling and resolution is given to paid Enterprise and priority support customers. Then Aspose.Slides normal or free support customers issues are scheduled and resolved on first come and first come serve basis. I will share the further information with you as soon as the issue will be resolved.

Hi @Adnan.Ahmad ,

Could you please give me an update regarding this ticket: SLIDESNET-41082?

Thanks,
Zoltan

@kozozo,

I like to inform that issue is still under investigation and we will share ETA as soon as possible.

The issues you have found earlier (filed as SLIDESNET-41082) have been fixed in this update.