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

Multiple Segfaults #32

Closed
shmibs opened this issue Jan 27, 2016 · 4 comments
Closed

Multiple Segfaults #32

shmibs opened this issue Jan 27, 2016 · 4 comments

Comments

@shmibs
Copy link

shmibs commented Jan 27, 2016

summary

building from master, i've been encountering multiple situations leading to segfaults

system: Arch Linux 64bit
library stats:

Artists:    996
Albums:    1278
Songs:    14139

rc: empty file (cut everything for debugging purposes and it had no effect)
valgrind logs: https://gist.github.com/shmibs/82a624a32872f33166bb

startup crash

when pms starts, if mpd is playing and repeat, random, single, and consume are all off, it crashes before anything is displayed. i've narrowed this down to this line:

https://github.com/ambientsound/pms/blob/master/src/pms.cpp#L1267

building with that line removed avoids the segfault

pressing shift+j

i previously had shift+j mapped to goto-current (don't remember if this was default or not) and so got in a habit of using it. even without any rc, as described above, hitting shift+j at any time triggers a segfault

pressing tab

similarly, hitting tab at any time causes a crash

@kimtore
Copy link
Owner

kimtore commented Jan 28, 2016

Thanks. I've fixed the tab issue. As for the startup crash I am unable to reproduce. Although the Valgrind logs are helpful, they would be more useful if you could compile PMS with debugging symbols (./configure --enable-debug).

Shift+J is mapped to moving songs, I think I will reimplement that in another way, so you might have to wait a bit on the fix :-)

@shmibs
Copy link
Author

shmibs commented Jan 28, 2016

mmm, cool!

and yeah, sorry about the logs. haven't dealt with autotools things before, so i was poking around in the Makefile trying to make it work and gave up (´・ω・`)

after the last commit, i'm getting

pms: pms.cpp:1191: std::__cxx11::string Pms::playstring(): Assertion `comm->activelist()' failed.

building a debug version with that line empty, valgrind confirms that the invalid read is at the line mentioned above

==31059==    at 0x4380D7: Pms::playstring[abi:cxx11]() (pms.cpp:1268)
==31059==    by 0x437B61: Pms::drawstatus() (pms.cpp:1148)
==31059==    by 0x434659: Pms::main() (pms.cpp:629)
==31059==    by 0x432E9D: main (pms.cpp:61)
==31059==  Address 0x0 is not stack'd, malloc'd or (recently) free'd

@kimtore
Copy link
Owner

kimtore commented Jan 28, 2016

Thanks. Can you try with the latest commit?

@shmibs
Copy link
Author

shmibs commented Jan 28, 2016

that's the tab issue down!

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

2 participants