Crash when using @startnwdiag

0 votes
asked May 16 in Bug by albert (3,120 points)

When having the following example:

@startnwdiag

  vlan1 [shape = cloud];

  network vlan1{
    address = "192.168.168.0/24"

    vlan1;
    Switch4;
  }

  network {
    Switch4 [address = "port1/04"];
    Device1 [address = "192.168.168.1"];
  }
@endnwdiag

platuml (version 1.2021.7beta1) crashes with the following:

java.lang.IllegalStateException
        at net.sourceforge.plantuml.error.PSystemErrorUtils.merge(PSystemErrorUtils.java:74)
        at net.sourceforge.plantuml.PSystemBuilder.createPSystem(PSystemBuilder.java:142)
        at net.sourceforge.plantuml.BlockUml.getDiagram(BlockUml.java:163)
        at net.sourceforge.plantuml.SourceFileReaderAbstract.getGeneratedImages(SourceFileReaderAbstract.java:149)
        at net.sourceforge.plantuml.Run.manageFileInternal(Run.java:546)
        at net.sourceforge.plantuml.Run.processArgs(Run.java:430)
        at net.sourceforge.plantuml.Run.manageAllFiles(Run.java:397)
        at net.sourceforge.plantuml.Run.main(Run.java:206)
Exception in thread "main" java.lang.IllegalStateException
        at net.sourceforge.plantuml.error.PSystemErrorUtils.merge(PSystemErrorUtils.java:74)
        at net.sourceforge.plantuml.PSystemBuilder.createPSystem(PSystemBuilder.java:142)
        at net.sourceforge.plantuml.BlockUml.getDiagram(BlockUml.java:163)
        at net.sourceforge.plantuml.Run.manageFileInternal(Run.java:555)
        at net.sourceforge.plantuml.Run.processArgs(Run.java:430)
        at net.sourceforge.plantuml.Run.manageAllFiles(Run.java:397)
        at net.sourceforge.plantuml.Run.main(Run.java:206)

Though when having:

@startuml
nwdiag {

  vlan1 [shape = cloud];

  network vlan1{
    address = "192.168.168.0/24"

    vlan1;
    Switch4;
  }

  network {
    Switch4 [address = "port1/04"];
    Device1 [address = "192.168.168.1"];
  }
}
@enduml

the diagram is created, but this is a bit inconvenient in automatically generated code and plantuml should not crash like this.

commented May 16 by The-Lu (31,160 points)

Hello all,

Here is a minimal empty example, with the same error wink:

@startnwdiag
@endnwdiag

Regards,
Th.

1 Answer

0 votes
answered May 26 by The-Lu (31,160 points)

Hello all,

This is corrected on V1.2021.7 (23 May, 2021).

Thanks PlantUML for your works,
Regards,
Th.

commented May 26 by albert (3,120 points)

The crash is gone, that is positive.

Negative is that the command @startnwdiag doesn't work it thinks it is @startuml as it says

Maybe you forget 'nwdiag {' in your diagram?

adding adding

nwdiag {

works (the space has to be present though).

Contrary to other diagrams we need thus:

@startnwdiag

nwdiag {

or

@startuml

nwdiag {

I don'ty think this is the intention.

With the empty example it just says Empty description, but this is OK.

I tried it locally with PlantUML version 1.2021.7beta4 as well as on the Plantuml webserver.

As a side note for he error message:

Maybe you forget 'nwdiag {' in your diagram?

this should read:

Maybe you forget 'nwdiag {' in your diagram?

i.e.  forget -> forgot

...