I believe I found the bug. It was caused by conflicts between my 
threads...

In my user interaction thread, Jukebox.skip_song was calling 
Jukebox.terminate_current_song which was calling @current_song.terminate 
AND explicitly setting "@current_song = nil."

In my Jukebox looping thread, Jukebox.play_loop was set to automatically 
play another song whenever the previous song terminated.

I should have just let the Jukebox looping thread assign a new Song 
instance to @current_song. There was no need to also explicitly set 
"@current_song = nil". Doing both sometimes caused a conflict because 
one thread would try to stop @current_song but couldn't find one.

After eliminating "@current_song = nil", Jukebox has stopped randomly 
choking and telling me @current_song is nil. Yay!

Threaded programming can be tricky!

(Tomorrow I'll try to figure out why Spoon.spawnp isn't working any more 
in JRuby. Way too late now.)

P.S. If you want to try it: "gem install jimmy_jukebox"

-- 
Posted via http://www.ruby-forum.com/.