Shapes.Group-method throws sometimes an System.ArgumentOutOfRangeException

Dear support,

I am using C# Aspose.Diagram for .NET version 24.9 in a WinForms application on Microsoft Windows 11.

With Aspose.Diagram I am exporting charts (diagrams) to svg-files without ‘whitespace’.
Unfortunately, sometimes an exception ‘System.ArgumentOutOfRangeException’ is thrown when the following method is executed:
Shape s = diagram.Pages[0].Shapes.Group(list.ToArray());

I am using the following code to remove the ‘whitespace’ (which Aspose has provided earlier):

    var list = new List<Shape>();
    foreach (Shape shape in diagram.Pages[0].Shapes)
    {
        list.Add(shape);
    }
    Shape s = diagram.Pages[0].Shapes.Group(list.ToArray());

I have included the diagram ‘~Chart.vsd’ which is attached as zip-archive ‘~Chart.zip’ where this exception occurs:
~Chart.zip (144.7 KB)

I have also included a screenshot of the exception:
ArgumentOutOfRangeException.png (127.0 KB)

Could you have a look on this issue, please?
I look forward to your response.

Kind Regards,

Thierry Knijff
Software Engineer

@tkn1967
Thanks for the template file and screenshots.
We reproduced the problems you mentioned by grouping shapes in the template fle.

We have opened the following new ticket(s) in our internal issue tracking system and will deliver their fixes according to the terms mentioned in Free Support Policies.

Issue ID(s): DIAGRAMNET-53571

You can obtain Paid Support Services if you need support on a priority basis, along with the direct access to our Paid Support management team.

The issues you have found earlier (filed as DIAGRAMNET-53571) have been fixed in this update. This message was posted using Bugs notification tool by philip.zhou

1 Like