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?
We have noticed that we get the following warning in the console when we close a screen that contained an embedded display widget:
After looking at the code this is what I think it happening:
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.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.This doesn't seem to have any impact on functionality but maybe there is a better way to handle this?