Skip to content

sometimes live hovers do not disappear #609

Closed
@martinlippert

Description

@martinlippert

Describe the bug
In some situations, especially if multiple instances of the same apps are running and are being stopped around the same time, live appears do not disappear from the editors even though there is no process running anymore.

To Reproduce
This is somewhat hard to reproduce. Here is what I found to reproduce this in most of the cases. I have an editor open for a simple Rest service guide app. In the boot dashboard, I have two launch configs for this app and start both. Live hovers appear for both running apps. Then I manually stop one instance and immediately also stop the other instance. As a result, the live hovers disappear from the editor for a very short moment and then suddenly re-appear.

The reason for that is a race condition. The first stop operation causes the live hover mechanism to update the live hovers for the open editors, based on the live data from the remaining running instance. This operation takes a while, because some AST operation is going on behind the scenes, etc.
In the meantime, the second stop operation happens, stops the app, and causes another update of the live hovers. This time, this update operation is super quick, because it checks the number of live process information objects that are available and since there is no live process object left (both are stopped now), it quickly returns "no live hovers" anymore. This gets updated on the editor. Then, after some time, the first update operation finishes (still based on the old information from one running process) and update the editor with that information.

The solution that I put in place is to execute the updates in a single threaded executor instead of in parallel.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions