Export as EPS problem - NullPointerException using swimlanes with new activity diagram syntax

0 votes
asked Jan 12, 2016 in Bug by DaRolla (360 points)

Hi there,

today I have to report another bug, this time a NullPointerException.

Here are the files: https://www.dropbox.com/s/ocu0zqkwco4ixnn/PlantUML-Bug2.zip?dl=0

I use this PlantUML:

@startuml

|Alpha|
    start
    :something;

|Omega|
    :anything;
    end

@enduml

And this is the Stacktrace:

java.lang.NullPointerException
    at net.sourceforge.plantuml.eps.EpsGraphics.appendColor(EpsGraphics.java:520)
    at net.sourceforge.plantuml.eps.EpsGraphics.epsLine(EpsGraphics.java:217)
    at net.sourceforge.plantuml.ugraphic.eps.DriverLineEps.draw(DriverLineEps.java:74)
    at net.sourceforge.plantuml.ugraphic.eps.DriverLineEps.draw(DriverLineEps.java:45)
    at net.sourceforge.plantuml.ugraphic.AbstractUGraphic.draw(AbstractUGraphic.java:83)
    at net.sourceforge.plantuml.ugraphic.UGraphicCompress.drawLine(UGraphicCompress.java:91)
    at net.sourceforge.plantuml.ugraphic.UGraphicCompress.drawLine(UGraphicCompress.java:73)
    at net.sourceforge.plantuml.ugraphic.UGraphicCompress.draw(UGraphicCompress.java:66)
    at net.sourceforge.plantuml.svek.UGraphicForSnake.draw(UGraphicForSnake.java:108)
    at net.sourceforge.plantuml.activitydiagram3.ftile.Swimlanes.drawSeparation(Swimlanes.java:339)
    at net.sourceforge.plantuml.activitydiagram3.ftile.Swimlanes.drawWhenSwimlanes(Swimlanes.java:265)
    at net.sourceforge.plantuml.activitydiagram3.ftile.Swimlanes.drawU(Swimlanes.java:228)
    at net.sourceforge.plantuml.graphic.TextBlockCompressed.drawU(TextBlockCompressed.java:56)
    at net.sourceforge.plantuml.graphic.TextBlockRecentred.drawU(TextBlockRecentred.java:52)
    at net.sourceforge.plantuml.ugraphic.ImageBuilder.writeImageTOBEMOVED(ImageBuilder.java:145)
    at net.sourceforge.plantuml.ugraphic.ImageBuilder.writeImageTOBEMOVED(ImageBuilder.java:125)
    at net.sourceforge.plantuml.activitydiagram3.ActivityDiagram3.exportDiagramInternal(ActivityDiagram3.java:194)
    at net.sourceforge.plantuml.UmlDiagram.exportDiagram(UmlDiagram.java:249)
    at net.sourceforge.plantuml.PSystemUtils.exportDiagramsActivityDiagram3(PSystemUtils.java:151)
    at net.sourceforge.plantuml.PSystemUtils.exportDiagrams(PSystemUtils.java:72)
    at net.sourceforge.plantuml.SourceFileReader.getGeneratedImages(SourceFileReader.java:210)
    at net.sourceforge.plantuml.ant.PlantUmlTask.doFile(PlantUmlTask.java:202)
    at net.sourceforge.plantuml.ant.PlantUmlTask.processingSingleFile(PlantUmlTask.java:188)
    at net.sourceforge.plantuml.ant.PlantUmlTask.manageFileSet(PlantUmlTask.java:160)
    at net.sourceforge.plantuml.ant.PlantUmlTask.execute(PlantUmlTask.java:107)
    at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:292)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:497)
    at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
    at org.apache.tools.ant.Task.perform(Task.java:348)
    at org.apache.tools.ant.Target.execute(Target.java:435)
    at org.apache.tools.ant.Target.performTasks(Target.java:456)
    at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1393)
    at org.apache.tools.ant.Project.executeTarget(Project.java:1364)
    at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41)
    at org.apache.tools.ant.Project.executeTargets(Project.java:1248)
    at org.apache.tools.ant.Main.runBuild(Main.java:851)
    at org.apache.tools.ant.Main.startAnt(Main.java:235)
    at org.apache.tools.ant.Main.start(Main.java:198)
    at org.apache.tools.ant.Main.main(Main.java:286)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:497)
    at com.intellij.rt.ant.execution.AntMain2.main(AntMain2.java:30)

Greetings,
DaRolla

2 Answers

0 votes
answered Jan 12, 2016 by DaRolla (360 points)

As you can see I use the plantuml.8034.jar

And my build.xml (ANT) is like this:

<?xml version="1.0" encoding="UTF-8"?>
<project name="trying to generate EPS" basedir="." default="build">

    <taskdef name="plantuml" classname="net.sourceforge.plantuml.ant.PlantUmlTask" classpath="plantuml.8034.jar"/>

    <target name="build">
        <plantuml verbose="true" overwrite="true" charset="UTF-8" format="eps">
            <fileset file="Datenimport.puml"/>
        </plantuml>
    </target>

</project>
+1 vote
answered Jan 12, 2016 by plantuml (294,960 points)
Thanks for the report.

EPS export has not been widely tested...
The good news is that it was very easy to fix.

So here is the last beta that should fix it: https://dl.dropboxusercontent.com/u/13064071/plantuml.jar

If you find other issues, do not hesitate to post again!

Regards,
commented Jan 12, 2016 by DaRolla (360 points)
thanks a lot. You guys are damn fast :-)
...