Skip to content
This repository has been archived by the owner on Jun 26, 2023. It is now read-only.

libspotify: assertion 'pos + len <= string->len' #31

Closed
xemle opened this issue Nov 26, 2014 · 3 comments
Closed

libspotify: assertion 'pos + len <= string->len' #31

xemle opened this issue Nov 26, 2014 · 3 comments
Labels

Comments

@xemle
Copy link
Contributor

xemle commented Nov 26, 2014

Sometimes i got an assertion within the sp_session_create. This happens occasionally and could not reproduce it firmly. It is similar to #9

spop/build (master)$ git log -n 1
commit 8490718
Merge: 6dfa6da 8fb967d
Author: Thomas Jost [email protected]
Date: Mon Nov 24 12:03:57 2014 +0100

Merge pull request #29 from xemle/debian-build-help

Debian build help

spop/build (master)$ ./spopd -d
spop Copyright (C) 2010, 2011, 2012, 2013, 2014 Thomas Jost
This program comes with ABSOLUTELY NO WARRANTY.
This is free software, and you are welcome to redistribute it under certain conditions.
See the COPYING file bundled with this program for details.
Powered by SPOTIFY(R) CORE

2014-11-26 12:11:32 [INFO] Running in debug mode
2014-11-26 12:11:32 [DBG ] Creating session...
2014-11-26 12:11:32 [DBG ] Setting preferred bitrate to high.
2014-11-26 12:11:32 [DBG ] Setting preferred offline bitrate to high.
2014-11-26 12:11:32 [DBG ] Setting cache size to 0.
2014-11-26 12:11:32 [DBG ] Session created.
2014-11-26 12:11:32 [DBG ] Logging in...
2014-11-26 12:11:32 [DBG ] Will listen on ::1:6602...
2014-11-26 12:11:32 [SPTF] 11:11:32.541 I [ap:1752] Connecting to AP ap.spotify.com:4070
2014-11-26 12:11:32 [INFO] Listening on ::1: 6602
2014-11-26 12:11:32 [DBG ] Will listen on 127.0.0.1:6602...
2014-11-26 12:11:32 [INFO] Listening on 127.0.0.1: 6602

(process:11504): GLib-CRITICAL (recursed) **: g_string_erase: assertion 'pos + len <= string->len' failedAborted (core dumped)

spop/build (master)$ gdb ./spopd core
GNU gdb (Ubuntu 7.7.1-0ubuntu5~14.04.2) 7.7.1
Copyright (C) 2014 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later http://gnu.org/licenses/gpl.html
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law. Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
http://www.gnu.org/software/gdb/bugs/.
Find the GDB manual and other documentation resources online at:
http://www.gnu.org/software/gdb/documentation/.
For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from ./spopd...done.

warning: exec file is newer than core file.
[New LWP 5071]
[New LWP 5072]
[New LWP 5073]
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
Core was generated by `./spopd -d'.
Program terminated with signal SIGSEGV, Segmentation fault.
#0 0x00007f3aeee52b9e in ?? () from /usr/lib/libspotify.so.12

(gdb) bt
#0 0x00007f3aeee52b9e in ?? () from /usr/lib/libspotify.so.12
#1 0x00007f3aeee5316e in sp_session_create () from /usr/lib/libspotify.so.12
#2 0x000000000040dca9 in session_init () at /pub/incoming/2014/spop/src/spotify.c:155
#3 0x0000000000407644 in logging_init () at /pub/incoming/2014/spop/src/main.c:213
#4 main (argc=10066912, argv=0x999210) at /pub/incoming/2014/spop/src/main.c:129

@Schnouki Schnouki added the bug label Nov 28, 2014
@Schnouki
Copy link
Owner

I hoped this bug was gone... Anyway, I just installed a debug build of glib2 on my machine, I'll try to reproduce this and hopefully have a full backtrace... Thanks for the report!

@xemle
Copy link
Contributor Author

xemle commented Nov 28, 2014

If it will help I could send you my coredump (privately, due spotify credentials)?

@Schnouki
Copy link
Owner

Schnouki commented Dec 8, 2014

Found it! It's a threading issue that almost only happens when using a log file. I'll push a fix soon :)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants