You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I wrapped my panel (wibox) code in a function to allow for re-initializing the wibar for day/night theme changes without having to call awesome-restart(). Main reason being it's smoother. I know this may not be how awesome was designed to work, but when using lua 5.4 everything works fine and without errors. When using luajit, everything appears to work fine, but awesome returns some errors to stderr. I do not expect answers on this one, but figured I should report in case it's a bug on the awesome side. Although, if anyone has any ideas I would love to hear them.
For some context, here is some pseudo code of the function:
functionbuildPanel(s)
localwidget1localwidget2etc...ifs.index==1then-- bar for screen 1ifs.barthens.bar.visible==falseend-- if bar already exists, remove its.bar=wibox{}
s.bar:struts{}
s.bar:setup{}
s.bar.visible=trueendifs.index==2then-- bar for screen 2ifs.barthens.bar.visible==falseend-- if bar already exists, remove its.bar=wibox{}
s.bar:struts{}
s.bar:setup{}
s.bar.visible=trueendendscreen.connect_signal("request::desktop_decoration", function(s)
-- setup tags per screenifs.index==1thenawful.tag.add("main", {
layout=awful.layout.suit.floating,
...
})
awful.tag.add("foto", {
layout=awful.layout.suit.floating,
...
})
awful.tag.add("code", {
layout=awful.layout.suit.tile.left,
...
})
elseifs.index==2thenawful.tag({ "main", "foto"}, screen[2], awful.layout.suit.floating)
endbuildPanel(s) -- build the panel/barend)
And for theme changes, this is run:
if [[ "$*"==*day* ]];then
awesome-client "beautiful=require('beautiful'); beautiful.init('/home/clu/.config/awesome/theme_light.lua'); for i=1,screen.count() do buildPanel(screen[i]) end"elif [[ "$*"==*night* ]];then
awesome-client "beautiful=require('beautiful'); beautiful.init('/home/clu/.config/awesome/theme_dark.lua') for i=1,screen.count() do buildPanel(screen[i]) end"fi
Actual result:
It does not happen immediately, but usually within a minute of running the above shell script awesome prints this error, and continues to occasionally print the error:
2024-03-31 18:30:22 E: awesome: Error during a protected call: /usr/share/awesome/lib/wibox/widget/textbox.lua:178: attempt to index field 'layout' (a userdata value)
stack traceback:
/usr/share/awesome/lib/wibox/widget/textbox.lua:178: in function 'set_markup_silently'
/usr/share/awesome/lib/wibox/widget/textbox.lua:226: in function 'set_markup'
/usr/share/awesome/lib/wibox/widget/textclock.lua:193: in function </usr/share/awesome/lib/wibox/widget/textclock.lua:186>
[C]: in function 'xpcall'
/usr/share/awesome/lib/gears/protected_call.lua:41: in function 'protected_call'
/usr/share/awesome/lib/gears/timer.lua:237: in function 'func'
/usr/share/awesome/lib/gears/object.lua:164: in function </usr/share/awesome/lib/gears/object.lua:161>
[C]: in function 'xpcall'
/usr/share/awesome/lib/gears/protected_call.lua:41: in function 'protected_call'
/usr/share/awesome/lib/gears/timer.lua:103: in function </usr/share/awesome/lib/gears/timer.lua:102>
Expected result:
Ideally, no errors returned. I am not programmer, my best guess is there are some references hanging around, and differences between lua 5.4 and luajit garbage collectors may be involved. I tried running collectgarbage("collect") right after if s.bar then s.bar.visible == false end but it made no difference.
I can run lua 5.4 and just forget about it, but luajit does seem to perform a bit better when using more than 1 display, although that could be in my head :) If anyone has any thoughts it would be appreciated.
Thanks for your time!
The text was updated successfully, but these errors were encountered:
Just a note, probably unrelated to this issue - After reading into the doc further I probably should be using awful.widget.only_on_screen for the wibox's, rather than if screen.index == foo.
As a non-programmer, my understanding (a best guess) is that run_delayed_calls()runs all delayed calls now, making sure signals are not sent to references that no longer exist. Regarding the gc, I assume it just cannot keep up.
I'll close this now since I can no longer reproduce the issue. Maybe i'll reopen if they pop up again.
Output of
awesome --version
:awesome v4.3-1647-ge6f5c7980-dirty (Too long)
• Compiled against Lua 5.1.4 (running with LuaJIT 2.1.1702233742)
• API level: 4
• D-Bus support: yes
• xcb-errors support: yes
• execinfo support: yes
• xcb-randr version: 1.6
• LGI version: 0.9.2
• Transparency enabled: yes
• Custom search paths: no
How to reproduce the issue:
I wrapped my panel (wibox) code in a function to allow for re-initializing the wibar for day/night theme changes without having to call
awesome-restart()
. Main reason being it's smoother. I know this may not be how awesome was designed to work, but when usinglua 5.4
everything works fine and without errors. When usingluajit
, everything appears to work fine, but awesome returns some errors to stderr. I do not expect answers on this one, but figured I should report in case it's a bug on the awesome side. Although, if anyone has any ideas I would love to hear them.For some context, here is some pseudo code of the function:
And for theme changes, this is run:
Actual result:
It does not happen immediately, but usually within a minute of running the above shell script awesome prints this error, and continues to occasionally print the error:
Expected result:
Ideally, no errors returned. I am not programmer, my best guess is there are some references hanging around, and differences between
lua 5.4
andluajit
garbage collectors may be involved. I tried runningcollectgarbage("collect")
right afterif s.bar then s.bar.visible == false end
but it made no difference.I can run
lua 5.4
and just forget about it, butluajit
does seem to perform a bit better when using more than 1 display, although that could be in my head :) If anyone has any thoughts it would be appreciated.Thanks for your time!
The text was updated successfully, but these errors were encountered: