Get clutter_actor_insert_child_at_index error when inserting element in top panel
Affected version
- Your OS and version: Ubuntu 20.04.1 LTS
- Affected GNOME Shell version: 3.36.3
- Does this issue appear in XOrg and/or Wayland: XOrg
Bug summary
If i try to use Main.panel._rightBox.insert_child_at_index(stocksTicker, 0)
– i get error message in logs:
clutter_actor_insert_child_at_index: assertion ‘child->priv->parent == NULL’ failed
Steps to reproduce
Here is code of extension. To reproduce this bug, you need to change line Main.panel.addToStatusArea('stocksTicker', stocksTicker, 0, 'right');
to Main.panel._rightBox.insert_child_at_index(stocksTicker, 0)
. And in logs(journalctl -f -o cat /usr/bin/gnome-shell
) you can see error message: clutter_actor_insert_child_at_index: assertion ‘child->priv->parent == NULL’ failed
What did you expect to happen
If i use Main.panel.addToStatusArea('stocksTicker', stocksTicker, 0, 'right')
instead, everything works as expected.
P.S I asked this question at discourse before, and person suggested that it could be possible bug in gnome-shell.