Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Segfault #78

Closed
ghost opened this issue Oct 28, 2015 · 13 comments
Closed

Segfault #78

ghost opened this issue Oct 28, 2015 · 13 comments

Comments

@ghost
Copy link

ghost commented Oct 28, 2015

*** Error in `cava': free(): invalid next size (fast): 0x0000000001deee30 ***
======= Backtrace: =========
/usr/lib/libc.so.6(+0x71e76)[0x7fa14f63ae76]
/usr/lib/libc.so.6(+0x776c6)[0x7fa14f6406c6]
/usr/lib/libc.so.6(+0x77eae)[0x7fa14f640eae]
/usr/lib/libiniparser.so.0(iniparser_load+0x208)[0x7fa15079aea8]
cava[0x40478d]
cava[0x40201d]
/usr/lib/libc.so.6(__libc_start_main+0xf0)[0x7fa14f5e9680]
cava[0x4030e9]
======= Memory map: ========
00400000-00407000 r-xp 00000000 08:04 1983935                            /usr/bin/cava
00606000-00607000 r--p 00006000 08:04 1983935                            /usr/bin/cava
00607000-00608000 rw-p 00007000 08:04 1983935                            /usr/bin/cava
00608000-0060d000 rw-p 00000000 00:00 0
01dee000-01e0f000 rw-p 00000000 00:00 0                                  [heap]
7fa148000000-7fa148021000 rw-p 00000000 00:00 0
7fa148021000-7fa14c000000 ---p 00000000 00:00 0
7fa14efa1000-7fa14efb7000 r-xp 00000000 08:04 1972893                    /usr/lib/libgcc_s.so.1
7fa14efb7000-7fa14f1b6000 ---p 00016000 08:04 1972893                    /usr/lib/libgcc_s.so.1
7fa14f1b6000-7fa14f1b7000 rw-p 00015000 08:04 1972893                    /usr/lib/libgcc_s.so.1
7fa14f1b9000-7fa14f1c0000 r-xp 00000000 08:04 1972815                    /usr/lib/librt-2.22.so
7fa14f1c0000-7fa14f3bf000 ---p 00007000 08:04 1972815                    /usr/lib/librt-2.22.so
7fa14f3bf000-7fa14f3c0000 r--p 00006000 08:04 1972815                    /usr/lib/librt-2.22.so
7fa14f3c0000-7fa14f3c1000 rw-p 00007000 08:04 1972815                    /usr/lib/librt-2.22.so
7fa14f3c1000-7fa14f3c3000 r-xp 00000000 08:04 1972868                    /usr/lib/libdl-2.22.so
7fa14f3c3000-7fa14f5c3000 ---p 00002000 08:04 1972868                    /usr/lib/libdl-2.22.so
7fa14f5c3000-7fa14f5c4000 r--p 00002000 08:04 1972868                    /usr/lib/libdl-2.22.so
7fa14f5c4000-7fa14f5c5000 rw-p 00003000 08:04 1972868                    /usr/lib/libdl-2.22.so
7fa14f5c9000-7fa14f764000 r-xp 00000000 08:04 1972840                    /usr/lib/libc-2.22.so
7fa14f764000-7fa14f964000 ---p 0019b000 08:04 1972840                    /usr/lib/libc-2.22.so
7fa14f964000-7fa14f968000 r--p 0019b000 08:04 1972840                    /usr/lib/libc-2.22.so
7fa14f968000-7fa14f96a000 rw-p 0019f000 08:04 1972840                    /usr/lib/libc-2.22.so
7fa14f96a000-7fa14f96e000 rw-p 00000000 00:00 0
7fa14f971000-7fa14f9de000 r-xp 00000000 08:04 1972879                    /usr/lib/libncursesw.so.6.0
7fa14f9de000-7fa14fbdd000 ---p 0006d000 08:04 1972879                    /usr/lib/libncursesw.so.6.0
7fa14fbdd000-7fa14fbe1000 r--p 0006c000 08:04 1972879                    /usr/lib/libncursesw.so.6.0
7fa14fbe1000-7fa14fbe3000 rw-p 00070000 08:04 1972879                    /usr/lib/libncursesw.so.6.0
7fa14fbe9000-7fa14fc01000 r-xp 00000000 08:04 1972828                    /usr/lib/libpthread-2.22.so
7fa14fc01000-7fa14fe00000 ---p 00018000 08:04 1972828                    /usr/lib/libpthread-2.22.so
7fa14fe00000-7fa14fe01000 r--p 00017000 08:04 1972828                    /usr/lib/libpthread-2.22.so
7fa14fe01000-7fa14fe02000 rw-p 00018000 08:04 1972828                    /usr/lib/libpthread-2.22.so
7fa14fe02000-7fa14fe06000 rw-p 00000000 00:00 0
7fa14fe09000-7fa14ff85000 r-xp 00000000 08:04 1979946                    /usr/lib/libfftw3.so.3.4.4
7fa14ff85000-7fa150185000 ---p 0017c000 08:04 1979946                    /usr/lib/libfftw3.so.3.4.4
7fa150185000-7fa150192000 r--p 0017c000 08:04 1979946                    /usr/lib/libfftw3.so.3.4.4
7fa150192000-7fa150193000 rw-p 00189000 08:04 1979946                    /usr/lib/libfftw3.so.3.4.4
7fa150199000-7fa150297000 r-xp 00000000 08:04 1972859                    /usr/lib/libm-2.22.so
7fa150297000-7fa150496000 ---p 000fe000 08:04 1972859                    /usr/lib/libm-2.22.so
7fa150496000-7fa150497000 r--p 000fd000 08:04 1972859                    /usr/lib/libm-2.22.so
7fa150497000-7fa150498000 rw-p 000fe000 08:04 1972859                    /usr/lib/libm-2.22.so
7fa150499000-7fa15058c000 r-xp 00000000 08:04 1979637                    /usr/lib/libasound.so.2.0.0
7fa15058c000-7fa15078b000 ---p 000f3000 08:04 1979637                    /usr/lib/libasound.so.2.0.0
7fa15078b000-7fa150792000 r--p 000f2000 08:04 1979637                    /usr/lib/libasound.so.2.0.0
7fa150792000-7fa150794000 rw-p 000f9000 08:04 1979637                    /usr/lib/libasound.so.2.0.0
7fa150799000-7fa15079d000 r-xp 00000000 08:04 1983934                    /usr/lib/libiniparser.so.0
7fa15079d000-7fa15099c000 ---p 00004000 08:04 1983934                    /usr/lib/libiniparser.so.0
7fa15099c000-7fa15099d000 r--p 00003000 08:04 1983934                    /usr/lib/libiniparser.so.0
7fa15099d000-7fa15099e000 rw-p 00004000 08:04 1983934                    /usr/lib/libiniparser.so.0
7fa1509a1000-7fa1509c3000 r-xp 00000000 08:04 1972837                    /usr/lib/ld-2.22.so
7fa150bbd000-7fa150bc2000 rw-p 00000000 00:00 0
7fa150bc2000-7fa150bc3000 r--p 00021000 08:04 1972837                    /usr/lib/ld-2.22.so
7fa150bc3000-7fa150bc4000 rw-p 00022000 08:04 1972837                    /usr/lib/ld-2.22.so
7fa150bc4000-7fa150bc6000 rw-p 00000000 00:00 0
7fa150bc6000-7fa150bc9000 rw-p 00000000 00:00 0
7ffe1e2e8000-7ffe1e30a000 rw-p 00000000 00:00 0                          [stack]
7ffe1e3a9000-7ffe1e3ab000 r--p 00000000 00:00 0                          [vvar]
7ffe1e3ab000-7ffe1e3ad000 r-xp 00000000 00:00 0                          [vdso]
ffffffffff600000-ffffffffff601000 r-xp 00000000 00:00 0                  [vsyscall]
uname -a
Linux betsy 4.1.12_1 #1 SMP PREEMPT Tue Oct 27 06:38:21 UTC 2015 x86_64 GNU/Linux

gcc --version
gcc (GCC) 4.9.3

@karlstav
Copy link
Owner

woha a lot of details here. I must admit, I do not really understand what I'm looking at.

@gregf when does it segfault? Are you running any command line arguments? Anything special in the config file?

@ghost
Copy link
Author

ghost commented Oct 29, 2015

@karlstav Any command I run it segfaults. If I remove my config it appears to work. So I think it has something to do with iniparser? I don't see anything invalid in my config myself.

## Configuration file for CAVA. Default values are commented out.  Use either ; or # for commenting.

[general]
; mode = normal # smoothing mode, can be normal, scientific or waves.
; framerate = 60 # Default: 60. Accepts only non-negative values.
; sensitivity = 100 #  is sensitivity %. Accepts only non-negative values.
; bars = 0 # the number of bars. 0 sets it to auto (fil upp console). 
; bar_width = 3 # width of bars. 
; bar_spacing = 1 # space between bars.
; lower_cutoff_freq = 50 # the lower cutof frequency for the far left bar
; higher_cutoff_freq = 10000 # the higher cutoff frequency for the far right bar. Note: there is a minimum total bandwith of 43Mhz x number of bars. Cava will automaticly increase the higher cuttoff if a too low band is specified.



[input]
method = fifo # supported input methods are 'alsa' or 'fifo'.
source = /home/gregf/.mpd/mpd.fifo # ALSA device or FIFO path.

[output]
; method = ncurses # method used to draw output may be ncurses, noncurses or circle.
; style = stereo # visual styles, may be 'stereo' or 'mono'. Stereo mirrors both channels with low frequencies in center. Mono avrages both channels and outputs left to right lowest to highest frequencies

[color]
# supported colors are: red, green, yellow, magenta, cyan, white, blue, black.
; background = black
; foreground = cyan

[smoothing]
; integral = 0.7 # multiplier for the integral smoothing calculations. Takes values from 0 - 0.99. Higher values means smoother, but less precise. 0 to disable.
; monstercat = 1 # disables or enables the so-called "Monstercat smoothing". Default: 1. Set to 0 to disable. 
; gravity = 1 # Set gravity multiplier for "drop off". Higher values means bars will drop faster. Accepts only non-negative values. 0.5 means half gravity, 2 means double. Set to 0 to disable "drop off".
; ignore = 0 # set bars with height lower than this to 0

[eq]
# This one is tricky. You can have as much keys as you want. More keys = more precision. Look at readme.md on github for further explanations and examples.
; 1 = 1 # bass
; 2 = 1
; 3 = 1
; 4 = 1
; 5 = 1 # treble

@karlstav
Copy link
Owner

could you could try to comment out the two lines you changed (method and source), just to check?

@ghost
Copy link
Author

ghost commented Oct 29, 2015

I did that playing around with it, and it didn't make any difference.

On Thu, Oct 29, 2015 at 07:33:38AM -0700, karl wrote:

could you could try to comment out the two lines you changed (method and source), just to check?


Reply to this email directly or view it on GitHub:
#78 (comment)

--gregf

@ghost
Copy link
Author

ghost commented Oct 29, 2015

iniparser-4.0_2 if you want to try and replicate the issue.

@karlstav
Copy link
Owner

are you using a system wide iniparser or the bundled one?

I have tried with both the bundled and the newest from github without any issues.

@ghost
Copy link
Author

ghost commented Oct 29, 2015

Looks like system wide.

 ldd /usr/bin/cava
        linux-vdso.so.1 (0x00007ffc5d1a9000)
        libiniparser.so.0 => /usr/lib/libiniparser.so.0 (0x00007f59ce69f000)
        libasound.so.2 => /usr/lib/libasound.so.2 (0x00007f59ce39f000)
        libm.so.6 => /usr/lib/libm.so.6 (0x00007f59ce09f000)
        libfftw3.so.3 => /usr/lib/libfftw3.so.3 (0x00007f59cdd0f000)
        libpthread.so.0 => /usr/lib/libpthread.so.0 (0x00007f59cdaef000)
        libncursesw.so.6 => /usr/lib/libncursesw.so.6 (0x00007f59cd877000)
        libc.so.6 => /usr/lib/libc.so.6 (0x00007f59cd4cf000)
        libdl.so.2 => /usr/lib/libdl.so.2 (0x00007f59cd2c7000)
        librt.so.1 => /usr/lib/librt.so.1 (0x00007f59cd0bf000)
        /lib/ld-linux-x86-64.so.2 (0x00007f59ce8a7000)

@karlstav
Copy link
Owner

could you try to compile it with the bundled instead?

are you by any chance using the package from AUR? It is kinda out of date, although it should work.

@ghost
Copy link
Author

ghost commented Oct 29, 2015

I narrowed it down to this line in the config file.

; style = stereo # visual styles, may be 'stereo' or 'mono'. Stereo mirrors both channels with low frequencies in center. Mono avrages both channels and outputs left to right lowest to highest frequencies

The comment to the right of stereo for some reason causes the segfault.

I'm not using archlinux. I tried both the package for voidlinux.eu and I tried compiling it by hand.

@ghost
Copy link
Author

ghost commented Oct 29, 2015

I think its a line length issue with iniparser. It segfaults on the word center. In the sentence frequencies in center. If I delete the word center it then works.

@ghost
Copy link
Author

ghost commented Oct 29, 2015

This appears to be fixed with the bundled version and the latest version of cava. So i'm very sorry to have wasted your time. Voidlinux has 0.3.5 packaged and it looks like the latest version is 0.3.5.9. I'm going to submit a pull request to update there package. Thank you for your time, and again sorry to have wasted it.

@ghost ghost closed this as completed Oct 29, 2015
@karlstav
Copy link
Owner

@gregf no problem 😉 There must have been a problem with the version of iniparser used in Voidlinux, nothing have been done with cava lately than can have caused/fixed this.

For what it's worth this made me realize that the lines on the comment in the config file are waaaaay to long, looks like a mess...

@ghost
Copy link

ghost commented Nov 2, 2015

Void's iniparser-package got patched and plays nicely with cava. So yes, Voidlinux' Cava-Package is working again.

This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant