dpayne / cli-visualizer

CLI based audio visualizer
MIT License
2.11k stars 122 forks source link

Allocation Error #182

Open SebastianBraun01 opened 3 years ago

SebastianBraun01 commented 3 years ago

I have cli-visualizer installed via the AUR, and copied the configuration file and the standart colorscheme. But it crashes on startup and i get a memory allocation error.

/usr/include/c++/10.2.0/bits/stl_vector.h:1045: std::vector<_Tp, _Alloc>::reference std::vector<_Tp, _Alloc>::operator[](std::vector<_Tp, _Alloc>::size_type) [with _Tp = double; _Alloc = std::allocator<double>; std::vector<_Tp, _Alloc>::reference = double&; std::vector<_Tp, _Alloc>::size_type = long unsigned int]: Assertion '__builtin_expect(__n < this->size(), true)' failed. zsh: abort (core dumped) vis

I dont know if it comes from a faulty configuration or is a bug.

Here is my configuration, i copied mostly the defaults with minor changes:

Audio settings

Currently available ones are "mpd", "pulse", "port", and "alsa". Defaults to "mpd".

audio.sources=pulse

If pulse audio is not working with vis try switching the audio source. A list can be found by running the

command pacmd list-sinks | grep -e 'name:' -e 'index'

audio.pulse.source=0

Defaults to "/tmp/mpd.fifo"

mpd.fifo.path=/tmp/mpd.fifo

If set to false the visualizers will use mono mode instead of stereo. Some visualizers will

behave differently when mono is enabled. For example, spectrum show two sets of bars.

audio.stereo.enabled=false

Configures the samples rate and the cutoff frequencies.

audio.sampling.frequency=44100 audio.low.cutoff.frequency=30 audio.high.cutoff.frequency=22050

Color settings

Specifies the color scheme. The color scheme must be in ~/.config/vis/colors/ directory. Default is "colors"

colors.scheme=rainbow

visualizer.spectrum.color.scheme=rainbow

Turns off overriding the user's terminal colors

colors.override.terminal=false

Spectrum settings

Refresh rate of the visualizers. A really high refresh rate may cause screen tearing. Default is 20.

visualizer.fps=20

Available smoothing options are monstercat, sgs, none. Defaults to sgs.

visualizer.spectrum.smoothing.mode=monstercat

This configures the sgs smoothing effect on the spectrum visualizer. More points spreads out the smoothing

effect and increasing passes runs the smoother multiple times on reach run. Defaults are points=3 and passes=2.

visualizer.sgs.smoothing.points=3 visualizer.sgs.smoothing.passes=2

This configures the falloff effect on the spectrum visualizer. Available falloff options are fill,top,none.

Defaults to "fill"

visualizer.spectrum.falloff.mode=fill

Configures how fast the falloff character falls. This is an exponential falloff so values usually look

best 0.9+ and small changes in this value can have a large effect. Defaults to 0.95

visualizer.spectrum.falloff.weight=0.95

Spectrum bar width. Defaults to 1.

visualizer.spectrum.bar.width=2

The amount of space between each bar in the spectrum visualizer. Defaults to 1. It's possible to set this to

zero to have no space between bars

visualizer.spectrum.bar.spacing=1

Margins in percent of total screen for spectrum visualizer. All margins default to 0

visualizer.spectrum.top.margin=0.0 visualizer.spectrum.bottom.margin=0.0 visualizer.spectrum.right.margin=0.0 visualizer.spectrum.left.margin=0.0

Reverses the direction of the spectrum so that high freqs are first and low freqs last. Defaults to false.

visualizer.spectrum.reversed=false

Applies scaling factor to both lorenz and ellipse visualizers. This is useful when the system audio is set

to a low volume.

visualizer.scaling.multiplier=1.0

Specifies how often the visualizer will change in seconds. 0 means do not rotate. Default is 0.

visualizer.rotation.secs=10

Configures the visualizers and the order they are in. Available visualizers are spectrum,lorenz,ellipse.

Defaults to spectrum,ellipse,lorenz

visualizers=spectrum,ellipse,lorenz

Configures what character the spectrum visualizer will use. Specifying a space (e.g " ") means the

background will be colored instead of the character. Defaults to " ".

visualizer.spectrum.character=#

Configures what character the ellipse visualizer will use. Specifying a space (e.g " ") means the

background will be colored instead of the character. Defaults to " ".

visualizer.ellipse.character=#

The radius of each color ring in the ellipse visualizer. Defaults to 2.

visualizer.ellipse.radius=2

archroid commented 3 years ago

Same issue. Any idea?

konstantinhirschfeld commented 3 years ago

I had the same error, but building with the install.sh file from the repo worked perfectly.