Unable to cast GroupShape to Shape

Hi,

we are using Aspose.Words.17.6 and have a problem with drawings… I have this little document, which is basically a WORD document with a diagram in it. When trying to save it, aspose fails with

System.InvalidCastException
  HResult=0x80004002
  Message=Unable to cast object of type 'Aspose.Words.Drawing.GroupShape' to type 'Aspose.Words.Drawing.Shape'.
  Source=Aspose.Words
  StackTrace:
   at    .(ShapeBase ,     )
   at    .(ShapeBase ,     )
   at    .(ShapeBase ,     )
   at    .(ShapeBase ,     )
   at    .(ShapeBase ,     , Boolean )
   at    .(ShapeBase ,     )
   at    .(ShapeBase ,     )
   at    .(ShapeBase ,     )
   at    .(ShapeBase ,     )
   at    .(ShapeBase )
   at    .VisitShapeStart(Shape )
   at Aspose.Words.Drawing.Shape.r3ka8zscesabkstb24kjjv9sml9wq7pw  (DocumentVisitor )
   at Aspose.Words.CompositeNode.AcceptCore(DocumentVisitor visitor)
   at Aspose.Words.Drawing.Shape.Accept(DocumentVisitor visitor)
   at Aspose.Words.CompositeNode.AcceptChildren(DocumentVisitor visitor)
   at Aspose.Words.CompositeNode.AcceptCore(DocumentVisitor visitor)
   at Aspose.Words.Paragraph.Accept(DocumentVisitor visitor)
   at Aspose.Words.CompositeNode.AcceptChildren(DocumentVisitor visitor)
   at Aspose.Words.CompositeNode.AcceptCore(DocumentVisitor visitor)
   at Aspose.Words.Drawing.Shape.Accept(DocumentVisitor visitor)
   at    .(ShapeBase )
   at    .(ShapeBase )
   at    .VisitShapeEnd(Shape )
   at Aspose.Words.Drawing.Shape.r3ka8zscesabkstb24kjjv9sml9wq7pw  (DocumentVisitor )
   at Aspose.Words.CompositeNode.AcceptCore(DocumentVisitor visitor)
   at Aspose.Words.Drawing.Shape.Accept(DocumentVisitor visitor)
   at Aspose.Words.CompositeNode.AcceptChildren(DocumentVisitor visitor)
   at Aspose.Words.CompositeNode.AcceptCore(DocumentVisitor visitor)
   at Aspose.Words.Paragraph.Accept(DocumentVisitor visitor)
   at Aspose.Words.CompositeNode.AcceptChildren(DocumentVisitor visitor)
   at Aspose.Words.CompositeNode.AcceptCore(DocumentVisitor visitor)
   at Aspose.Words.Body.Accept(DocumentVisitor visitor)
   at    .(CompositeNode )
   at    .()
   at    .     ()
   at    .()
   at    .()
   at    .     (    )
   at    .     (    )
   at Aspose.Words.Document.(    , SaveOptions )
   at Aspose.Words.Document.(Stream , String , SaveOptions )
   at Aspose.Words.Document.Save(Stream stream, SaveOptions saveOptions)
   at Aspose.Words.Document.Save(Stream stream, SaveFormat saveFormat)
   at AsposeGroupShape.Program.Main(String[] args) in c:\users\ducka\documents\visual studio 2017\Projects\AsposeGroupShape\AsposeGroupShape\Program.cs:line 18

I have already ungrouped everything in this drawing in WORD but it still fails. I will attach the Program and the file. AsposeGroupShape.zip (42.5 KB)

@Zo3K7U,

Thanks for your inquiry. We have tested the scenario and have managed to reproduce the same issue at our side. For the sake of correction, we have logged this problem in our issue tracking system as WORDSNET-17107. You will be notified via this forum thread once this issue is resolved.

We apologize for your inconvenience.

Hello,

In which release has WORDSNET-17107 been addressed.
I could not find in in the Release Notes …
https://docs.aspose.com/words/net/release-notes-2017/

Thank you!

Krassimir

@kmanol The issue has been addressed in 18.7 version of Aspose.Words. But for some reason the defect number was not included into release notes. That is why notification was not sent. Please accept our apologizes for your inconvenience.

1 Like

@alexey.noskov

No worries! Thank you for the quick response!

1 Like