Ecdar / Ecdar-GUI

A graphical tool for modeling using ECDAR (Environment for Compositional Design and Analysis of Real Time Systems)
MIT License
3 stars 5 forks source link

Some backend stubs are being lost and never closed on exit #134

Closed seblund closed 1 year ago

seblund commented 1 year ago

When running the GUI, often many engine processes are left running when the application closes. When debugging through the closeAllBackends calls you notice that the BackendDriver.openBackendConnections and QueryHandler.connections do not have as many BackendConnections as the GUI has started (it should be the same as they are only ever closed on exit or backend change).

This is clear if you explicitly keep a list of all BackendConnections started in BackendDriver.tryStartNewBackendConnection, and close them at exit, no processes are left hanging and all is good. While this may be an easy fix, it doesn't solve the underlying issue of BackendConnections disappearing. If they disappear we can't reuse them.

I can't really figure out where in the code the BackendConnections are lost since the connections move around a lot, but i haven't done a lot of debugging.

How to reproduce:

Nielswps commented 1 year ago

This issue was also encountered during the SW5 multi-project (and reported here #111 ), however, the issue never seems to occur on my machine:laughing: I will take a look at it first thing next week. I think you are right, that the underlying issue that should be fixed is the disappearance of the connections.