swaywm / sway

i3-compatible Wayland compositor
https://swaywm.org
MIT License
14.69k stars 1.11k forks source link

swaybar: failed to parse i3bar json #2664

Closed cnt0 closed 6 years ago

cnt0 commented 6 years ago

I'm using sway with https://github.com/greshake/i3status-rust. I started seeing this error after upgrading to cdce604d8e166ae905b394306fece4e7f035cedd. The problem arises here: https://github.com/swaywm/sway/blob/3600b3db577298bc553c394a4b09e71163f76561/common/pango.c#L131
args contains not one but multiple outputs of i3status-rust (example) and its length is indeed >= 2048 - is this an expected behavior?

ianyfan commented 6 years ago

Can you provide your i3status-rust config? The default config works for me.

Ogromny commented 6 years ago

Same for me...

cnt0 commented 6 years ago

Applied this patch, no success. My config From what I see, args should normally contain some separate tokens from swaybar, like  Wed 19/09 20:13. In my case everything goes normal and then (after ~5 minutes) it tries to process this big raw json (see my attachment in the first post). Looks like some race condition.

ianyfan commented 6 years ago

Strange. How reproducible is it? And do you have to wait 5 minutes each time?

cnt0 commented 6 years ago

looks like https://github.com/swaywm/sway/pull/2672 fixes it