-
Notifications
You must be signed in to change notification settings - Fork 19
dLeyna renderer can crash if renderer dissapears (7.2.8.4,6) #97
Comments
Here's an example stack trace of the crash:
|
Also affects 7.2.3.4 |
The more I look at this code the more broken it seems to be. Sometimes, the introspection data is retrieved synchronously inside an event callback from GUPnP. As we iterate the mainloop inside this callback, GUPnP can crash when we return control to it even if dLeyna-renderer doesn't. I'm guessing that it is also possible for us to request the introspection data twice if we receive two events in quick succession. The best way to avoid this sort of problem is to simply read the service introspection data during device construction. So to fix properly we need to:
As this proposed fix will require API changes to dLeyna-core and GUPnP, I'll try to see if I can come up with a short term work around to get rid of the crash. |
This crash happens if dLeyna-renderer is in the process of retrieving the introspection data for a service when the corresponding renderer disapears from the network. The problem is that we retrieve the introspection data using gupnp_service_info_get_introspection. This is a synchronous function that blocks until the introspection data has been returned or there is an error. The problem is that this function iterates the main loop. So if a renderer disappears, prv_server_unavailable_cb is called and the renderer object is deleted. When gupnp_service_info_get_introspection returns to a function such as prv_get_av_service_states_values, the proxy used to retrieve the introspection data is invalid, but prv_get_av_service_states_values has no way of knowing this.
To fix this problem properly we really need to be able to cancel gupnp_service_info_get_introspection, which means adding a new function to GUPnP.
This bug causes a failure on the DLNA test 7.2.8.4,6
The text was updated successfully, but these errors were encountered: