Skip to content

Warnings when closing a display containing an embedded display #3788

@rjwills28

Description

@rjwills28

We have noticed that we get the following warning in the console when we close a screen that contained an embedded display widget:

WARNING [org.csstudio.display.builder.representation] Display representation still contains items on shutdown: [Pane@3eba30d5]

After looking at the code this is what I think it happening:

  • When you close the (parent) screen it starts to dispose of the widgets on the screen, which includes an embedded display widget.
  • It calls dispose() on the embedded screen, which schedules a task to be run on the UI thread to dispose of the widgets in that embedded screen.
  • But the the shutting down of the parent screen continues and occupies the UI thread meaning the above task cannot run yet.
  • Before this task to dispose of the embedded display widgets has chance to run, we hit the final shutdown() method, which checks to see whether there are any children that haven't been disposed of yet. In this case there is, the embedded display, and so it logs the warning that we see in the console.
  • Shortly after we see the embedded display run through disposing of its widgets as it can now run on the UI thread.

This doesn't seem to have any impact on functionality but maybe there is a better way to handle this?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions