We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Errors when converting VSD to different formats

Hey there,

I encountered some more issues with Aspose Diagram. This time, the version is 5.3.0.

Code with line numbers:

43: Diagram diagram = new Diagram("Input.vsd");
44: diagram.Save("Result.PNG", SaveFileFormat.PNG); // IndexOutOfRangeException
45: diagram.Save("Result.PDF", SaveFileFormat.PDF); // IndexOutOfRangeException
46: diagram.Save("Result.HTML", SaveFileFormat.HTML); // IndexOutOfRangeException
47: diagram.Save("Result.VDX", SaveFileFormat.VDX); // No error, but looks weird
48: diagram.Save("Result.VSX", SaveFileFormat.VSX); // No error, but looks weird

Detailed Error Messages (German):

PNG:

System.IndexOutOfRangeException: Der Index war außerhalb des Arraybereichs.
bei Ÿ..‚(PolylineTo polylineTo)
bei Ÿ..‚(Geom geom, †˜ path)
bei Ÿ.€.‚(˜ canvas,  drwShape)
bei Ÿ.€.a‚(˜ canvas,  drwShape)
bei Ÿ.€.a‚(˜ canvas,  drwShape)
bei Ÿ.€.‚(Page page, „˜ apsPage)
bei Ÿ.€.a(Page page)
bei ..†–(€ apsRenderer, Page page)
bei ..Save(Stream stream, ImageSaveOptions imageOptions, Diagram diagram)
bei Aspose.Diagram.Diagram.Save(Stream stream, SaveOptions options)
bei Aspose.Diagram.Diagram.Save(String filename, SaveFileFormat format)
bei admin_component_edit.Page_Load(Object sender, EventArgs e) in d:\TFS Source\MISC\01_DEV\Web\admin\component_edit.aspx.cs:Zeile 44.
bei System.EventHandler.Invoke(Object sender, EventArgs e)
bei System.Web.UI.Control.LoadRecursive()
bei System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)

PDF:

System.IndexOutOfRangeException: Der Index war außerhalb des Arraybereichs.
bei Ÿ..‚(PolylineTo polylineTo)
bei Ÿ..‚(Geom geom, †˜ path)
bei Ÿ.€.‚(˜ canvas,  drwShape)
bei Ÿ.€.a‚(˜ canvas,  drwShape)
bei Ÿ.€.a‚(˜ canvas,  drwShape)
bei Ÿ.€.‚(Page page, „˜ apsPage)
bei Ÿ.€.a(Page page)
bei ..†–(€ apsRenderer, Page page)
bei ..Save(Stream stream, PdfSaveOptions pdfOptions, Diagram diagram)
bei Aspose.Diagram.Diagram.Save(Stream stream, SaveOptions options)
bei Aspose.Diagram.Diagram.Save(String filename, SaveFileFormat format)
bei admin_component_edit.Page_Load(Object sender, EventArgs e) in d:\TFS Source\MISC\01_DEV\Web\admin\component_edit.aspx.cs:Zeile 45.
bei System.EventHandler.Invoke(Object sender, EventArgs e)
bei System.Web.UI.Control.LoadRecursive()
bei System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)

HTML:

System.IndexOutOfRangeException: Der Index war außerhalb des Arraybereichs.
bei Ÿ..‚(PolylineTo polylineTo)
bei Ÿ..‚(Geom geom, †˜ path)
bei Ÿ.€.‚(˜ canvas,  drwShape)
bei Ÿ.€.a‚(˜ canvas,  drwShape)
bei Ÿ.€.a‚(˜ canvas,  drwShape)
bei Ÿ.€.‚(Page page, „˜ apsPage)
bei Ÿ.€.a(Page page)
bei ..Save(String fileName, HTMLSaveOptions htmlOptions, Diagram diagram)
bei admin_component_edit.Page_Load(Object sender, EventArgs e) in d:\TFS Source\MISC\01_DEV\Web\admin\component_edit.aspx.cs:Zeile 46.
bei System.EventHandler.Invoke(Object sender, EventArgs e)
bei System.Web.UI.Control.LoadRecursive()
bei System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)

I have attached the input file and all "exported" files (some of them are 0 bytes long).

Please have a look at this and get back to me.

Tim Meier

Hi Tim,


Thank you for contacting support. We have tested your sample Visio diagram against the latest build of Aspose.Diagram for .NET 5.3.0. We’re sorry to share with you, we could not reproduce the error messages said while saving to PNG, PDF and HTML file formats. Please recheck the Aspose.Diagram library version. Otherwise, please send us your system environment details e.g.

  • Operating System name, edition and 32 & 64 bit (e.g. Windows 7 Ultimate 64 bit)
  • Eclipse/Netbeans version, edition and other details?
  • Local language and settings etc?
  • JDK version of your application project?
  • Any other information that you think is necessary.

It’ll help us to be more specific. We’ll take a closer look and reply you accordingly.
Fp2v5an8:
48: diagram.Save(“Result.VSX”, SaveFileFormat.VSX); // No error, but looks weird
The resultant VSX format is the Visio stencil XML. We normally use these files as repository of the various shapes. Aspose.Diagram APIs export it as a stencil file as the Microsoft Office Visio do. We have attached all the resultant files to this reply for your kind reference.
Fp2v5an8:
47: diagram.Save(“Result.VDX”, SaveFileFormat.VDX); // No error, but looks weird
We managed to replicate the problems as follows:

File Name: Input.vsd
DIAGRAMNET-50447 - VSD to VDX conversion, shapes are missing from the diagram
DIAGRAMNET-50448 - VSD to VDX conversion, dynamic connector is not being connected properly

Your post has also been linked to these issues. We’ll keep you informed regarding any available updates. We’re sorry for the inconvenience caused.

Hi Tim,


Thank you for being patient. We have a good news for you that the issue id DIAGRAMNET-50447 has now been resolved. If there is no issue in the QA phase, then this fix will be included in the next version of Aspose.Diagram for .NET 5.4.0. We’ll inform you via this forum thread as soon as the new release is published.

Operating System name, edition and 32 & 64 bit (e.g. Windows 7 Ultimate 64 bit)
Window 8.1 Enterprise 64 bit

Eclipse/Netbeans version, edition and other details?
Visual Studio 2012 Update 4

Local language and settings etc?
Local language is German.
No special settings were applied to the project.

JDK version of your application project?
Microsoft .NET 4.0

Any other information that you think is necessary
Nothing.

I've attached a sample project which can be run in an IIS server. When testing, i could reproduce the IndexOutOfRangeException with different VSD files.

The problem does not occur when using the older version 5.1.0.

Please have another look at this.

Hi Tim,


Thank you for providing us the environment details. We have tested your sample project under the Windows 8.1 Professional version and could not reproduce the error messages said. We’re preparing the exact environment to test it further in detail and get back to you in the current week. Meanwhile, please test your sample project in any other machine and let us know how it goes on your side.

The problem occurs on multiple computers in our company. All of them have the same hardware and the same operating system.


To test this further, I’ve written some code which reads multiple vss files and exports all master shapes to png. I’ve noticed that some shapes are causing the IndexOutOfRangeException while others are not. Upon closer inspection, it seems that shapes with many levels (shapes that are grouped multiple times) cause this error on my end.

I’ve tried converting the file attached to this post in the sample project I sent you a few days ago and were able to display the error again. Please have a closer look at the “GE MacLab” Master Shape.

It would be great if you could try to replicate this again on your end.

Greetings

Tim

Hi Tim,


Thank for providing these details. We’re in progress to replicate the issue. We’ll get back to you soon.

Hi Tim,


Thank you for being patient. We have managed to reproduce the index out of range error messages. We have logged these issues as follows:

File Name: Input.vsd
DIAGRAMNET-50488 - VSD to PNG conversion, Index out of range error occurred
DIAGRAMNET-50489 - VSD to PDF conversion, Index out of range error occurred
DIAGRAMNET-50490 - VSD to HTML conversion, Index out of range error occurred

File Name: Test.vsd
DIAGRAMNET-50491 - VSD to PNG conversion, Index out of range error occurred
DIAGRAMNET-50492 - VSD to PDF conversion, Index out of range error occurred
DIAGRAMNET-50493 - VSD to HTML conversion, Index out of range error occurred

Your post has also been linked to these issues. We’ll keep you informed regarding any available updates. We’re sorry for the inconvenience caused.

Hi Tim,
imran.rafique:
File Name: Input.vsd
DIAGRAMNET-50488 - VSD to PNG conversion, Index out of range error occurred
DIAGRAMNET-50489 - VSD to PDF conversion, Index out of range error occurred
DIAGRAMNET-50490 - VSD to HTML conversion, Index out of range error occurred

File Name: Test.vsd
DIAGRAMNET-50491 - VSD to PNG conversion, Index out of range error occurred
DIAGRAMNET-50492 - VSD to PDF conversion, Index out of range error occurred
DIAGRAMNET-50493 - VSD to HTML conversion, Index out of range error occurred
Thank you for being patient. We have a good news for you that all these issue ids have now been resolved. If there is no issue in the QA phase, then their fixes will be included in the next version of Aspose.Diagram for .NET 5.4.0. We'll inform you via this forum thread as soon as the new release is published.

Hey there,


thanks for the update and the quick fix. Could you send me a copy of the 5.4.0 dll? Development on my project was put on hold since the mentioned bugs prevent us from working. I’d like to continue working since we have a few project milestones coming up and I’d rather not postpone those.

Greetings

Tim

Hi Tim,


Thank you for the inquiry. Please note, we don’t provide pre-release or Hotfix version in the Free support model. Our product team is finalizing the next release version 5.4.0. We’ve asked them to provide the release date or more appropriate time estimates. As soon as any information is available, we’ll be happy to update you as well.

Hi Tim,


Thank you for being patient. We’ve received a response from our product team. The next release version 5.4.0 is expected at the end of this week or earlier next week. We’ll notify you in the forum thread.

Thanks for letting me know. I’m looking forward to the release.

The issues you have found earlier (filed as DIAGRAMNET-50447;DIAGRAMNET-50488;DIAGRAMNET-50489;DIAGRAMNET-50490;DIAGRAMNET-50491;DIAGRAMNET-50492;DIAGRAMNET-50493) have been fixed in Aspose.Diagram for .NET 5.4.0.


This message was posted using Notification2Forum from Downloads module by Aspose Notifier.

Hi Tim,


Thank you for being patient. We have a good news for you that the issue id DIAGRAMNET-50448 has now been resolved. If there is no issue in the QA phase, then this fix will be included in the next version of Aspose.Diagram for .NET 6.1.0. We’ll inform you via this forum thread as soon as the new release is published.

The issues you have found earlier (filed as DIAGRAMNET-50448) have been fixed in Aspose.Diagram for .NET 6.1.0.


This message was posted using Notification2Forum from Downloads module by Aspose Notifier.