i3bar random JSON UTF-8 error w/ conky
Hi,
randomly (sometimes 5 Minutes, sometimes 5 hours after bootup), my i3bar, which gets its input from conky an runs on Arch, fails, returning the following in red:
Error: could not parse JSON (lexical error: invalid bytes in utf8 string.)
To get it to work again, I simply have to restart i3.
I tried googleing quite a while, but I didn't find anything helpful for this case… I don't have any special characters like a degree symbol in my conkyrc, my system's completely on UTF-8. The thing that is so creepy about it is the fact that this happens really randomly and I don't even know by what this is caused or how to reproduce it.
For example, today, it happened for the first time 2 hours after bootup, then again 3 minutes after restarting and ever since then, it runs stable.
I tried disabling every conky element I've got in my rc seperately, but none of them seems to be the cause, it's still happing…
Anyone who has a guess where this might come from? Thank you!
Edit: So here's a part of the strace output, don't know if this is the relevant section:
read(0, 0x9f8512, 62) = -1 EAGAIN (Resource temporarily unavailable)
write(2, "[i3bar] Could not parse JSON input (code = 2, message = lexical error: invalid bytes in UTF8 string.): [{\"full_text\":\"CPU:\",\"color\":\"#606060\",\"separator\":false,\"separator_block_width\":0},{\"full_text\":\"1%,1.40GHz\",\"separator\":false,\"separator_block_width\":9},{\"full_text\":\"MEM:\",\"color\":\"#606060\",\"separator\":false,\"separator_block_width\":0},{\"full_text\":\"6;0%,484MiB\",\"separator\":false,\"separator_block_width\":9},
and so it goes on… Any ideas?
strace i3bar to see what it’s choking on. I.e.: strace -f -p $(pidof i3bar) -s 2048
Ok thank you, I'm now waiting till it fails again, and then, you'll get the strace-output.
Ehm… the output's kinda endless, is there something I should look for in detail? It's curious: this time, it took about half and an hour till this happend… Btw. I let conky refresh every second, don't know if this is relevant, perhaps it isn't, but what do I know.