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

Free Support Forum - aspose.com

Cause of java.lang.NullPointerException in com.aspose.diagram.ga.l


We are getting the following exception when doing a save of a vsdx to svg using Diagram Java 19.1:

Exception in thread “main” java.lang.NullPointerException
at com.aspose.diagram.ga.l(Unknown Source)
at com.aspose.diagram.ga.p(Unknown Source)
at com.aspose.diagram.fo.c(Unknown Source)
at com.aspose.diagram.fo.b(Unknown Source)
at com.aspose.diagram.fo.a(Unknown Source)
at com.aspose.diagram.fo.a(Unknown Source)
at com.aspose.diagram.fo.a(Unknown Source)
at com.aspose.diagram.on.a(Unknown Source)
at com.aspose.diagram.Diagram.a(Unknown Source)
at com.aspose.diagram.Diagram.save(Unknown Source)
at com.cognidox.cognidox.vsdx2svg.VSDX2SVG.main(VSDX2SVG.java:85)

Looking through the vsdx source, we have a shape like this in visio/pages/page1.xml:

     <Shape ID="13" Type="Shape" LineStyle="1" FillStyle="1" TextStyle="3">
      <Cell N="PinX" V="7.642319750095353"/>
      <Cell N="PinY" V="2.818915864683579"/>
      <Cell N="Width" V="2.85758350718981"/>
      <Cell N="Height" V="0.5123942840478291"/>
      <Cell N="LocPinX" V="1.428791753594905" F="Width*0.5"/>
      <Cell N="LocPinY" V="0.2561971420239145" F="Height*0.5"/>
      <Cell N="Angle" V="0"/>
      <Cell N="FlipX" V="0"/>
      <Cell N="FlipY" V="0"/>
      <Cell N="ResizeMode" V="0"/>
      <Cell N="DefaultTabStop" V="0.5"/>
      <Cell N="FillForegnd" V="#ffffff" F="THEMEGUARD(RGB(255,255,255))"/>
      <Cell N="FillPattern" V="1"/>
      <Cell N="ShdwForegnd" V="#000000" F="THEMEGUARD(RGB(0,0,0))"/>
      <Cell N="ShdwPattern" V="1"/>
      <Cell N="ShdwForegndTrans" V="0"/>
      <Cell N="ShapeShdwType" V="1"/>
      <Cell N="ShapeShdwOffsetX" V="0"/>
      <Cell N="ShapeShdwOffsetY" V="-0.05555555555555555"/>
      <Cell N="ShapeShdwScaleFactor" V="0"/>
      <Cell N="ShapeShdwBlur" V="0"/>
      <Cell N="ShapeShdwShow" V="2"/>
      <Cell N="LineGradientEnabled" V="0"/>
      <Cell N="FillGradientEnabled" V="0"/>
      <Cell N="RotateGradientWithShape" V="0"/>
      <Cell N="UseGroupGradient" V="0"/>
      <Cell N="GlowColor" V="#ffffff" F="THEMEGUARD(RGB(255,255,255))"/>
      <Cell N="GlowColorTrans" V="0"/>
      <Cell N="GlowSize" V="0" U="PT"/>
      <Cell N="LineWeight" V="0.01388888888888889"/>
      <Cell N="LineColor" V="#000000" F="THEMEGUARD(RGB(0,0,0))"/>
      <Cell N="Rounding" V="0"/>
      <Cell N="LineColorTrans" V="0"/>
      <Section N="Character">
        <Row IX="0">
          <Cell N="Font" V="Arial"/>
          <Cell N="Color" V="0"/>
          <Cell N="Style" V="0"/>
          <Cell N="Size" V="0.08333333333333333"/>
          <Cell N="ComplexScriptFont" V="Arial"/>
      <Section N="Paragraph">
        <Row IX="0">
          <Cell N="IndLeft" V="0.03958333333333333"/>
          <Cell N="HorzAlign" V="0"/>
          <Cell N="BulletFontSize" V="0.1666666666666667" U="DT"/>
      <Section N="Geometry" IX="0">
        <Cell N="NoFill" V="0"/>
        <Cell N="NoLine" V="0"/>
        <Cell N="NoShow" V="0"/>
        <Cell N="NoSnap" V="0"/>
        <Cell N="NoQuickDrag" V="0"/>
        <Row T="RelMoveTo" IX="1">
          <Cell N="X" V="0"/>
          <Cell N="Y" V="0"/>
        <Row T="RelLineTo" IX="2">
          <Cell N="X" V="1"/>
          <Cell N="Y" V="0"/>
        <Row T="RelLineTo" IX="3">
          <Cell N="X" V="1"/>
          <Cell N="Y" V="1"/>
        <Row T="RelLineTo" IX="4">
          <Cell N="X" V="0"/>
          <Cell N="Y" V="1"/>
        <Row T="RelLineTo" IX="5">
          <Cell N="X" V="0"/>
          <Cell N="Y" V="0"/>
      <Text><cp IX="0"/><pp IX="0"/>8.2.1 Customer communication
8.2.2 Determining the requirements related to products and services
8.2.3 Review of requirements related to products and services
8.2.4 Changes to requirements for products and services

Simply removing <Section N=“Geometry” IX=“0”> block avoids the exception.

Any idea why the exception would happen and how it could be avoided?



Thanks for contacting support.

Would you please share your sample VISIO Diagram with us. We will test the scenario in our environment and address it accordingly.

Hi -

I’ve added a zip containing two files:

  • fails-to-convert.vsdx - causes the exception
  • works-with-modifications.vsdx - slight modification to page1.xml from the failure file makes it work

example-files.zip (35.1 KB)



Thanks for sharing sample diagram files.

We have tested the scenario in our environment and were able to notice the issue which you have mentioned. We have logged an investigation ticket as DIAGRAMJAVA-50647 in our issue tracking system to further investigation reasons behind it. As soon as some additional updates are available regarding investigation results, we will surely share with you. Please be patient and spare us little time.

We are sorry for the inconvenience.

The issues you have found earlier (filed as DIAGRAMJAVA-50647) have been fixed in Aspose.Diagram for Java 19.2.