hallvard/plantuml

java.lang.ArithmeticException: / by zero (produced for links in diagrams)

anthonyanjorin opened this issue · 2 comments

image

I am currently attempting to update my Plantuml Eclipse plugin and to switch to the new DiagramIntentProviders.
I don't know what is causing the problem but everything worked fine before and now my links in documents are no longer working (see exception above).

The code appears to be problematic anyway -- as the variables are all ints the division is integer division which is always a bit strange. In the current case minX is 6, marginX is 7, sx is 0 and BOOM.

So you have empirical evidence that marginX = 7 is wrong. I agree that I anyway should check for the division by zero case and perhaps mix in some float arithmetic.

Seems to be fixed in release 1.1.27