Failed to convert VSD to PDF

Hi team, when converting VSD file to PDF using Aspose Diagram version 23.12, I encountered the following error: System.StackOverflowException: 'Exception of type 'System.StackOverflowException' was thrown.'.

Please help me investigate it. Thank you very much.

This is sample file
sample.zip (929.1 KB)

@dunghnguyen

It seems that you are encountering a System.StackOverflowException when trying to convert a VSD file to PDF using Aspose Diagram version 23.12. This type of error typically indicates that there is a recursive call or an infinite loop in the code, which leads to the stack memory being exhausted.

To troubleshoot this issue, you can try the following steps:

  1. Check the VSD File: Ensure that the VSD file you are trying to convert is not corrupted or overly complex. Sometimes, specific elements in the diagram can cause issues during conversion.

  2. Use a Simple Diagram: Test the conversion with a simpler VSD file to see if the issue persists. This can help determine if the problem is with the specific file or with the conversion process itself.

  3. Update Aspose Diagram: Make sure you are using the latest version of Aspose Diagram. If you are already on version 23.12, check if there are any patches or updates available that address this issue.

  4. Sample Code: Here is a basic example of how to convert a VSD file to PDF using Aspose Diagram. Ensure your implementation follows this structure:

    using System.IO;
    using Aspose.Diagram;
    
    namespace Aspose.Diagram.Examples
    {
        public class ExportToPDF
        {
            public static void Run()
            {
                // Load the VSD diagram
                Diagram diagram = new Diagram("path_to_your_file.vsd");
    
                // Save the diagram as a PDF
                diagram.Save("output_file.pdf", SaveFileFormat.PDF);
            }
        }
    }
    
  5. Contact Support: If the issue persists after trying the above steps, consider reaching out to Aspose support with the specific VSD file that is causing the problem. They may be able to provide more detailed assistance or identify if there is a bug in the library.

If you have any further questions or need additional assistance, feel free to ask!

@dunghnguyen
Thanks for the template file .
After an initial testing, I am able to reproduce the issue as you mentioned by using your template file.When converting VSD file to PDF it throws the StackOverflowException.

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-53749

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.

1 Like

Thank you very much for your support.

@dunghnguyen
Please feel free to contact us in case you have further comments or questions.
Thanks.

1 Like

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