Bug 62587 - repeated call to XSLFSheet.removeShape leads to java.lang.IllegalArgumentException: partName
Summary: repeated call to XSLFSheet.removeShape leads to java.lang.IllegalArgumentExce...
Alias: None
Product: POI
Classification: Unclassified
Component: XSLF (show other bugs)
Version: 3.17-FINAL
Hardware: Macintosh All
: P2 major (vote)
Target Milestone: ---
Assignee: POI Developers List
Depends on:
Reported: 2018-07-31 12:11 UTC by florian.sc.schneider
Modified: 2018-08-11 01:56 UTC (History)
0 users

Stacktrace of reported error (524 bytes, text/plain)
2018-07-31 12:11 UTC, florian.sc.schneider
JUnit causing the problem / workaround (1.74 KB, text/plain)
2018-08-10 22:55 UTC, Andreas Beeker

Note You need to log in before you can comment on or make changes to this bug.
Description florian.sc.schneider 2018-07-31 12:11:30 UTC
Created attachment 36060 [details]
Stacktrace of reported error

I am having a Slide Show with 1 Slides, containing exactly one picture shape pointing to one EMF embedded into the slide.

In code, I duplicate the slide n times, and then try to "replace" that picture shape by creating a new picture shape with the same dimensions and removing the old picture shape.

POI then crashes on the second call to 

See full stack trace attached.
Comment 1 Andreas Beeker 2018-08-10 22:55:02 UTC
Created attachment 36087 [details]
JUnit causing the problem / workaround

Find attached a short test case and a workaround

The error is based on missing relationships across slides
Comment 2 Andreas Beeker 2018-08-11 01:56:17 UTC
Fix via r1837839