Airplay audio not working with some skins
#1
Ok,

I'm going to have one more attempt at troubleshooting a most infuriating issue I've been seeing in Gotham for a long time now including 13.2.

When I use the Amber skin airplay audio does not work properly. More specifically the screen just flashes when I attempt to play a track or switch tracks but no audio comes out and the visualisation (if enabled) does not start.

I don't seem to have the same issue in Confluence, which makes it seem like its a Skin or Addon issue (since different skins use different helper addons) except for the following two points:

1) Audio playback from the local music library is not affected. (Why would only airplay music be affected ? How does it differ ?)

2) If I turn on debugging it will NOT fault. Yes you read right, I cannot debug this issue or provide a debug log because turning on debugging fixes the problem!!! Confused (how is it even possible that enabling debugging can fix the problem?)

So I'm stumped, and don't know where to start looking...

Is it an airplay bug ? Is it a bug in Amber ? (But how would a skin bug prevent airplay audio working, and why only when debugging is turned off ?) Is it a bug in one of the addons Amber uses ? Is it a bug in the XBMC core ? I honestly have no idea and have no idea how to narrow down the blame since it seems to occur with a confluence of circumstances.. (no pun intended Wink )

I'm pretty sure that at least one other skin has the same issue, although I can't recall what the other skin was. Pretty sure that Amber is not the only culprit though, even though Confluence seems to be ok.

Where do I begin with this one ? It's rather frustrating as Amber is my skin of choice and unfortunately it is preventing me from using airplay audio... Sad
Kodi 18.3 - Mid 2007 Mac Mini, 4GB, 2TB HD, Windows 7 SP1
Kodi 18.3 - Vero4k, Raspberry Pi 2. OSMC.
Reply
#2
Does this skin activate the lyrics addon by any chance? (if so - try to disable it and see if this is the issue).
AppleTV4/iPhone/iPod/iPad: HowTo find debug logs and everything else which the devs like so much: click here
HowTo setup NFS for Kodi: NFS (wiki)
HowTo configure avahi (zeroconf): Avahi_Zeroconf (wiki)
READ THE IOS FAQ!: iOS FAQ (wiki)
Reply
#3
Nope it's not that. Amber does support the CU Lyrics addon but I have that turned off and the addon is not even installed.

I might have made some progress on this issue - it looks a bit like there might be a race condition of some sort.

With debugging turned on in the GUI it seems to always work, with debugging turned off it usually (but NOT always) doesn't work.

What I've discovered is if I enable debug logging through advancedsettings instead of the GUI I get roughly 50/50 success/fail rate, and that has allowed me to capture a debug log with some errors in it:

http://xbmclogs.com/show.php?id=306183

In the log I launched XBMC then started an airplay audio session at 16:12:16 which WAS successful in playing, I then paused playback (in spotify) for long enough for the Airtunes session to terminate at about 16:12:40 (I think) then a few seconds later attempted to resume playback in spotify which failed - a brief flash of the screen but no audio and no song details displayed either, but the iPad thought it was playing ok.

In particular I don't like the look of:

Code:
16:12:42 T:4374675456   DEBUG: AIRTUNES: Got control packet of type 0x54
16:12:42 T:140735076924608   ERROR: Init: Error creating demuxer
16:12:42 T:140735076924608   ERROR: CAudioDecoder: Unable to Init Codec while loading file pipe://2/
16:12:42 T:140735076924608 WARNING: PAPlayer::QueueNextFileEx - Failed to create the decoder

It seems almost like the airplay service is continuing to receive the airplay stream even though paplayer failed to launch ?

Does this provide any clues ? Should I try making dvdplayer the default audio player to see if I can still reproduce the issue ?

By the way this is an almost clean install that I'm testing with - its a Mac OS 64 bit build of 13.2 with the airplay features bitmask tweaked to work with iOS 8 and Amber installed - no other changes except enabling debugging in advancedsettings, so should in theory be easy to reproduce.
Kodi 18.3 - Mid 2007 Mac Mini, 4GB, 2TB HD, Windows 7 SP1
Kodi 18.3 - Vero4k, Raspberry Pi 2. OSMC.
Reply
#4
Here is a debug log with dvdplayer as the default audio player, unfortunately the intermittent failure to play is still present, so apparently paplayer is not to blame:

http://xbmclogs.com/show.php?id=306216

In this case the first attempt to play failed, then the second attempt to play succeeded. Opposite to last time, but only because the problem is intermittent.
Kodi 18.3 - Mid 2007 Mac Mini, 4GB, 2TB HD, Windows 7 SP1
Kodi 18.3 - Vero4k, Raspberry Pi 2. OSMC.
Reply
#5
cherry-pick all from august 13th here

https://github.com/xbmc/xbmc/commits/mas...Server.cpp
AppleTV4/iPhone/iPod/iPad: HowTo find debug logs and everything else which the devs like so much: click here
HowTo setup NFS for Kodi: NFS (wiki)
HowTo configure avahi (zeroconf): Avahi_Zeroconf (wiki)
READ THE IOS FAQ!: iOS FAQ (wiki)
Reply
#6
A wee bit too cryptic for me sorry... Smile

Do you mean all four commits from August 13th onwards not just that one commit ? And are you suggesting that if I use cherry pick that they should apply on top of 13.2 successfully or can they only be applied to Helix ? Thanks.
Kodi 18.3 - Mid 2007 Mac Mini, 4GB, 2TB HD, Windows 7 SP1
Kodi 18.3 - Vero4k, Raspberry Pi 2. OSMC.
Reply
#7
(2014-09-29, 21:11)DBMandrake Wrote: Do you mean all four commits from August 13th onwards not just that one commit ? And are you suggesting that if I use cherry pick that they should apply on top of 13.2 successfully or can they only be applied to Helix ? Thanks.

Ignore the merge one, but cherry-pick the other 3. I'd expect them to apply to 13.2, but if not report back here.
Reply
#8
Thanks both, I've only just had a chance to start testing it today.

I built a version of 13.2 with my suggested change of features to 0xF7 and the three patches suggested above. They did apply cleanly over 13.2 by cherry-picking:

https://github.com/DBMandrake/xbmc/commi...rplay_fix2

So far I've given it some testing on Windows 7 and it looks promising - as yet I have not been able to get airtunes (audio only) connections failing while using Amber, including having it automatically start full screen visualisation. As it was intermittent before it hasn't had enough testing yet to be conclusive about it.

I'll build the same version for my Mac at home and make it my default XBMC install for a few days and see how it behaves.

Any idea why only some skins were affected ? Is it just that the different skin triggers the race condition due to small differences in execution timing ? (So small that even turning debugging on and off had an effect...)
Kodi 18.3 - Mid 2007 Mac Mini, 4GB, 2TB HD, Windows 7 SP1
Kodi 18.3 - Vero4k, Raspberry Pi 2. OSMC.
Reply
#9
yes thats the problem with race conditions - timing is the key to missbehaviour Wink
AppleTV4/iPhone/iPod/iPad: HowTo find debug logs and everything else which the devs like so much: click here
HowTo setup NFS for Kodi: NFS (wiki)
HowTo configure avahi (zeroconf): Avahi_Zeroconf (wiki)
READ THE IOS FAQ!: iOS FAQ (wiki)
Reply
#10
I had a chance to test my 13.2 + 3 above patches + features=0xF7 build on my Mac last night and gave the airplay audio support plenty of hammering with Spotify and the Music app (stopping, starting, changing tracks, seeking, swapping between video and audio etc) with Amber with and without visualisers and I did not once experience the issue I was previously seeing where audio playback would frequently and randomly fail to commence.

So it looks like your race condition patch has done the trick. (I'll test it a bit more over the weekend too) That bug has been frustrating me for months now to the extent that I abandoned airplay audio as unusable so I'm very pleased to see it fixed and be able to start using it again. Smile

I did not notice any issues with stale metadata either, although because I have not used airplay audio in such a long time I don't know exactly what conditions those metadata problems were occurring in which the other patch is intended to fix...but it certainly doesn't seem to hurt.
Kodi 18.3 - Mid 2007 Mac Mini, 4GB, 2TB HD, Windows 7 SP1
Kodi 18.3 - Vero4k, Raspberry Pi 2. OSMC.
Reply
 
Thread Rating:
  • 0 Vote(s) - 0 Average



Logout Mark Read Team Forum Stats Members Help
Airplay audio not working with some skins00