-
Notifications
You must be signed in to change notification settings - Fork 18
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
Discovery of Play:3 crashes #4
Comments
Ok i've corrected that one on my side. |
Code ok on my side, just commited |
Unfortunately, this does not help. The call to the constructor of AbstractService with the value null is still performed, which leads to the very same exception. I created a patch that fixes the issue for my case using a more generic approach (undoing most of your changes, sorry). Please see the following gist: https://gist.github.com/4182132 Would be great if you could try it out and integrate it into master if no regressions occur. |
On, I just noticed that the workaround for another issue made it into the patch. You may want to exclude the diff for CLIController... Sorry about that. |
Hi guys, I've stumbled onto this problem as well. To fix it, I let audioIn be null in ZonePlayer and throw a newly created AudioInUnavailableException exception when trying to retrieve it through getAudioInService. dispose() needs to be modified as well to avoid an NPE. I'm not sure if this way of fixing the issue respect the philosophy but it works fine. In ZonePlayer:
In AbstractAudioService:
|
Any progress on this? |
@altery would you be interested in a fork? I'm working on a home automation projet (http://www.idomos.org) and I would like to incorporate Sonos in it. We can perhaps join forces on the Sonos bit? |
@fhubin that would be interesting. I just started a new project based on the research of this work (https://github.com/altery/s4m), but if I could incorporate my requirements in a greater context I'd be glad to help. |
@altery Ok. Let me have a look at your project tonight and I'll get back to you. |
When sonos-java discovers a play:3 on the network it fails to add it as zone because of a NPE. Specifically, the exception occurs when creating the AudioInService -> AbstractService.findService() returns null, which gets passed directly to the constructor of the AudioInService. As the play:3 does not have an audio in, I assume it is an expected behaviour that a service lookup may fail, but sonos-java doesn't handle that case correctly.
Here's the stacktrace:
The text was updated successfully, but these errors were encountered: