office-ribbonx-editor icon indicating copy to clipboard operation
office-ribbonx-editor copied to clipboard

InvalidOperationException: Cannot access part because parent package was closed.

Open JPluess opened this issue 1 year ago • 0 comments

Describe the bug

System.InvalidOperationException: Cannot access part because parent package was closed.
   at System.IO.Packaging.PackagePart.ThrowIfParentContainerClosed()
   at System.IO.Packaging.PackagePart.GetRelationshipHelper(String id)
   at System.IO.Packaging.PackagePart.RelationshipExists(String id)
   at OfficeRibbonXEditor.Documents.OfficePart.RemoveImage(String imageId) in C:\Users\FernA\agent\_work\1\s\src\OfficeRibbonXEditor\Documents\OfficePart.cs:line 149
   at OfficeRibbonXEditor.ViewModels.Documents.OfficePartViewModel.RemoveIcon(String id) in C:\Users\FernA\agent\_work\1\s\src\OfficeRibbonXEditor\ViewModels\Documents\OfficePartViewModel.cs:line 79
   at OfficeRibbonXEditor.ViewModels.Windows.MainWindowViewModel.ExecuteRemoveCommand() in C:\Users\FernA\agent\_work\1\s\src\OfficeRibbonXEditor\ViewModels\Windows\MainWindowViewModel.cs:line 562

To Reproduce Please describe the steps that lead to the unhandled exception here, including example files if relevant.

Screenshots If applicable, add screenshots to help explain how the unhandled exception occurred.

Additional context

  • Version: 1.9.0.1056
  • Runtime: .NET 6.0.25
  • Operating System: Microsoft Windows 10.0.22631

JPluess avatar Dec 14 '23 13:12 JPluess