Open flmng0 opened 1 year ago
eww debug
outputI ran into a similar issue. I believe it has to do with iterating over arrays that are contained in listened-for objects. When I isolated the array from the object, only printing the array to the listener raw, the errors stopped.
bumping this, this might be closed by #1189. feel free to test things out and report your findings there! update: the pr doesn't fix this. i'll investigate this if i find the time to do so
found the problem: seems like something is not updated properly and the variable wants to access old listeners sometimes that have been removed already.
i'll see whether i can fix it, it's always this error
update: this is weird, according to my debug prints, the scope is removed after the error states that it's not in the graph. i'll have to investigate further
update 2: seems like a tokio select race condition of some kind
here's my debugging config:
(defpoll obj
:interval "1s"
:initial `{"i": 3, "arr":[0]}`
"echo {\\\"i\\\": 3,\\\"arr\\\": [0]}")
(defwindow broken
:monitor 0
(widg))
(defwidget widg []
(box
(for desktop in {obj.arr}
(widg-label))))
(defwidget widg-label []
{obj.i})
funnily enough, the whole widget disappears if the initial array is left empty. that's probably a different edge case bug
Checklist before submitting an issue
Description of the bug
When the listener script outputs a line, eww logs shows: "Scope not in graph"
I went through the code and changed the error so that I could see the Scope index that couldn't be found, and noticed that the values continually get bigger and bigger.
The above statement isn't the issue, I just thought it would be relevant and was trying to do some debugging on my own.
The error leads me to believe that there are hanging references somewhere.
Sorry for not being able to provide more information
Reproducing the issue
Minimal config:
eww.yuck
./desktops:
Expected behaviour
There shouldn't be an error as far as I'm aware, the listeners should stop before the widget updates and the notify is sent.
Additional context
The
bspc query -T --monitor
outputs with the following format:Full output
There are a bunch of omitted fields, so here's a full example output:
Full example output from bspc
```json {"name":"eDP","id":4194306,"randrId":83,"wired":true,"stickyCount":0,"windowGap":12,"borderWidth":2,"focusedDesktopId":4194308,"padding":{"top":0,"right":0,"bottom":0,"left":56},"rectangle":{"x":0,"y":0,"width":1920,"height":1080},"desktops":[{"name":"I","id":4194308,"layout":"monocle","userLayout":"monocle","windowGap":12,"borderWidth":2,"focusedNodeId":16777230,"padding":{"top":0,"right":0,"bottom":0,"left":0},"root":{"id":4194317,"splitType":"vertical","splitRatio":0.520000,"vacant":false,"hidden":false,"sticky":false,"private":false,"locked":false,"marked":false,"presel":null,"rectangle":{"x":56,"y":0,"width":1864,"height":1080},"constraints":{"min_width":64,"min_height":32},"firstChild":{"id":16777230,"splitType":"vertical","splitRatio":0.471082,"vacant":false,"hidden":false,"sticky":false,"private":false,"locked":false,"marked":false,"presel":null,"rectangle":{"x":56,"y":0,"width":1864,"height":1080},"constraints":{"min_width":32,"min_height":32},"firstChild":null,"secondChild":null,"client":{"className":"kitty","instanceName":"kitty","borderWidth":2,"state":"tiled","lastState":"tiled","layer":"normal","lastLayer":"normal","urgent":false,"shown":true,"tiledRectangle":{"x":56,"y":0,"width":1864,"height":1080},"floatingRectangle":{"x":638,"y":338,"width":640,"height":400}}},"secondChild":{"id":25165838,"splitType":"vertical","splitRatio":0.520000,"vacant":false,"hidden":false,"sticky":false,"private":false,"locked":false,"marked":false,"presel":null,"rectangle":{"x":56,"y":0,"width":1864,"height":1080},"constraints":{"min_width":32,"min_height":32},"firstChild":null,"secondChild":null,"client":{"className":"kitty","instanceName":"kitty","borderWidth":2,"state":"tiled","lastState":"tiled","layer":"normal","lastLayer":"normal","urgent":false,"shown":true,"tiledRectangle":{"x":56,"y":0,"width":1864,"height":1080},"floatingRectangle":{"x":26,"y":-2,"width":1864,"height":1080}}},"client":null}},{"name":"II","id":4194309,"layout":"tiled","userLayout":"tiled","windowGap":12,"borderWidth":2,"focusedNodeId":18874412,"padding":{"top":0,"right":0,"bottom":0,"left":0},"root":{"id":18874412,"splitType":"vertical","splitRatio":0.520000,"vacant":false,"hidden":false,"sticky":false,"private":false,"locked":false,"marked":false,"presel":null,"rectangle":{"x":68,"y":12,"width":1852,"height":1068},"constraints":{"min_width":32,"min_height":32},"firstChild":null,"secondChild":null,"client":{"className":"firefox","instanceName":"Navigator","borderWidth":2,"state":"tiled","lastState":"tiled","layer":"normal","lastLayer":"normal","urgent":false,"shown":false,"tiledRectangle":{"x":68,"y":12,"width":1836,"height":1052},"floatingRectangle":{"x":478,"y":11,"width":960,"height":1053}}}},{"name":"III","id":4194310,"layout":"monocle","userLayout":"monocle","windowGap":12,"borderWidth":2,"focusedNodeId":27262990,"padding":{"top":0,"right":0,"bottom":0,"left":0},"root":{"id":27262990,"splitType":"vertical","splitRatio":0.520000,"vacant":false,"hidden":false,"sticky":false,"private":false,"locked":false,"marked":false,"presel":null,"rectangle":{"x":56,"y":0,"width":1864,"height":1080},"constraints":{"min_width":32,"min_height":32},"firstChild":null,"secondChild":null,"client":{"className":"kitty","instanceName":"kitty","borderWidth":2,"state":"tiled","lastState":"tiled","layer":"normal","lastLayer":"normal","urgent":false,"shown":false,"tiledRectangle":{"x":56,"y":0,"width":1864,"height":1080},"floatingRectangle":{"x":40,"y":12,"width":1836,"height":1052}}}},{"name":"IV","id":4194311,"layout":"tiled","userLayout":"tiled","windowGap":12,"borderWidth":2,"focusedNodeId":0,"padding":{"top":0,"right":0,"bottom":0,"left":0},"root":null},{"name":"V","id":4194312,"layout":"tiled","userLayout":"tiled","windowGap":12,"borderWidth":2,"focusedNodeId":0,"padding":{"top":0,"right":0,"bottom":0,"left":0},"root":null}]} ```
Prettified
```json { "name": "eDP", "id": 4194306, "randrId": 83, "wired": true, "stickyCount": 0, "windowGap": 12, "borderWidth": 2, "focusedDesktopId": 4194308, "padding": { "top": 0, "right": 0, "bottom": 0, "left": 56 }, "rectangle": { "x": 0, "y": 0, "width": 1920, "height": 1080 }, "desktops": [ { "name": "I", "id": 4194308, "layout": "monocle", "userLayout": "monocle", "windowGap": 12, "borderWidth": 2, "focusedNodeId": 16777230, "padding": { "top": 0, "right": 0, "bottom": 0, "left": 0 }, "root": { "id": 4194317, "splitType": "vertical", "splitRatio": 0.52, "vacant": false, "hidden": false, "sticky": false, "private": false, "locked": false, "marked": false, "presel": null, "rectangle": { "x": 56, "y": 0, "width": 1864, "height": 1080 }, "constraints": { "min_width": 64, "min_height": 32 }, "firstChild": { "id": 16777230, "splitType": "vertical", "splitRatio": 0.471082, "vacant": false, "hidden": false, "sticky": false, "private": false, "locked": false, "marked": false, "presel": null, "rectangle": { "x": 56, "y": 0, "width": 1864, "height": 1080 }, "constraints": { "min_width": 32, "min_height": 32 }, "firstChild": null, "secondChild": null, "client": { "className": "kitty", "instanceName": "kitty", "borderWidth": 2, "state": "tiled", "lastState": "tiled", "layer": "normal", "lastLayer": "normal", "urgent": false, "shown": true, "tiledRectangle": { "x": 56, "y": 0, "width": 1864, "height": 1080 }, "floatingRectangle": { "x": 638, "y": 338, "width": 640, "height": 400 } } }, "secondChild": { "id": 25165838, "splitType": "vertical", "splitRatio": 0.52, "vacant": false, "hidden": false, "sticky": false, "private": false, "locked": false, "marked": false, "presel": null, "rectangle": { "x": 56, "y": 0, "width": 1864, "height": 1080 }, "constraints": { "min_width": 32, "min_height": 32 }, "firstChild": null, "secondChild": null, "client": { "className": "kitty", "instanceName": "kitty", "borderWidth": 2, "state": "tiled", "lastState": "tiled", "layer": "normal", "lastLayer": "normal", "urgent": false, "shown": true, "tiledRectangle": { "x": 56, "y": 0, "width": 1864, "height": 1080 }, "floatingRectangle": { "x": 26, "y": -2, "width": 1864, "height": 1080 } } }, "client": null } }, { "name": "II", "id": 4194309, "layout": "tiled", "userLayout": "tiled", "windowGap": 12, "borderWidth": 2, "focusedNodeId": 18874412, "padding": { "top": 0, "right": 0, "bottom": 0, "left": 0 }, "root": { "id": 18874412, "splitType": "vertical", "splitRatio": 0.52, "vacant": false, "hidden": false, "sticky": false, "private": false, "locked": false, "marked": false, "presel": null, "rectangle": { "x": 68, "y": 12, "width": 1852, "height": 1068 }, "constraints": { "min_width": 32, "min_height": 32 }, "firstChild": null, "secondChild": null, "client": { "className": "firefox", "instanceName": "Navigator", "borderWidth": 2, "state": "tiled", "lastState": "tiled", "layer": "normal", "lastLayer": "normal", "urgent": false, "shown": false, "tiledRectangle": { "x": 68, "y": 12, "width": 1836, "height": 1052 }, "floatingRectangle": { "x": 478, "y": 11, "width": 960, "height": 1053 } } } }, { "name": "III", "id": 4194310, "layout": "monocle", "userLayout": "monocle", "windowGap": 12, "borderWidth": 2, "focusedNodeId": 27262990, "padding": { "top": 0, "right": 0, "bottom": 0, "left": 0 }, "root": { "id": 27262990, "splitType": "vertical", "splitRatio": 0.52, "vacant": false, "hidden": false, "sticky": false, "private": false, "locked": false, "marked": false, "presel": null, "rectangle": { "x": 56, "y": 0, "width": 1864, "height": 1080 }, "constraints": { "min_width": 32, "min_height": 32 }, "firstChild": null, "secondChild": null, "client": { "className": "kitty", "instanceName": "kitty", "borderWidth": 2, "state": "tiled", "lastState": "tiled", "layer": "normal", "lastLayer": "normal", "urgent": false, "shown": false, "tiledRectangle": { "x": 56, "y": 0, "width": 1864, "height": 1080 }, "floatingRectangle": { "x": 40, "y": 12, "width": 1836, "height": 1052 } } } }, { "name": "IV", "id": 4194311, "layout": "tiled", "userLayout": "tiled", "windowGap": 12, "borderWidth": 2, "focusedNodeId": 0, "padding": { "top": 0, "right": 0, "bottom": 0, "left": 0 }, "root": null }, { "name": "V", "id": 4194312, "layout": "tiled", "userLayout": "tiled", "windowGap": 12, "borderWidth": 2, "focusedNodeId": 0, "padding": { "top": 0, "right": 0, "bottom": 0, "left": 0 }, "root": null } ] } ```