Closed seblund closed 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.
When running the GUI, often many engine processes are left running when the application closes. When debugging through the
closeAllBackends
calls you notice that theBackendDriver.openBackendConnections
andQueryHandler.connections
do not have as manyBackendConnection
s 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
BackendConnection
s started inBackendDriver.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 ofBackendConnection
s disappearing. If they disappear we can't reuse them.I can't really figure out where in the code the
BackendConnection
s are lost since the connections move around a lot, but i haven't done a lot of debugging.How to reproduce:
BackendDriver.tryStartNewBackendConnection
or use Task Manager to count the number of started processes/connections.setOnCloseRequest
backendDriver
andqueryHandler
have compared to the actual number of processes.