Open LinusU opened 11 years ago
Got one more, it seems that there is always at least one buffer underflow before this happens. Last time there was one, this time four.
[../deps/mpg123/src/output/coreaudio.c:81] warning: Didn't have any audio data in callback (buffer underflow)
[../deps/mpg123/src/output/coreaudio.c:81] warning: Didn't have any audio data in callback (buffer underflow)
[../deps/mpg123/src/output/coreaudio.c:81] warning: Didn't have any audio data in callback (buffer underflow)
[../deps/mpg123/src/output/coreaudio.c:81] warning: Didn't have any audio data in callback (buffer underflow)
Program received signal EXC_BAD_ACCESS, Could not access memory.
Reason: KERN_INVALID_ADDRESS at address: 0x0000000000000000
0x0000360b14f245b9 in ?? ()
(gdb) bt
#0 0x0000360b14f245b9 in ?? ()
#1 0x0000360b14f118b7 in ?? ()
#2 0x000000010018a28c in v8::internal::Invoke ()
#3 0x0000000100146364 in v8::Function::Call ()
#4 0x00000001021055b4 in read_delivered_music (handle=<value temporarily unavailable, due to optimizations>, status=<value temporarily unavailable, due to optimizations>) at ../src/player.cc:132
#5 0x000000010012f60c in uv__run_timers ()
#6 0x0000000100125f7e in uv_run ()
#7 0x000000010000c6e3 in node::Start ()
#8 0x00000001000039f4 in start ()
(gdb)
Are you sure this isn't a node core audio error? Le 22 oct. 2013 02:11, "Linus Unnebäck" notifications@github.com a écrit :
Got one more, it seems that there is always at least one buffer underflow before this happens. Last time there was one, this time four.
[../deps/mpg123/src/output/coreaudio.c:81] warning: Didn't have any audio data in callback (buffer underflow) [../deps/mpg123/src/output/coreaudio.c:81] warning: Didn't have any audio data in callback (buffer underflow) [../deps/mpg123/src/output/coreaudio.c:81] warning: Didn't have any audio data in callback (buffer underflow) [../deps/mpg123/src/output/coreaudio.c:81] warning: Didn't have any audio data in callback (buffer underflow)
Program received signal EXC_BAD_ACCESS, Could not access memory. Reason: KERN_INVALID_ADDRESS at address: 0x0000000000000000 0x0000360b14f245b9 in ?? () (gdb) bt
0 0x0000360b14f245b9 in ?? ()
1 0x0000360b14f118b7 in ?? ()
2 0x000000010018a28c in v8::internal::Invoke ()
3 0x0000000100146364 in v8::Function::Call ()
4 0x00000001021055b4 in read_delivered_music (handle=<value temporarily unavailable, due to optimizations>, status=<value temporarily unavailable, due to optimizations>) at ../src/player.cc:132
5 0x000000010012f60c in uv__run_timers ()
6 0x0000000100125f7e in uv_run ()
7 0x000000010000c6e3 in node::Start ()
8 0x00000001000039f4 in start ()
(gdb)
— Reply to this email directly or view it on GitHubhttps://github.com/Floby/node-libspotify/issues/41#issuecomment-26767967 .
coreaudio.c
is from node-speaker
, however, I don't think that the problem lies there. This is just what I think and I might be totally wrong:
#3 0x0000000100146364 in v8::Function::Call ()
Is player.cc
line 132, where it calls into this._session._sp_session.music_delivery
which I think is #1
which just forwards the call to Node.js Readable stream which actually uses the buffer (#0
). When the buffer is read it tries to read it from address 0 (NULL) which of course results in EXC_BAD_ACCESS
.
So I think that somehow we create the buffer with a NULL pointer...
That's unfortunate... ^^
On 22 October 2013 15:38, Linus Unnebäck notifications@github.com wrote:
coreaudio.c is from node-speaker, however, I don't think that the problem lies there. This is just what I think and I might be totally wrong:
3 0x0000000100146364 in v8::Function::Call () Is player.cc line 132,
where it calls into this._session._sp_session.music_delivery which I think is #1 which just forwards the call to Node.js Readable stream which actually uses the buffer (#0). When the buffer is read it tries to read it from address 0 (NULL) which of course results in EXC_BAD_ACCESS.
So I think that somehow we create the buffer with a NULL pointer...
— Reply to this email directly or view it on GitHubhttps://github.com/Floby/node-libspotify/issues/41#issuecomment-26803169 .
As I've said, I should be able to get more time to work on this next week.
On 22 October 2013 17:41, Florent JABY florent.jaby@gmail.com wrote:
That's unfortunate... ^^
On 22 October 2013 15:38, Linus Unnebäck notifications@github.com wrote:
coreaudio.c is from node-speaker, however, I don't think that the problem lies there. This is just what I think and I might be totally wrong:
3 0x0000000100146364 in v8::Function::Call () Is player.cc line 132,
where it calls into this._session._sp_session.music_delivery which I think is #1 which just forwards the call to Node.js Readable stream which actually uses the buffer (#0). When the buffer is read it tries to read it from address 0 (NULL) which of course results in EXC_BAD_ACCESS.
So I think that somehow we create the buffer with a NULL pointer...
— Reply to this email directly or view it on GitHubhttps://github.com/Floby/node-libspotify/issues/41#issuecomment-26803169 .
Yeah, no worries. I'll look at aswell if I get the time.
I have made a change in this commit that should hopefully address this issue, I'm still testing it for a while but it seems to do the trick so far. I'll create a PR once I'm happy that it has actually fixed it. https://github.com/IainCole/node-libspotify/commit/85a2cddd9ecac62e419ce4c227e2c53b3ad207eb
Looks like this didn't work :(
This one https://github.com/IainCole/node-libspotify/commit/ec2fbc544b7b126e75b615839efd9b9fab05fec4 might work better though
Did it Iain?
I still get a segfault in my particular app but I don't get this error any more and it's much more stable, so I think it worked for fixing this issue. I haven't been able to get to the root cause of my other issue though so there might still be something wrong.