Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
i3bar: null pointer dereference when encountering strings instead of objects in json protocol #3844
I'm submitting a…
[x] Bug [ ] Feature Request [ ] Documentation Request [ ] Other (Please describe in detail)
i3bar crashes when encountering invalid input, such as when encountering a string instead of an object representing a block.
i3bar should not crash.
The invalid input should be reported as an error.
Alternatively, strings could be accepted and interpreted as plain text blocks. (swaybar does this)
use this i3 config and status command:
Binary i3 version: 4.17.1 (2019-08-30) © 2009 Michael Stapelberg and contributors Running i3 version: 4.17.1 (2019-08-30) (pid 61803) Loaded i3 config: /home/yrlf/.config/i3/config (Last modified: Tue 22 Oct 2019 22:00:39 CEST, 890 seconds ago) The i3 binary you just called: /usr/bin/i3 The i3 binary you are running: i3
- Linux Distribution & Version: ArchLinux - Are you using a compositor (e.g., xcompmgr or compton): No
So does i3bar if you specify that you want that version of the protocol. It's essentially deprecated, though.
I agree that i3bar should not crash, though I think exiting with an error is acceptable. The status program should never generate invalid protocol messages.