GNOME Bugzilla – Bug 758451
Segfault at start
Last modified: 2015-11-23 20:10:12 UTC
At start (with any args but --help), I got a segfault : $ sound-juicer [1] 25839 segmentation fault (core dumped) sound-juicer GDB gives me : (gdb) run Starting program: /usr/bin/sound-juicer [Thread debugging using libthread_db enabled] Using host libthread_db library "/usr/lib/libthread_db.so.1". [New Thread 0x7fffe64a4700 (LWP 26832)] [New Thread 0x7fffe5ca3700 (LWP 26833)] [New Thread 0x7fffe5285700 (LWP 26835)] [New Thread 0x7fffe4a84700 (LWP 26861)] [New Thread 0x7fffd7fff700 (LWP 26862)] [Thread 0x7fffe5285700 (LWP 26835) exited] [New Thread 0x7fffe5285700 (LWP 26867)] [Thread 0x7fffe4a84700 (LWP 26861) exited] [New Thread 0x7fffe4a84700 (LWP 26871)] [New Thread 0x7fffd6fc7700 (LWP 26872)] Program received signal SIGSEGV, Segmentation fault. 0x000000000041ac2b in ?? () (gdb) bt
+ Trace 235747
Any idea ?
I tried to build from git/master too… Not better :/
Here are an extended gdb output :
+ Trace 235748
Can you attach the ~/.config/sound-juicer/genres file? I think the crash happens because the split strings is empty, and we're doing strlen on the -1 index of the array, or the string is NULL.
It was an empty file. So i deleted the .config/sound-juicer directory. Now it starts with no problems. You should check if the file is empty ;)
Created attachment 316023 [details] [review] genres: Fix crasher with empty genres file If g_strv_length() is 0, we'd then try to access the strv at index -1 which is obviously not a good thing to do.
Review of attachment 316023 [details] [review]: Looks good, thanks
Attachment 316023 [details] pushed as 7cf1def - genres: Fix crasher with empty genres file