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

Modeling exercises: Apollon freezes locally #9032

Open
FelixTJDietrich opened this issue Jul 12, 2024 · 6 comments
Open

Modeling exercises: Apollon freezes locally #9032

FelixTJDietrich opened this issue Jul 12, 2024 · 6 comments

Comments

@FelixTJDietrich
Copy link
Contributor

Describe the bug

In some diagrams, like BPMN and Component Diagrams, when dragging some elements on the canvas the browser freezes and then crashes.

To Reproduce

This issue only appears to exist in the development environment:

  1. Go to 'Create modeling exercise'
  2. Click on 'Class Diagram' and change to 'Component Diagram'
  3. Scroll up to 'Solution Diagram'
  4. Drag a component onto the canvas
  5. ...
  6. Crash

Expected behavior

No crash

Screenshots

No response

Which version of Artemis are you seeing the problem on?

7.4.2

What browsers are you seeing the problem on?

Chrome

Additional context

No response

Relevant log output

No response

@FelixTJDietrich
Copy link
Contributor Author

I debugged for a really long time. I used Apollon as a local dependency for Artemis and could put breakpoints in the React code (tsx) using the browser's debugging tools.

There is an infinite loop in ./droppable/droppable.tsx, the owner is a uuid for two calls and then it is undefined , maybe that has to do something with the issue. @LeonWehrhahn also has problems with it and we are somewhat out of ideas.

@matthiaslehnertum, @loreanvictor do you have an idea?

@FelixTJDietrich
Copy link
Contributor Author

@loreanvictor sent me another insight which might be helpful:

So I played around with the issue, and the main issue is the erroneous element ID being passed around. This is not specific to diagram type and happens for any element that is a container (e.g. Package elements on the Class Diagrams). I couldn’t figure out why this happens under the circumstances, and also handling the undefined ID gracefully requires a lot of changes across Apollon, which doesn’t seem like the correct approach for an issue that at least right now is not critical.

I suspect someone who understands the component composition of Apollon better might be able to find something more?

It is a peculiar issue as also I couldn’t find any way to reproduce it on Apollon itself.

@FelixTJDietrich
Copy link
Contributor Author

I think the problem is fixable by using the signal-based change detection? This issue of causing infinite rerenders, is somehow related to the current change detection.

@egenerse
Copy link

@FelixTJDietrich I'm still investigating the browser freeze issue and wanted to share what I've found so far. The freeze occurs consistently when users add the following elements:

  • Class Diagram: Package
  • Activity Diagram: Activity
  • Use Case Diagram: System
  • Component Diagram: Component, Subsystem
  • Deployment Diagram: Node, Component
  • BPMN: All elements

I'll keep looking into it and will update with any progress or findings.

@krusche
Copy link
Member

krusche commented Oct 30, 2024

@egenerse Sounds like this happens specifically for container elements that can have sub elements? Maybe there is an issue in the processing or rendering here that leads to some kind of endless loop?

@egenerse
Copy link

This issue also occurs with a vanilla JavaScript setup. To verify, I created a separate repository, apollon-uml-vanilla-js. Given this, it appears that there’s no action required on the Artemis side. Interestingly, this issue does not appear in the React-based Apollon implementation and in Apollon/standalone.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants