Skip to content
This repository has been archived by the owner on Aug 6, 2018. It is now read-only.

Hallon Player always crashes on some songs #146

Open
saulide opened this issue May 16, 2013 · 1 comment
Open

Hallon Player always crashes on some songs #146

saulide opened this issue May 16, 2013 · 1 comment

Comments

@saulide
Copy link

saulide commented May 16, 2013

Hey Burgestrand and others,

i have a rails server running at home, that plays a playlist that i send to a specified server. The problem is, that sometimes the player crashes ( happens once in a two hours), because it cant load/play a song. Recently i found a song, where it crashes always:

http://open.spotify.com/track/5bXKoBqIbMhzg2bp8dQbSF
spotify:track:5bXKoBqIbMhzg2bp8dQbSF

Following crashlog from rails console:

1.9.3p385 :015 > hallon_player.play(track) => <Hallon::Player session=0x7fe4de3eac30 driver=Hallon::OpenAL status=paused>
1.9.3p385 :016 > ruby(4181,0x1070a5000) malloc: *** error for object 0x10708f070: pointer being freed was not allocated
*** set a breakpoint in malloc_error_break to debug
Abort trap: 6

My workflow:

session = Hallon::Session.initialize(xxx)
session.login!(xxx)
hallon_player = Hallon::Player.new(Hallon::OpenAL)
track = Hallon::Track.new('spotify:track:5bXKoBqIbMhzg2bp8dQbSF')
track.load
hallon_player.play(track)

I hope someone can help, it drives me crazy...

@Burgestrand
Copy link
Owner

Wow, that is interesting. I can replicate the always-crashing thing on my computer as well when using Hallon. However, using only the raw spotify gem, with the audio stream example using plaything (and not OpenAL), it will not crash.

I’m not entirely sure of why it’s crashing, but you’ve found a song recorded at 48KHz, instead of the more common 44.1KHz. This might be the cause of it crashing using Hallon/OpenAL, which leads me to believe the bug is most likely in hallon-openal, and not in Hallon itself.

Unfortunately, I can’t give you a timetable of when this issue will be fixed. I’ll most likely be able to take a look at it earliest tomorrow.

If you don’t want to wait for a fix, you could:

  1. Possibly write your own Hallon::Player, which uses Plaything instead of Hallon::OpenAL.
  2. Port your code using Hallon to use the raw spotify gem.

Thanks for reporting the issue, I’m really glad you found a good example to reproduce it. :)

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

No branches or pull requests

2 participants