Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

adding sequence diagram failed #3311

Open
1 of 3 tasks
wobweger opened this issue May 18, 2024 · 1 comment
Open
1 of 3 tasks

adding sequence diagram failed #3311

wobweger opened this issue May 18, 2024 · 1 comment
Labels
bug An issue in the application

Comments

@wobweger
Copy link

wobweger commented May 18, 2024

Describe the bug

profile SysML active,
adding new sequence diagram failed on selected use case element in navigation tree,
notification to report issue opened, leading me here,
nothing else happened, no crash
changing selection to parent block (package)

To Reproduce

Steps to reproduce the behavior:

  1. draw use case diagram, use case selected
  2. Click on tool-bar + to add New Sequence Siagram
  3. See error

If possible, add the error report from (top-right menu) → ToolsError Reports.

Gaphor version: 2.22.1
Operating System: Linux (6.8.8-300.fc40.x86_64)
Display: X11Display
Python version: 3.12.3
GTK version: 4.14.3
Adwaita version: 1.5.0
GtkSourceView version: 5.12.0
Cairo version: 1.18.0
Pango version: 1.52.2
PyGObject version: 3.48.2
Pycairo version: 1.25.1
pygit2/libgit2 version: 1.13.3 / 1.7.1

Errors:

Time since application startup: 18:43:21
|Traceback (most recent call last):
|  File "/usr/local/lib/python3.12/site-packages/gaphor/diagram/tools/placement.py", line 105, in on_drag_end
|    connect_opposite_handle(view, item, x, y, placement_state.handle_index)
|    │                       │     │     │  │  └ <gaphor.diagram.tools.placement.PlacementState object at 0x7fbc304d7800>
|    │                       │     │     │  └ 0.0
|    │                       │     │     └ 0.0
|    │                       │     └ <gaphor.UML.classes.generalization.GeneralizationItem element b21c1374-1503-11ef-bcbe-e22063aa4a16>
|    │                       └ None
|    └ <function connect_opposite_handle at 0x7fbc4a099d00>
|  File "/usr/local/lib/python3.12/site-packages/gaphor/diagram/tools/placement.py", line 89, in connect_opposite_handle
|    if handle_move.glue(vpos):
|  File "/usr/local/lib/python3.12/site-packages/gaphor/diagram/tools/handlemove.py", line 47, in glue
|    sink = super().glue(pos, distance)  # type: ignore[misc]
|                        │    └ 10
|                        └ (0.0, 0.0)
|  File "/usr/local/lib/python3.12/site-packages/gaphas/handlemove.py", line 71, in glue
|    model = view.model
|            └ None
|AttributeError: 'NoneType' object has no attribute 'model'
└─────────────────────────────╌┄┈
Time since application startup: 18:47:46
|Traceback (most recent call last):
|  File "/usr/local/lib/python3.12/site-packages/gaphor/ui/actiongroup.py", line 141, in _action_activate
|    method(from_variant(param))
|    │      │            └ GLib.Variant('s', 'sd')
|    │      └ <function from_variant at 0x7fbc62aa6020>
|    └ <bound method ModelBrowser.tree_view_create_diagram of <gaphor.ui.modelbrowser.ModelBrowser object at 0x7fbc32d89b80>>
|  File "/usr/local/lib/python3.12/site-packages/gaphor/ui/modelbrowser.py", line 176, in tree_view_create_diagram
|    diagram = diagram_type.create(self.element_factory, element)
|              │                   │                     └ <gaphor.UML.uml.UseCase element 73a5cef0-1503-11ef-bcbe-e22063aa4a16>
|              │                   └ <gaphor.ui.modelbrowser.ModelBrowser object at 0x7fbc32d89b80>
|              └ <gaphor.SysML.diagramtype.SysMLDiagramType object at 0x7fbc4a02fb60>
|  File "/usr/local/lib/python3.12/site-packages/gaphor/SysML/diagramtype.py", line 32, in create
|    d = next(d for d in self._defaults if isinstance(element, d.from_type))
|                        │                            └ <gaphor.UML.uml.UseCase element 73a5cef0-1503-11ef-bcbe-e22063aa4a16>
|                        └ <gaphor.SysML.diagramtype.SysMLDiagramType object at 0x7fbc4a02fb60>
|StopIteration
└─────────────────────────────╌┄┈
Time since application startup: 18:48:30
|Traceback (most recent call last):
|  File "/usr/local/lib/python3.12/site-packages/gaphor/ui/actiongroup.py", line 141, in _action_activate
|    method(from_variant(param))
|    │      │            └ GLib.Variant('s', 'sd')
|    │      └ <function from_variant at 0x7fbc62aa6020>
|    └ <bound method ModelBrowser.tree_view_create_diagram of <gaphor.ui.modelbrowser.ModelBrowser object at 0x7fbc32d89b80>>
|  File "/usr/local/lib/python3.12/site-packages/gaphor/ui/modelbrowser.py", line 176, in tree_view_create_diagram
|    diagram = diagram_type.create(self.element_factory, element)
|              │                   │                     └ <gaphor.UML.uml.UseCase element 73a5cef0-1503-11ef-bcbe-e22063aa4a16>
|              │                   └ <gaphor.ui.modelbrowser.ModelBrowser object at 0x7fbc32d89b80>
|              └ <gaphor.SysML.diagramtype.SysMLDiagramType object at 0x7fbc4a02fb60>
|  File "/usr/local/lib/python3.12/site-packages/gaphor/SysML/diagramtype.py", line 32, in create
|    d = next(d for d in self._defaults if isinstance(element, d.from_type))
|                        │                            └ <gaphor.UML.uml.UseCase element 73a5cef0-1503-11ef-bcbe-e22063aa4a16>
|                        └ <gaphor.SysML.diagramtype.SysMLDiagramType object at 0x7fbc4a02fb60>
|StopIteration
└─────────────────────────────╌┄┈

Expected behavior

a new sequence diagram preferred below selected use case

Screenshots

20240518_125118

OS

  • Linux fedora fc40
  • macOS
  • Windows

Version

Version of Gaphor:2.22.1

Additional information

Add any other context about the problem here.

@danyeaw
Copy link
Member

danyeaw commented May 19, 2024

Hi @wobweger, thanks for the issue report. I think this could be two steps, first fix the issue so that Gaphor isn't crashing, and then add support for this feature.

@danyeaw danyeaw added the bug An issue in the application label May 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug An issue in the application
Projects
None yet
Development

No branches or pull requests

2 participants