newpage expression crashes versions 1.2018.4 & 1.2018.5

0 votes
asked May 15, 2018 in Bug by DDDsa (200 points)

Test diag:

@startuml
class test
newpage
class test2
@enduml

Two latest versions 1.2018.4 and 1.2018.5 crash with following output from console:

Exception in thread "main" java.lang.NullPointerException
    at net.sourceforge.plantuml.SourceFileReaderAbstract.getGeneratedImages(SourceFileReaderAbstract.java:162)
    at net.sourceforge.plantuml.Run.manageFileInternal(Run.java:422)
    at net.sourceforge.plantuml.Run.processArgs(Run.java:333)
    at net.sourceforge.plantuml.Run.manageAllFiles(Run.java:303)
    at net.sourceforge.plantuml.Run.main(Run.java:163)

The cause is the newpage expression. WIthout it works fine.

Older versions, for example 1.2018.3 don't have this issue.

1 Answer

0 votes
answered May 15, 2018 by plantuml (294,960 points)
selected May 16, 2018 by DDDsa
 
Best answer
Thanks for the report.

This should be fixed in last beta http://beta.plantuml.net/plantuml.jar

Tell us if it's not working for you.

Regards,
commented May 16, 2018 by DDDsa (200 points)
UPD: It works! The scheme renders correctly, even with several newpage statements but the error in console still appears in the end (see below).

===

> curl -O http://beta.plantuml.net/plantuml.jar
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100 7356k  100 7356k    0     0  2109k      0  0:00:03  0:00:03 --:--:-- 2109k

> cat test.diag
@startuml
class test
newpage
class test2
@enduml

> java -jar ./plantuml.jar test.diag
Exception in thread "main" java.lang.NullPointerException
    at net.sourceforge.plantuml.SourceFileReaderAbstract.getGeneratedImages(SourceFileReaderAbstract.java:162)
    at net.sourceforge.plantuml.Run.manageFileInternal(Run.java:422)
    at net.sourceforge.plantuml.Run.processArgs(Run.java:333)
    at net.sourceforge.plantuml.Run.manageAllFiles(Run.java:303)
    at net.sourceforge.plantuml.Run.main(Run.java:163)
commented May 16, 2018 by plantuml (294,960 points)
Sorry, I've uploaded the wrong version.
You can retry http://beta.plantuml.net/plantuml.jar

It should be ok now.
You can check version using "java -jar plantuml.jar -version"
The working beta is 1.2018.06beta4
commented May 16, 2018 by DDDsa (200 points)
This one works! Thank you
...