prmr / JetUML

A desktop application for fast UML diagramming.
GNU General Public License v3.0
620 stars 121 forks source link

Endless loop when drawing class diagrams with interleaved control-flow #463

Closed prmr closed 2 years ago

prmr commented 2 years ago

Description Attempting to create a sequence diagram where a call to a constructor is followed to a call to the same object after a call to another object leads to an endless loop.

image

Steps to reproduce

  1. Create the sequence diagram above
  2. Select the Call Edge tool
  3. Drag a new call edge from the call node on B to the lifeline of C
  4. The diagram disappears and the tools enters an unstable state.

Configuration

Additional information The issue is located in CallNodeViewer. The error is that the code to compute the y-position of the new call node requires to detect the max Y position of any call node of this implicit parameter, but this check includes the current call node, which triggers the endless loop.

prmr commented 2 years ago

Fixed indirectly through the better design implemented with issue #470