Skip to content

Polybar not launching in OpenBox

So I am trying to use PolyBar with OpenBox, so I just wrote

sh ~/.config/polybar/launch.sh in my autostart file in OpenBox. I don't know why but it doesn't launch it. So I tried to manually start it from the terminal so I just wrote the same command & ran from the terminal & this is the error

~ ❯ sh ~/.config/polybar/launch.sh

~ ❯ /usr/include/c++/11.1.0/bits/stl_vector.h:1045: std::vector<_Tp, _Alloc>::reference std::vector<_Tp, _Alloc>::operator[](std::vector<_Tp, _Alloc>::size_type) [with _Tp = std::__cxx11::basic_string<char>; _Alloc = std::allocator<std::__cxx11::basic_string<char> >; std::vector<_Tp, _Alloc>::reference = std::__cxx11::basic_string<char>&; std::vector<_Tp, _Alloc>::size_type = long unsigned int]: Assertion '__n < this->size()' failed.

I don't know but if I wrote the same thing in another window manager like awesome or qtile (These are the window manager I use not bspwm or i3) it launches it just fine.

​

I don't know but it doesn't work in Openbox. Thanks in advance for the solution

5 points2 comments
Open on Reddit
About this post
Posted
Archived
Score
5 · 73% up
Kind
Text
ID
np81es

Author

7
posts
2
comments
2
media
View profile

4 comments

What version of polybar are you running? There was a very similar bug in version 3.5.5 that is now fixed.

1 points

This is my output of polybar -v

polybar 3.5.6
Features: +alsa +curl +i3 +mpd +network(libnl) +pulseaudio +xkeyboard

1 points

I have the exact same error. But what's weird, it's hit and miss. It's only when I use a theme config from this repo:

https://github.com/adi1090x/polybar-themes

If I do a basic bar with my own settings, no error.

If I wait to launch the bar with those configs until after I have loaded everything else (last line in my bspwmrc file), then it works.

It's some combination of starting software and the modules/configs used on those files. There's just so many options to work through to find the culprit, I haven't gotten to the bottom of it yet.

But my error is exactly the same as yours.

1 points

I fixed mine. Turns out that when I received that error in the console, polybar caused a kernel dump as well.

What was happening for me is that the theme I had downloaded was using the generic module "xworkspaces" which is described as:

This module displays EWMH desktops configured by the window manager.

NOTE: Requires a EWMH compatible window manager.

Since I use bspwm, and there is a specific bspwm module, I changed that module out for the bspwm variant, and voila. Problem gone. I'm sure it could be reported to the polybar folks to get fixed. But that did it for me.

Hopefully that helps you u/GuptaAnant

1 points

Keyboard shortcuts

Move and act

jork
Next / previous post or comment
Enteroro
Open the post
f
Open the media viewer
s
Save
h
Hide (the toast has Undo)
Tab
Right after an action: the toast's Undo
x
Collapse the comment
v
Next layout: cards, compact, grid

Go to

/
Search
gthenh
Home
gthena
All
gthens
Subreddits
gthenl
Library
?
This list
Esc
Close a menu or this list

In the viewer

←or→
Previous / next file
↑or↓
Previous / next post
korj
Previous / next post
Space
Play / pause
m
Mute
z
Zoom
s
Save
o
Open the post (on its own page: back to it)
Esc
Close

Keys do nothing while you type in a box.