Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Index OOB Error #16

Closed
jakehlee opened this issue Jan 5, 2023 · 3 comments
Closed

Index OOB Error #16

jakehlee opened this issue Jan 5, 2023 · 3 comments
Labels
enhancement New feature or request

Comments

@jakehlee
Copy link

jakehlee commented Jan 5, 2023

I've encountered an Index OOB error while splitting some lecture slides. The issues seems to be animations imported from an older powerpoint version where an empty line was given an animation. I've attached an example below.

The solution was to simply remove the animations on the empty lines, but perhaps there's a way to detect this and skip it, or display a more informative error message.

Thanks!

PPspliT version: v2.2
PP version: PowerPoint for Mac v16.68
System version: macOS Monterey 12.6.1

Fatal Error

Unfortunately, an unrecoverable error has occurred while splitting.

- Error code: -2147024809

- Error description: The index into the specified collection is out of bounds.

- Slide number:  2 (original) -  2 (actual)

Would you like to continue anyway (discouraged)?

example.pptx

@maxonthegit
Copy link
Owner

Thank you @jakehlee for reporting this issue and for detailing it very clearly, including the example: well done.

Indeed, the text frame in your example contains paragraphs with some sort of unknown contents: they are not really empty lines but they still have animations applied. This anomaly is confirmed by the fact that even a minimal change to one of these "alien" paragraphs, like typing a single character, causes animations applied to all of them to be simply cleared (press the "play" button in the picture below to see what I mean):
Alien paragraph

As you may already have noticed, recent releases of PowerPoint seem to prevent application of animations to empty paragraphs altogether. Therefore, it would be interesting to learn how such paragraphs have been generated: do you have any information about the PowerPoint release that has been used to edit this sample slide? Given that the text frame is named Google Shape;635;p39, could it be that this slide is the result of an export from Google Slides?

That said, and considering that there is no easy way to determine that an animation has been (improperly) applied to an "alien" paragraph, I can only think of one possible workaround: detecting when the index of the paragraph that an animation is applied to exceeds the total number of reported paragraphs in a text frame (which is indeed what is causing the error here - you can easily verify that just clearing the animation applied to the last paragraph is enough to prevent the error), and simply doing nothing then.

@jakehlee
Copy link
Author

jakehlee commented Jan 6, 2023

do you have any information about the PowerPoint release that has been used to edit this sample slide? Given that the text frame is named Google Shape;635;p39, could it be that this slide is the result of an export from Google Slides?

I don't know what version the slides were originally created in, but I can confirm the slides were, at some point, opened as pptx files in Google Slides. Note that this is distinct from being exported as pptx from Slides - Drive offers the feature of editing pptx files directly from Slides. I can't confirm whether the animations were created in Slides, or imported from an older pptx version.

detecting when the index of the paragraph that an animation is applied to exceeds the total number of reported paragraphs in a text frame (which is indeed what is causing the error here - you can easily verify that just clearing the animation applied to the last paragraph is enough to prevent the error), and simply doing nothing then.

That was the type of solution I was considering, just adding a check for breaking cleanly if an index is out of range instead of crashing the entire process.

@maxonthegit maxonthegit added the enhancement New feature or request label Jan 7, 2023
@maxonthegit
Copy link
Owner

The mentioned check has been added to recently released version 2.3, which addresses this issue and can successfully process your sample slide deck.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants