Tray module causes: Invalid id passed to g_bus_unwatch_name() #2217
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
When Waybar exit in the log I see:
(waybar:25493): GLib-GIO-WARNING **: 22:57:40.825: Invalid id 2 passed to g_bus_unwatch_name()
Investigation shows: Tray module constructor calls :
In the same time both base classes(watcher and host) keeps information about cross resources. Watcher instance has got information about host and watcher either. The same for host class..
So when time to destruct instances, both watcher and host are trying to destroy cross resources. In such case : watcher may kill host resource earlier then host destruction is called and vise versa for host class.
This PR splits resource destruction between base classes. Host now destruct only host objects, watcher - watchers objects.
Actually I didn't find any other dependencies where these base classes are used separately without each other.