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
bus error #8
Comments
I get the same issue on 10.5.8. Used the directions from the Reddit comment. |
Same here. |
I've seen this once with the clang compiler on x86. Which compiler (and version) are you using? Can someone generate a backtrace, please?
edit: Can't reproduce the "bus error" with clang any more... |
Here's what I'm seeing: gdb ./src/pianobar GNU gdb 6.3.50-20050815 (Apple version gdb-962) (Sat Jul 26 08:14:40 UTC 2008) Copyright 2004 Free Software Foundation, Inc. GDB is free software, covered by the GNU General Public License, and you are welcome to change it and/or distribute copies of it under certain conditions. Type "show copying" to see the conditions. There is absolutely no warranty for GDB. Type "show warranty" for details. This GDB was configured as "i386-apple-darwin"...Reading symbols for shared libraries ...... done (gdb) run Starting program: /Users/qrush/Dev/c/pianobar/src/pianobar Reading symbols for shared libraries +++++.......................... done Welcome to pianobar! Reading symbols for shared libraries .. done [?] Username: nick@quaran.to [?] Password: (i) Login... Ok. (i) Get stations... Ok. 0) q Bahston Rawk 1) q Classic RAWK! 2) Q DrNick40's QuickMix 3) Pink Floyd Radio 4) q Red Barchetta 5) y2k [?] Select station: 4 |> Station "Red Barchetta" (70369594586271057) (i) Receiving new playlist... Ok. |> "Presto" by "Rush" on "Presto" Program received signal EXC_BAD_ACCESS, Could not access memory. Reason: KERN_PROTECTION_FAILURE at address: 0x00000038 0x94e54c03 in flockfile () (gdb) backtrace #0 0x94e54c03 in flockfile () #1 0x94e9417f in fgetc () #2 0x000045b1 in main (argc=1, argv=0xbfffea78) at /Users/qrush/Dev/c/pianobar/src/main.c:303 |
Looks like curFd is NULL... Can you get a more detailed backtrace and paste it somewhere (gist)? Ubuntu has a nice guide: https://wiki.ubuntu.com/Backtrace#Generation (you might have to remove your password from this backtrace) |
yep, that seems like it was the case. I added a Program received signal EXC_BAD_ACCESS, Could not access memory. Reason: KERN_INVALID_ADDRESS at address: 0x000d9000 [Switching to process 2047 thread 0x1103] 0x00005a4a in BarPlayerAACCb (ptr=0xb018280b, size=9912, stream=0x17200) at /Users/qrush/Dev/c/pianobar/src/player.c:249 249 player->sampleSize[player->sampleSizeCurr] = (gdb) backtrace #0 0x00005a4a in BarPlayerAACCb (ptr=0xb018280b, size=9912, stream=0x17200) at /Users/qrush/Dev/c/pianobar/src/player.c:249 #1 0x0000f1ff in WaitressFetchCall (waith=0x21ac0) at /Users/qrush/Dev/c/pianobar/libwaitress/src/waitress.c:453 #2 0x00006319 in BarPlayerThread (data=0x17200) at /Users/qrush/Dev/c/pianobar/src/player.c:454 #3 0x94e46155 in _pthread_start () #4 0x94e46012 in thread_start () I'll work on getting the more detailed backtrace together for you. |
So, we have two independend bugs here. The first one seems to be trivial to fix, but I'm waiting for the backtrace, 'cause Bug two: AAC playback crashes. (Though this should not happen:) Have you tried mp3 playback? Add this line to your config file: |
This is what I am seeing. I am running Leopard 10.5.8 x86.
|
Thanks, itsmeduncan, but I really need a full backtrace to find out what's going wrong, see my comment above. |
@PromyLOPh: Is this what you need?
|
Yes, thank you 1Marc. Well, I'll have to use the ugly select() call on OS X... Don't know how long it will take, though. [edit]Please remove your password from the gdb output. Dunno why I can't edit your post :/[/edit] |
Ok, here's a patch: http://gist.github.com/291786 Can someone test this on OS X, please? |
I can't seem to build with the patch applied...
|
Ah, sorry, my fault. Gist has been updated, copy the file poll_test.c to src/build/poll_test.c (the directory does not exist yet). |
cmake built fine, but when i tried to, "make"
|
Looks like a missing include. The select(2) manpage says sys/select.h is correct -- strange, 'cause it works fine for me. Maybe replacing
helps? [edit] |
I made an independent fix for this by replacing poll() with select. It's in my fork. |
Thanks, but have you read select_tut(2), especially "select law" 10?
Additionally there already exists a patch (see above). I'm just waiting for someone who can confirm that the patch works (with the modifications pointed out in my last post) and fixes this issue. |
Good point, I didn't see that - I updated it in my fork. I looked at your patch - why use poll() or select() conditionally based on the operating system? It seems like it might be cleaner to just stick with select(). |
Yeah, you're right. All these ifdefs are even more ugly than select itself. I applied your patch and performed some style tweaks (camelCase, renamed variables e.g.) -- thanks. Closed, see commit a99bfd2 |
Working great here! Thanks! |
I'm on os x leapord and when I try to play a station I get "Bus error". Any ideas what could cause this?
|> Station "Yanni Radio" (149189365585733648)
(i) Receiving new playlist... Ok.
|> "Butterflies" by "Suzanne Ciani" on "Pianissimo III"
Bus error
The text was updated successfully, but these errors were encountered: